Skip to main content
GET
/
api
/
v1
/
apps
/
{app_id}
/
usage
Get app metered usage
curl --request GET \
  --url https://cloud-api.phala.com/api/v1/apps/{app_id}/usage
{
  "usage": [
    {
      "instance_id": "<string>",
      "project_id": 123,
      "team_id": 123,
      "timestamp": "<string>",
      "event_type": "<string>",
      "cost": 123,
      "details": "<string>",
      "usage_type": "<string>",
      "billing_start": "<string>",
      "billing_end": "<string>",
      "duration_minutes": 123,
      "billing_key": "<string>",
      "billing_hour": "<string>",
      "billing_day": "<string>"
    }
  ],
  "total": 123,
  "total_cost": 123
}

Path Parameters

app_id
string
required

Hex app identifier

Query Parameters

start_date
string<date-time> | null

Start date (ISO 8601)

Example:

"2024-01-01T00:00:00Z"

end_date
string<date-time> | null

End date (ISO 8601)

Example:

"2024-01-01T00:00:00Z"

limit
integer
default:500

Max records to return

Required range: 1 <= x <= 5000
offset
integer
default:0

Records to skip

Required range: x >= 0

Response

Usage records with cost breakdown

App usage response with cost summary.

usage
MeteredUsageResponse · object[]
required

Usage records

total
integer
required

Number of records returned

total_cost
number
required

Sum of costs in USD