Enterprise Dashboard API v2 (Current)

As an admin user of your organization, you can create API keys, these API keys will allow you to gather consumption data for your organization.

Be aware that API keys from a global organization (payer account) can access data of all tenants, which are part of the global organization.

You can create API Keys in your organization settings (Configuration API Keys) or via API. The tokens are valid for up to 90 days per default. Please make sure that the token security level is set as “Admin” during creation.

You can access https://api-enterprise-dashboard.otc-service.com/ to get started with different API endpoints as well. Please keep in mind that you still need at least a user account with admin permissions to interact with the API. All endpoints, except the Health Endpoints, require Authentication.

../_images/image3.png

Consumption

GET
/v2/hourly/consumption

Show Consumption (Hourly Granularity)

This API streams your consumption data with batch size of 1000. Please create a API Key either in Enterprise Dashboard UI or with the API. If request is sent with same parameters within 1 hr, cached data will be returned.

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

400 - Bad Request

Some content in the request was invalid.

Request

Name

In

Type

Description

contract (Optional)

query

integer

To filter based on contract.

date (Optional)

query

string

To filter based on the date the service was consumed. format = YYYY-MM-DD

hour (Optional)

query

integer

To filter based on Hour of the day (0-23).

month (Optional)

query

integer

To filter based on Month number (1-12).

product (Optional)

query

integer

To filter based on Product Id.

product_description (Optional)

query

string

To filter based on Product Description.

project_name (Optional)

query

string

To filter based on project name like "eu-de".

resource_id (Optional)

query

string

To filter based on the resource id. This field is a unique identifier for all services.

show_tag (Optional)

query

boolean

This field decides if the tags on the resources will be shown in the result. To filter based on tags by tag_key or tag_value filters.

tag_key (Optional)

query

string

To filter based on the tag key attached to a resource. Please note that tags are a pair of tag key and tag value. Only effective with tagged=true.

tag_value (Optional)

query

string

To filter based on the tag value. Please note that tags are a pair of tag key and tag value. Only effective with tagged=true.

week (Optional)

query

integer

To filter based on Week number (1-53).

year (Optional)

query

integer

To filter based on Year (2020-2100).

Curl Example

curl -X GET "https://api-enterprise-dashboard.otc-service.com/v2/hourly/consumption/?year=2024&week=30" -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json"

Response Parameters

Response Example

[
    {
        "amount": 2.5867339103034e-06,
        "amount_excluding_discount": 2.5867339103034e-06,
        "bill_cycle_day": 1,
        "consumption_date": "2024-08-02T00:00:00",
        "contract": 1000012345,
        "etl_updated": "2024-08-02T03:24:00",
        "external_priceplan": "pp_OTC_RDS_BK_SP_EU-DE",
        "product": "OTC_RDS_BK_SP",
        "product_description": "RDS Backup Space",
        "project_id": "845f7226c0d8450793ab07ab1ca80d70",
        "quantity": 3.0148413873e-05,
        "quantity_type": "GB/Month",
        "region": "EU-DE",
        "resource_id": "aa0b059b6f124c9c865a2ba8686c8d11in04.obs",
        "status": "AGGREGATION_PROCESSED",
        "usage_id": "66ac1cfa23b0566fec369b19"
    }
]
GET
/v2/daily/consumption

Show Consumption (Daily Granularity)

This API streams your aggregated consumption data with batch size of 1000. Please create a API Key either in Enterprise Dashboard UI or with the API. If request is sent with same parameters within 1 hr, cached data will be returned.

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

400 - Bad Request

Some content in the request was invalid.

Request

Name

In

Type

Description

contract (Optional)

query

integer

To filter based on contract.

date (Optional)

query

string

To filter based on the date the service was consumed. format = YYYY-MM-DD

month (Optional)

query

integer

To filter based on Month number (1-12).

product (Optional)

query

integer

To filter based on Product Id.

product_description (Optional)

query

string

To filter based on Product Description.

project_name (Optional)

query

string

To filter based on project name like "eu-de".

resource_id (Optional)

query

string

To filter based on the resource id. This field is a unique identifier for all services.

show_tag (Optional)

query

boolean

This field decides if the tags on the resources will be shown in the result. To filter based on tags by tag_key or tag_value filters.

tag_key (Optional)

query

string

To filter based on the tag key attached to a resource. Please note that tags are a pair of tag key and tag value. Only effective with tagged=true.

tag_value (Optional)

query

string

To filter based on the tag value. Please note that tags are a pair of tag key and tag value. Only effective with tagged=true.

week (Optional)

query

integer

To filter based on Week number (1-53).

year (Optional)

query

integer

To filter based on Year (2020-2100).

Curl Example

curl -X GET "https://api-enterprise-dashboard.otc-service.com/v2/daily/consumption/?year=2024&week=30" -H "Authorization: Bearer $TOKEN"

Response Parameters

Response Example

[
    {
        "aggregation_id": "6695b30b94bcea55c2d7703b",
        "amount": 0.036312,
        "consumption_date": "2024-07-16T00:00:00",
        "contract": 1000012345,
        "etl_updated": "2024-07-18T03:05:00",
        "product": "OTC_KMS_UD_C",
        "product_description": "KMS Customer Masterkey",
        "project_id": "845f7226c0d8450793ab07ab1ca80d70",
        "quantity": 24.0,
        "quantity_type": "h",
        "region": "EU-DE",
        "resource_id": "3eaf12bc-9f70-4e33-849b-fe9cd0de3d36",
        "status": "NEW"
    }
]

Health

GET
/v2/health

Health

This endpoint is used to get the API's health. There is no authentication required and results are not cached. It's used for monitoring the health of our service.

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

400 - Bad Request

Some content in the request was invalid.

Request

N/A

Curl Example

curl  'https://api-enterprise-dashboard.otc-service.com/v2/health'

Response Parameters

N/A

Response Example

{
  "status": "ok"
}

Versions

GET
/

Versions

This endpoint is used to get the list of api versions. There is no authentication required.

Success

Code

Reason

200 - OK

Request was successful.

Error

Code

Reason

400 - Bad Request

Some content in the request was invalid.

Request

N/A

Curl Example

curl  'https://api-enterprise-dashboard.otc-service.com/'

Response Parameters

N/A

Response Example

{
  "versions": [
    {
      "id": "v2",
      "links": [
        {
          "href": "https://api-enterprise-dashboard-beta.otc-service.com/v2",
          "rel": "self"
        }
      ],
      "min_version": "",
      "status": "CURRENT",
      "updated": "2024-05-27T00:00:00Z",
      "version": ""
    }
  ]
}