Skip to main content
GET
/
v1
/
quotas
/
{metric}
Get quota usage for a specific metric
curl --request GET \
  --url https://api.cnap.tech/v1/quotas/{metric} \
  --header 'Authorization: Bearer <token>'
{
  "metric": "compute/machines",
  "type": "allocation",
  "display_name": "Compute machines",
  "unit": "count",
  "limit": 1,
  "usage": 0,
  "remaining": 1,
  "resets_at": "<string>"
}

Authorizations

Authorization
string
header
required

Personal Access Token (cnap_pat_...) or OAuth2 JWT. Create tokens at https://cnap.tech/account/tokens

Path Parameters

metric
string
required

Quota metric (URL-encoded service/resource)

Example:

"compute/machines"

Response

Quota info

metric
string
required

Metric: service/resource

Example:

"compute/machines"

type
enum<string>
required
Available options:
allocation,
rate
Example:

"allocation"

display_name
string
required
Example:

"Compute machines"

unit
string
required

count, cores, bytes, count/day

Example:

"count"

limit
number
required
Example:

1

usage
number
required
Example:

0

remaining
number
required
Example:

1

resets_at
string

For rate quotas: ISO 8601 reset time