Photon Counter API

(Last update: 07/14/2025)

The Photon Counter API provides metrics for your Photon Cloud application and Photon Server license usage through a HTTP request in a standardized Prometheus Format.
It is available for Premium Cloud and Enterprise Cloud customers and provides all counter data that is available on the Photon Customer Dashboard Analytics page.

Pre-requesites and limitations

To use the Photon Counter API,

Please note that the Photon Counter API is not intended to work as a healthcheck endpoint or archive. It delivers a resolution of max 1 datapoint per minute and historical data is deleted after 12 months.

Healthcheck information for Photon Public Cloud and Services can be found on our Status Page on https://www.photonengine.com/status. Enterprise Customers may use a dedicated Enterprise Cloud Healthcheck endpoint for monitoring purposes.

Got any questions? Please send an email to developer@photonengine.com or ask on your Photon Circle Discord Server.

Endpoint

The endpoint for all counter requests is:
https://counter.api.photonengine.net/(query type, template)?{params}

Photon Cloud Application Queries and Templates

Definitions

(appid)Application id from your Photon Dashboard
(label)Label for which label_values returns values
cloud, regionOptional filters with comma-separated values
start,endRequest time rage “epoch timestamp”,”ISO 8601 date and time” or time relative to now can be used (example: -4h or -30d)
Default for end: current time
Default for start: -24 hours
start,end: step Time interval between values query_range result in seconds

Default is the step which is at least 60 sec. and produces no more than 360 points for the given time range. The input step parameter is either a number indicating step in sec. or a pair of numbers delimited with / In the latter case, the 2nd number is the approximate number of steps in the given time range, the resulting step is a multiple of the 1st number (60 if not specified). The method limits the number of steps by flagStepsMax (default 1000) prevents returning too large results.

Examples: step=120, step=180/1000, step=100
byComma-separated list of labels to group by (cloud, region)

Queries

Multiple values with step interval per (appid) timeseries

/query_range/app/(appid)/(template)?cloud=\&region\=\&by\=\&start\=\&end\=\&step\=

Single total value per (appid) timeseries

/query_total/app/(appid)/(template)?cloud=\&region\=\&by\=\&start\=\&end\=

List of label values for (appid) in the given time range

/label_values/app/(appid)/\[cloud|region\]?\&start\=\&end\=

Templates

ccuCCU for the application, aggregating room and lobby user counts (maximum
ccuroomAverage CCU per room
channelsNumber of simultaneously open chat channels (maximum)
disconnectratepeerNumber of non-client-requested disconnects per hour per peer (maximum)
messagesNumber of messages per second across all games open (maximum)
messagrejects: roomsNumber of simultaneously open rooms (maximum) Number of players rejected for CCU exceeding your plan (maximum)
messagesperroomNumber of messages per second per room (maximum)
messagesperchannelNumber of messages per second per channel (maximum)
bandwidthIncoming and outgoing traffic of the app in bytes per second
bandwidthpeergameGame server traffic per peer
bandwidthpeermasterMaster server traffic per peer
bandwidthpeerwebhookWebhook traffic per peer
bandwidthpeerIncoming and outgoing traffic of the app in bytes per second per peer
trafficTotal of incoming and outgoing traffic of the app in bytes

Example: Peak CCU by region for a given app id between 06/01/2025 and 07/01/2025

Input:
https://counter.api.photonengine.net/query\_total/app/xxx-xxx-xxx-xxx-xxx/ccu?by=region\&end=1751328000\&start=1748736000

Output:
{"status":"success","data":{"resultType":"vector","result":\[{"metric":{"region":"asia"},"value":\[1748736000,"926"\]},{"metric":{"region":"eu"},"value":\[1748736000,"2528"\]},{"metric":{"region":"in"},"value":\[1748736000,"1057"\]},{"metric":{"region":"kr"},"value":\[1748736000,"628"\]},{"metric":{"region":"sa"},"value":\[1748736000,"1028"\]},{"metric":{"region":"us"},"value":\[1748736000,"2029"\]},{"metric":{"region":"usw"},"value":\[1748736000,"1040"\]}\]},"stats":{"seriesFetched": "7","executionTimeMsec":21}}

Photon Server License Queries and Templates

Definitions

(hash)License hash, may be copied from your Photonengine Dashboard
start,endRequest time rage “epoch timestamp”,”ISO 8601 date and time” or time relative to now can be used (example: -4h or -30d)
Default for end: current time
Default for start: -24 hours
start,end: step Time interval between values query_range result in seconds

Default is the step which is at least 60 sec. and produces no more than 360 points for the given time range. The input step parameter is either a number indicating step in sec. or a pair of numbers delimited with / In the latter case, the 2nd number is the approximate number of steps in the given time range, the resulting step is a multiple of the 1st number (60 if not specified). The method limits the number of steps by flagStepsMax (default 1000) prevents returning too large results.

Examples: step=120, step=180/1000, step=100

Queries

Multiple values with step interval per (hash) license timeseries

/query_range/lic/(hash)/(license_template)?by=\&start\=\&end\=\&step\=

Single total value per (hash) license timeseries

/query_total/lic/(hash)/(license_template)?by=\&start\=\&end\=

Templates

licccuNumber of CCU connected to the license in total
licserversNumber of instances running, each instance made up by a single hardware ID

Example: Peak CCU from 06/01/2025 to 07/01/2025

Input:
https://counter.api.photonengine.net/query\_total/lic/xxxxxxxxxxxxx/licccu?start=1748736000\&end=1751328000

Output:
{"status":"success","data":{"resultType":"vector","result":\[{"metric":{},"value":\[1748736000,"125"\]}\]},"stats":{"seriesFetched": "22051","executionTimeMsec":231}}

Back to top