oCoreoCore Docs
API Reference

Usage

Get project usage

Returns usage data for a specific project.

GET
/projects/{id}/usage

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

idRequiredstring

Project ID

Query Parameters

periodstring

Aggregation period (hourly, daily, monthly)

Default: "hourly"
start_datestring

Start date (RFC3339)

end_datestring

End date (RFC3339)

curl -X GET "//api.ocore.dev/api/projects/<string>/usage?period=hourly&start_date=%3Cstring%3E&end_date=%3Cstring%3E" \
  -H "Authorization: <token>"

OK

{
  "items": [
    {
      "bandwidthInBytes": 0,
      "bandwidthOutBytes": 0,
      "cpuCoreHours": 0,
      "diskGbHours": 0,
      "instanceCount": 0,
      "instanceHours": 0,
      "periodStart": "string",
      "periodType": "string",
      "projectId": "string",
      "projectName": "string",
      "ramGbHours": 0
    }
  ],
  "period": "string",
  "totals": {
    "bandwidthInBytes": 0,
    "bandwidthOutBytes": 0,
    "cpuCoreHours": 0,
    "diskGbHours": 0,
    "instanceCount": 0,
    "instanceHours": 0,
    "periodStart": "string",
    "periodType": "string",
    "projectId": "string",
    "projectName": "string",
    "ramGbHours": 0
  }
}

Get usage report

Returns usage data with optional project and period filters.

GET
/usage

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Query Parameters

project_idstring

Filter by project ID

periodstring

Aggregation period (hourly, daily, monthly)

Default: "hourly"
start_datestring

Start date (RFC3339)

end_datestring

End date (RFC3339)

curl -X GET "//api.ocore.dev/api/usage?project_id=%3Cstring%3E&period=hourly&start_date=%3Cstring%3E&end_date=%3Cstring%3E" \
  -H "Authorization: <token>"

OK

{
  "items": [
    {
      "bandwidthInBytes": 0,
      "bandwidthOutBytes": 0,
      "cpuCoreHours": 0,
      "diskGbHours": 0,
      "instanceCount": 0,
      "instanceHours": 0,
      "periodStart": "string",
      "periodType": "string",
      "projectId": "string",
      "projectName": "string",
      "ramGbHours": 0
    }
  ],
  "period": "string",
  "totals": {
    "bandwidthInBytes": 0,
    "bandwidthOutBytes": 0,
    "cpuCoreHours": 0,
    "diskGbHours": 0,
    "instanceCount": 0,
    "instanceHours": 0,
    "periodStart": "string",
    "periodType": "string",
    "projectId": "string",
    "projectName": "string",
    "ramGbHours": 0
  }
}

Get usage totals

Returns per-project usage totals for the organization.

GET
/usage/totals

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Query Parameters

start_datestring

Start date (RFC3339)

end_datestring

End date (RFC3339)

curl -X GET "//api.ocore.dev/api/usage/totals?start_date=%3Cstring%3E&end_date=%3Cstring%3E" \
  -H "Authorization: <token>"

OK

{
  "totals": [
    {}
  ]
}

Was this page helpful?