Location Request Create¶
Create location requests.
The request to save can be provided by a combination of methods:
- Standard input, as a JSON object in the form supported by the Location Request add API.
- Command line options
- Command line parameter JSON object, including
@@file reference
For example, the following invocations produce equivalent results:
# using standard input
echo '{"sourceId":"OpenWeatherMap", "features":["day","forecast","weather"], "location":{"name":"Wellington","region":"Wellington","locality":"Wellington","zone":"Pacific/Auckland","country":"NZ"}}' \
|s10k locations requests create
# using parameter value
s10k locations requests create \
'{"sourceId":"OpenWeatherMap", "features":["day","forecast","weather"], "location":{"name":"Wellington","region":"Wellington","locality":"Wellington","zone":"Pacific/Auckland","country":"NZ"}}'
# using parameter file reference - my-file.json contains same JSON as above
s10k locations requests create @@my-file.json
# using options
s10k locations requests create --source-id OpenWeatherMap --feature weather,day,forecast \
--name Wellington --region Wellington --locality Wellington --country NZ \
--time-zone Pacific/Auckland
The methods can be combined, with each method overriding settings duplicated in previous methods.
For example the following ends up changing the name to Welly C because the command line parameter
overrides both the --name option and standard input values:
echo '{"name":"Welly A"}' |s10k locations requests create \
--source-id OpenWeatherMap --feature weather,day,forecast \
--name "Welly B" --region Wellington --locality Wellington \
--country NZ --time-zone Pacific/Auckland \
'{"name":"Welly C"}'
Usage¶
s10k locations requests create
[-I]
[-source=<sourceId>]
[-f=feature[,feature...]]...
[-m=<name>]
[-l=<locality>]
[-r=<region>]
[-s=<stateOrProvince>]
[-p=<postalCode>]
[-c=<country>]
[-tz=<zone>]
[-mode=<displayMode>]
[<config>]
Tip
Use the --dry-run global option to simulate what
would be created, without actually saving anything. For example:
s10k --dry-run locations requests create --source-id OpenWeatherMap \
--feature weather,day,forecast --name Wellington --region Wellington \
--locality Wellington --country NZ --time-zone Pacific/Auckland
Output¶
The created request, or preview if the --dry-run global option given.
Examples¶
s10k locations requests create --source-id OpenWeatherMap \
--feature weather,day,forecast --name Wellington --region Wellington \
--locality Wellington --country NZ --time-zone Pacific/Auckland
You can use locs instead of locations and reqs instead of requests:
s10k locs reqs create --source-id OpenWeatherMap \
--feature weather,day,forecast --name Wellington --region Wellington \
--locality Wellington --country NZ --time-zone Pacific/Auckland
╔════╤═════════════════════════════════╤═════════════════════════════════╤═══════════╤═════════════╤════════════════╤════════════════════════╤═══════════════════════════╤═════════╗
║ ID │ Created │ Modified │ Status │ Location ID │ Source ID │ Features │ Info │ Message ║
╠════╪═════════════════════════════════╪═════════════════════════════════╪═══════════╪═════════════╪════════════════╪════════════════════════╪═══════════════════════════╪═════════╣
║ 3 │ 2026-08-30 17:42:37.16777+12:00 │ 2026-08-30 17:42:37.16777+12:00 │ Submitted │ │ OpenWeatherMap │ weather, forecast, day │ name Wellington │ ║
║ │ │ │ │ │ │ │ zone Pacific/Auckland │ ║
║ │ │ │ │ │ │ │ region Wellington │ ║
║ │ │ │ │ │ │ │ country NZ │ ║
║ │ │ │ │ │ │ │ locality Wellington │ ║
║ │ │ │ │ │ │ │ │ ║
╚════╧═════════════════════════════════╧═════════════════════════════════╧═══════════╧═════════════╧════════════════╧════════════════════════╧═══════════════════════════╧═════════╝
ID,Created,Modified,Status,Location ID,Source ID,Features,Info,Message
3,2026-08-30 17:42:57.51229+12:00,2026-08-30 17:42:57.51229+12:00,Submitted,,OpenWeatherMap,"weather, forecast, day","name Wellington
zone Pacific/Auckland
region Wellington
country NZ
locality Wellington
",
{
"id": 3,
"created": "2026-08-30 05:30:10.387888Z",
"modified": "2026-08-30 05:30:10.387888Z",
"userId": 147,
"status": "Submitted",
"data": {
"features": [
"weather",
"forecast",
"day"
],
"location": {
"name": "Wellington",
"zone": "Pacific/Auckland",
"region": "Wellington",
"country": "NZ",
"locality": "Wellington"
},
"sourceId": "OpenWeatherMap"
}
}