Skip to main content
GET
/
v1
/
streams
/
{id}
/
graphs
/
{granularity}
Viewer graphs
curl --request GET \
  --url http://localhost:8787/v1/streams/{id}/graphs/{granularity} \
  --header 'Authorization: Bearer <token>'
[
  {
    "viewers": 123,
    "created_at": "2023-11-07T05:31:56Z",
    "timestamp": "<string>"
  }
]

Authorizations

Authorization
string
header
required

Optional bearer token enforced when the Worker is configured with an API token.

Path Parameters

id
string
required
granularity
enum<string>
required

Aggregate window.

Available options:
minutely,
fiveMinutes,
tenMinutes,
thirtyMinutes,
hourly

Response

Successful response

viewers
integer
created_at
string<date-time> | null
timestamp
string | null