get project usage data.md

Get project usage data

Management API · Reports

GET https://app.mk.io/api/v1/projects/{project_name}/usage

Get usage data since the start of the month for a specified project.

RBAC Capability Required: core.project.get

Authentication

Path parameters

Name Type Required Description
project_name string Yes

Example request

curl -X GET "https://app.mk.io/api/v1/projects/{project_name}/usage" \
  -H "Authorization: Bearer <token>"

Responses

200 — OK

Example:

{
  "supplemental": {
    "end": "string",
    "project": "string",
    "records": 0,
    "start": "string"
  },
  "value": [
    {
      "family": "string",
      "meterName": "string",
      "quantity": 0,
      "solution": "string",
      "unit": "string"
    }
  ]
}

400 — Bad Request

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

401 — Unauthorized

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

403 — Forbidden

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

404 — Not Found

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

429 — Too Many Requests

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

500 — Internal Server Error

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

Source spec: management-api · operationId: [get]_/api/v1/projects/{project_name}/usage