Docs
Usage

List usage logs

GET
/v1/usage/logs

Authorization

BearerAuth
AuthorizationBearer <token>

API key (csk_live_…)

In: header

Query Parameters

page?integer

Page number

Default1
Range1 <= value <= 10000
limit?integer

Items per page

Default50
Range1 <= value <= 100
resourceType?string

Filter by resource type

Value in"sandbox" | "credit_grant"
startDate?string

Filter logs from this date (ISO 8601)

Formatdate-time
endDate?string

Filter logs until this date (ISO 8601)

Formatdate-time

Response Body

application/json

application/json

curl -X GET "https://api.cospec.io/v1/usage/logs"
{
  "data": [
    {
      "id": "string",
      "organizationId": "string",
      "resourceType": "sandbox",
      "sandboxId": "string",
      "runId": "string",
      "quantity": 0,
      "ratePerMinuteUsd": 0,
      "costUsd": 0,
      "balanceBeforeUsd": 0,
      "balanceAfterUsd": 0,
      "waived": true,
      "metadata": {
        "templateId": "string",
        "templateSlug": "string",
        "sandboxName": "string",
        "reason": "string",
        "waiveReason": "string",
        "waivedCostUsd": 0
      },
      "createdAt": "2019-08-24T14:15:22Z"
    }
  ],
  "pagination": {
    "page": 0,
    "limit": 0,
    "total": 0,
    "totalPages": 0
  }
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "requestId": "string"
}