Skip to main content
Version: OxygenIT v1.1.x

API description

info

Have a look to OxygenIT carbon calculator API documentation to get the full specification and start playing with the APIs.

Calculating energy consumption and carbon footprint

/operation and /embodied based APIs are used to compute ernergy consumption, operational and embodied carbon footprint.

Operation

/operation based APIs computes the energy consumption and the operation footprint per hour using a predefined or a raw infrastructure model, and using the operational load of each infrastructure component in term of CPU/GPU and volume of data communication.

For example to calculate the operation carbon footprint of an aws instance use a POST on /providers/aws/operation with this kind of body:

{
"instance": {
"type": "t2.medium",
"region": "ap-northeast-3",
"storage": {
"size": 4294967296,
"type": "sc1"
}
},
"metrics": {
"cpuLoad": 0.63,
"dataTransfer": 4294967296
}
}

Have a look to OxygenIT carbon calculator API documentation to get the full specification and start playing with the APIs.

Embodied

/embodied based APIs computes the construction footprint per hour using a predefined or a raw infrastructure model.

For example to calculate the construction carbon footprint of a Scaleway instance use a POST on /providers/scaleway/embodied with this body:

{
"instance": {
"type": "DEV1-M",
"region": "fr-par-2",
"storage": {
"size": 4294967296,
"type": "l_ssd"
}
}
}

Have a look to OxygenIT carbon calculator API documentation to get the full specification and start playing with the APIs.

APIs are split in 2 sets /providers and /raw

/providers

Enables to use predefined infrastructure provider models. Currently we have aws, gcp, azure, scaleway, and outscale providers available. (outscale) is available since version 1.1.1.

  • To get the list of supported providers, use a GET on /providers
  • To get the operation carbon footprint for a particular provider use a POST on /providers/:providerId/operation where :providerId is the id of the provider you want to use (i.e. /providers/aws/operationfor AWS)
  • To get access of predefined model configurations (instance names, regions, gpus, storage types...) you can use for a particular provider for an operation, use a GET on /providers/:providerId/operation where :providerId is the id of the provider you want to use (i.e. /providers/gcp/operation for GCP)
  • To get the embodied carbon footprint for a particular provider use a POST on /providers/:providerId/embodied where :providerId is the id of the provider you want to use (i.e. /providers/azure/embodiedfor Azure`)
  • To get access of predefined model configurations (instance names, regions, gpus, storage types...) you can use for a particular provider for an embodied, use a GET on /providers/:providerId/embodied where :providerId is the id of the provider you want to use (i.e. /providers/gcp/embodied for GCP)

/raw

Enables to use custom infrastructure models to represent an on-premise infrastrucutre.

  • To get the operation carbon footprint for a raw model use a POST on /raw/operation
  • To get access of raw model configurations (micro-archicture types, gpus, ...) for an operation, use a GET on /raw/operation
  • To get the embodied carbon footprint for a raw model use a POST on /raw/embodied
  • To get access of raw model configurations (micro-archicture types, gpus, ...) for an embodied, use a GET on /raw/embodied

Endpoint

Our Carbon estimator is available on the endpoint https://api-co2.scaledynamics.com.

Full specification

Full specification is available on OxygenIT carbon calculator API documentation.

Get your API key to get started

To get your key, follow subscribing and getting your API key documentation so you can start.