Skip to content

Retrieve active site analytics for client account users or admin

Request

If the user is a ClientAccount user, returns only the clientAccountIds they have access to. An Admin can also use this endpoint, seeing all data if no clientAccountIds is provided.

Security
bearer
Query
startDatestring, (date-time)

Filter sites by start date (inclusive). Format: YYYY-MM-DD

Example:startDate=2023-01-01T00:00:00.000Z
endDatestring, (date-time)

Filter sites by end date (inclusive). Format: YYYY-MM-DD

Example:endDate=2023-01-31T00:00:00.000Z
clientAccountIdsArray of numbers

Filter by one or multiple ClientAccount IDs (optional). Example usage for multiple IDs: ?clientAccountIds=10&clientAccountIds=20

curl -i -X GET \
  'https://docs.axiomera.com/_mock/apis/heydonto/openapi/site/billing-analytics-client-account?startDate=2023-01-01T00%3A00%3A00.000Z&endDate=2023-01-31T00%3A00%3A00.000Z&clientAccountIds=0' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Array of { clientAccountId, sites[], activeSiteCount }

Bodyapplication/json
Array [
clientAccountIdnumberrequired

Client Account ID

Example:10
sitesArray of stringsrequired

List of sites

Example:
[ "[object Object]" ]
activeSiteCountnumberrequired

Active site count

Example:5
]
Response
[ { "clientAccountId": 10, "sites": [ … ], "activeSiteCount": 5 } ]