Skip to content

Commit d7a95d8

Browse files
committed
Update quickstart.md
Signed-off-by: Yasumasa Suenaga <[email protected]>
1 parent ed28d43 commit d7a95d8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

casdk-docs/docs/quickstart.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ parameters and short explanations.
8181

8282
To get a list of all locations supported, you can use the Locations API,
8383
referenced in `src/CarbonAware.CLI/src/Commands/Location`
84-
and the command `.\caw locations`.
84+
and the command `.\caw locations`. Note that you have to configure `LocationDataSourcesConfiguration`
85+
into `appsettings.json` before running the command.
8586

8687
Expected output:
8788

@@ -246,6 +247,9 @@ endpoints, full endpoint description can be found here:
246247
To get a list of all locations supported, you can use the Locations API endpoint
247248
`/locations` referenced in
248249
`src/CarbonAware.WebApi/src/Controllers/LocationsController.cs`.
250+
Note that you have to configure `LocationDataSourcesConfiguration`
251+
into `appsettings.json` before launching WebAPI, otherwise WebAPI returns
252+
HTTP 204 (No Content).
249253

250254
Expected Output:
251255

@@ -269,12 +273,16 @@ Expected Output:
269273
#### Calling the `/emissions/bylocation` endpoint
270274

271275
In console, we can run the below command, to request data for a single location
272-
(currently Azure region names supported) in a particular timeframe:
276+
in a particular timeframe:
273277

274278
```bash
275279
curl "http://localhost:5073/emissions/bylocation?location=westus&time=2022-08-23T14%3A00&toTime=2022-08-23T14%3A30" | jq
276280
```
277281

282+
Note that region names in this example (e.g. `westus`) are defined in
283+
[azure-regions.json](https://github.com/Green-Software-Foundation/carbon-aware-sdk/blob/dev/src/data/location-sources/azure-regions.json).
284+
AWS region is also available in [aws-regions.json](https://github.com/Green-Software-Foundation/carbon-aware-sdk/blob/dev/src/data/data-files/aws-regions.json).
285+
278286
You can omit the `| jq` to get the JSON data raw and unparsed. This is a request
279287
for data in the `westus` region from the date `2022-08-23 at 14:00` to
280288
`2022-08-23 at 14:30`. (Note: semicolons `:` are encoded as `%3A` in URLs).

0 commit comments

Comments
 (0)