Public APIAPI ReferenceUsage

Get app traffic and usage.

Beta API

The /v1 API contract may change, including breaking changes without compatibility aliases.

GET/v1/apps/{appId}/usage

Team roles owner, member, billing, and viewer can retrieve the app's traffic and Compute usage, status analytics, and TTFB analytics without cost information. The period is [from,to) and defaults to the last 7 days. hour supports up to 31 days, and the overall range is limited to 366 days. Observability analytics are retained for 90 days.

Authorization

bearerAuth
AuthorizationBearer <token>

Use an access token obtained by logging in or exchanging an API token. First exchange an ntro_ API token for an access token through the login server.

In: header

Path Parameters

appId*string

Query Parameters

from?string
granularity?string
to?string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/apps/string/usage"
{  "analytics_retention_days": 0,  "app_id": "string",  "by_deployment": [    {      "created_at": "2019-08-24T14:15:22Z",      "deployment_id": "string",      "metrics": {        "property1": {          "billing_units": "string",          "raw": 0,          "unit": "string"        },        "property2": {          "billing_units": "string",          "raw": 0,          "unit": "string"        }      },      "short_id": "string",      "traffic": {        "downstream_bytes_in": 0,        "downstream_bytes_out": 0,        "origin_bytes_in": 0,        "origin_bytes_out": 0,        "requests": 0      }    }  ],  "by_domain": [    {      "domain": "string",      "downstream_bytes_out": 0,      "requests": 0,      "status": {        "1xx": 0,        "2xx": 0,        "3xx": 0,        "4xx": 0,        "5xx": 0,        "other": 0      },      "ttfb_ms": {        "p50": 0,        "p95": 0,        "p99": 0      }    }  ],  "by_region": [    {      "metrics": {        "property1": {          "billing_units": "string",          "raw": 0,          "unit": "string"        },        "property2": {          "billing_units": "string",          "raw": 0,          "unit": "string"        }      },      "region": "string",      "traffic": {        "downstream_bytes_in": 0,        "downstream_bytes_out": 0,        "origin_bytes_in": 0,        "origin_bytes_out": 0,        "requests": 0      }    }  ],  "from": "2019-08-24T14:15:22Z",  "granularity": "string",  "series": [    {      "bucket": "2019-08-24T14:15:22Z",      "metrics": {        "property1": {          "billing_units": "string",          "raw": 0,          "unit": "string"        },        "property2": {          "billing_units": "string",          "raw": 0,          "unit": "string"        }      },      "status": {        "1xx": 0,        "2xx": 0,        "3xx": 0,        "4xx": 0,        "5xx": 0,        "other": 0      },      "traffic": {        "downstream_bytes_in": 0,        "downstream_bytes_out": 0,        "origin_bytes_in": 0,        "origin_bytes_out": 0,        "requests": 0      },      "ttfb_ms": {        "p50": 0,        "p95": 0,        "p99": 0      }    }  ],  "status": {    "1xx": 0,    "2xx": 0,    "3xx": 0,    "4xx": 0,    "5xx": 0,    "other": 0  },  "to": "2019-08-24T14:15:22Z",  "totals": {    "property1": {      "billing_units": "string",      "raw": 0,      "unit": "string"    },    "property2": {      "billing_units": "string",      "raw": 0,      "unit": "string"    }  },  "traffic": {    "downstream_bytes_in": 0,    "downstream_bytes_out": 0,    "origin_bytes_in": 0,    "origin_bytes_out": 0,    "requests": 0  },  "ttfb_ms": {    "p50": 0,    "p95": 0,    "p99": 0  }}