Skip to content

Instantly share code, notes, and snippets.

@dipankardas011
Last active October 7, 2024 04:58
Show Gist options
  • Save dipankardas011/e56d4ea27f49cc1eeec1f1a3a8a26eae to your computer and use it in GitHub Desktop.
Save dipankardas011/e56d4ea27f49cc1eeec1f1a3a8a26eae to your computer and use it in GitHub Desktop.
Green software foundation (Carbon Aware SDK)
docker run --rm -p 8080:8080 \
 -e DataSources__EmissionsDataSource="WattTime" \
 -e DataSources__ForecastDataSource="WattTime" \
 -e DataSources__Configurations__WattTime__Type="WattTime" \
 -e DataSources__Configurations__WattTime__username="" \
 -e DataSources__Configurations__WattTime__password="" \
ghcr.io/green-software-foundation/carbon-aware-sdk
curl http://localhost:8080/locations | jq -r .
curl http://localhost:8080/emissions/bylocation\?location=westus | jq -r .
curl "http://localhost:8080/emissions/bylocation?location=westus&time=2022-08-23T14%3A00&toTime=2022-08-23T14%3A30" | jq # 2022-08-23 at 14:00 to 2022-08-23 at 14:30

https://carbon-aware-sdk.greensoftware.foundation/docs/quickstart#using-the-web-api

Endpoints

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment