Control APIAPI 레퍼런스Billing

팀의 사용량과 비용을 조회합니다.

베타 API

Control API의 /v1 계약은 변경될 수 있으며, 호환되지 않는 변경도 별칭 없이 배포될 수 있습니다.

GET/v1/teams/{teamId}/usage

owner, member, billing 역할이 조회할 수 있습니다. 범위는 최대 366일이며 app_id 필터를 사용해도 비용 미리보기는 팀 전체 기준입니다.

인증

bearerAuth
인증Bearer <token>

Identity access JWT 또는 ntro_ API token을 사용합니다. token 관리 경로는 Identity access JWT만 허용합니다.

위치: header

경로 매개변수

teamId*string

쿼리 매개변수

app_id?string
from?string
granularity?string
to?string

응답 본문

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/teams/string/usage"
{  "by_app": [    {      "app_id": "string",      "app_name": "string",      "app_slug": "string",      "metrics": {        "property1": {          "billing_units": "string",          "raw": 0,          "unit": "string"        },        "property2": {          "billing_units": "string",          "raw": 0,          "unit": "string"        }      }    }  ],  "by_region": [    {      "app_id": "string",      "bucket": "2019-08-24T14:15:22Z",      "metrics": {        "property1": {          "billing_units": "string",          "raw": 0,          "unit": "string"        },        "property2": {          "billing_units": "string",          "raw": 0,          "unit": "string"        }      },      "region": "string"    }  ],  "cost_preview": {    "currency": "string",    "currency_minor_digits": 0,    "lines": [      {        "amount_minor": 0,        "description": "string",        "kind": "string",        "metric": "string",        "quantity": "string",        "region": "string",        "unit": "string",        "unit_price": "string"      }    ],    "period_end": "2019-08-24T14:15:22Z",    "period_start": "2019-08-24T14:15:22Z",    "plan": "string",    "team_id": "string",    "total_minor": 0  },  "cost_preview_scope": "string",  "from": "2019-08-24T14:15:22Z",  "granularity": "string",  "series": [    {      "app_id": "string",      "bucket": "2019-08-24T14:15:22Z",      "metrics": {        "property1": {          "billing_units": "string",          "raw": 0,          "unit": "string"        },        "property2": {          "billing_units": "string",          "raw": 0,          "unit": "string"        }      },      "region": "string"    }  ],  "to": "2019-08-24T14:15:22Z",  "totals": {    "property1": {      "billing_units": "string",      "raw": 0,      "unit": "string"    },    "property2": {      "billing_units": "string",      "raw": 0,      "unit": "string"    }  }}