Download OpenAPI specification:Download
Usage Engine offers several different APIs for performing various tasks using external systems.
Describes the standard HTTP error codes returned by the API, including their meanings and typical scenarios.
The following error response codes are used in the system:
| Error code | Explanation |
|---|---|
400 |
Bad request |
401 |
Unauthorized |
404 |
Not found |
405 |
Method not allowed |
409 |
Conflict |
413 |
Request body too large |
429 |
Too many requests |
500 |
An unexpected internal error occurred even though the request was valid |
503 |
Service unavailable |
Generates a bearer access token for authenticating OAuth clients with the Usage Engine REST API. Requires an Application Access client ID and secret. See Application Access for setup instructions.
Rate Limits
Each client can make up to 1000 requests every 5m. The burst capacity is 1000 requests.
| Content-Type | string |
| Authorization | string |
Credentials used for authenticating the client to the authorization server.
| audience required | string The intended recipients which should accept and process the token. Use the base URL for the environment you are accessing. |
| client_id required | string The client ID generated when creating the Application Access in Usage Engine CE. |
| client_secret required | string The client secret generated when creating the Application Access in Usage Engine CE. |
| grant_type required | string The OAuth grant type that will be used to generate the token. The value of this parameter must be |
{- "client_id": "u4grtTy18E2DYANsv0G174aSxR3EeOiA",
- "client_secret": "U6qN9NTgis3MLeleRXtLgIxtRE-qhpZcPJ_5eoNtNQYcodiY9q0Abs3afgpbX3M6",
- "grant_type": "client_credentials"
}{- "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImZUYU5saGpnclFERE0xYkdVZG1WeiJ9.eyJhY2NvdW50SWQiOiJhZDZmZWM5NS1lMDYzLTQ5MmItOTJjYy01MmJiNjJjMGU3NTAiLCJpc3MiOiJodHRwczovL2F1dGguZGlnaXRhbHJvdXRlLmlvLyIsInN1YiI6IjhtMUhUMHA2SkdMOVJjbzhWNEZjWGZ2Y2dHejcwcms4QGNsaWVudHMiLCJhdWQiOiJodHRwczovL2FwaS5kaWdpdGFscm91dGUuaW8vIiwiaWF0IjoxNzEyMTQ0OTQzLCJleHAiOjE3MTIxNDg1NDMsInNjb3BlIjoiY3JlYXRlOm1ldGVyX3R5cGVzIGNyZWF0ZTptZXRlcnMgZGVsZXRlOm1ldGVyX3R5cGVzIGRlbGV0ZTptZXRlcnMgcmVhZDptZXRlcl90eXBlcyByZWFkOm1ldGVycyB1cGRhdGU6bWV0ZXJfdHlwZXMiLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMiLCJhenAiOiI4bTFIVDBwNkpHTDlSY284VjRGY1hmdmNnR3o3MHJrOCJ9.VS8Ti1zTK4b8qGRKXJg8b0-aMpNpTTL1_nwsPbCeM7CFlUYu45ZUQGWvUqC6XGK-Xl3j9k5Tkth8TtFbbXNEW4mEV0e1qQbDu_ZlvH-bH2nCNJhk-7mFriGYfTF0U-erqNiMsk4Tbrmm2Voy9CJ4_WyVrCjTLBqRBKb_bU4KHFJtgadlqwaTVNZUiI-sIV3Y2V_gid_4qPTO1Vr01ybID_F8uNII9goDqPJBRh6hmcKHqt65U5n2xzbmBcNqRPoXqxh1g9OaYEPDjojp2lHttqs2EkGG9KxzTFqhdX4lcrjfHGgzNk7LD7S7mGJTO0V-n57geptxM7gFGr-hAQ4Ikg",
- "expires_in": 3600,
- "scope": "create:meter_types create:meters delete:meter_types delete:meters read:meter_types read:meters update:meter_types",
- "token_type": "Bearer"
}Defines categories for usage-based billing, representing products or services available to customers.
Returns all meter types configured for your account.
Rate Limits
Each client can make up to 5000 requests every 5m. The burst capacity is 100 requests.
| limit | string Defines the number of meter types to be returned. A maximum of 100 items can be returned. |
| skip | string Defines an offset for the meter types to be returned. If you set skip to 10, the first 10 meter types will be skipped in the returned list. |
| sortOrder | string Determines the sort order of the returned list; ASC for ascending or DESC for descending. |
| sortBy | string Determines the field in the meter type by which the returned list will be sorted. |
| name | string Defines the name for which meter type should be returned. You may provide full or partial name. |
| Authorization required | string Bearer token for authentication |
{- "meterTypes": [
- {
- "accountId": "4d6548c8-1793-498f-9306-9ec101cb9bf8",
- "activeFrom": "2023-07-26T09:00:15.690+00:00",
- "activeTo": "2024-11-22T00:00:00.000+00:00",
- "aggregation": {
- "type": "increment"
}, - "capacity": 1000,
- "category": "API Counts",
- "createdAt": "2023-07-26T09:00:15.690+00:00",
- "description": "Meter definition to count the number of API requests per customer",
- "externalRef": "878752b4-4ddf",
- "id": "string",
- "name": "Usage based API counter",
- "numberOfMeters": 0,
- "resetSchedule": {
- "day": "L",
- "hour": "0",
- "minute": "0",
- "month": "*",
- "weekday": "*"
}, - "thresholds": [
- {
- "absoluteValue": 990,
- "name": "Threshold 1"
}, - {
- "capacityPercentage": 70,
- "customFields": {
- "action": "alert",
- "notifyTeam": true,
- "severity": "high"
}, - "name": "Threshold 2"
}
], - "timezone": "Etc/UTC",
- "unit": "requests",
- "updatedAt": "2023-07-26T09:00:15.690+00:00"
}
]
}Creates a new meter type in your account.
Rate Limits
Each client can make up to 5000 requests every 5m. The burst capacity is 100 requests.
| Authorization required | string Bearer token for authentication |
| activeFrom | string Determines from which date and time the meter type will be active, with the time based on |
| activeTo | string Determines to which date and time the meter type will be active, with the time based on |
required | object Choose the aggregation type for aggregating data within a defined interval.
The aggregation type cannot be updated. |
| capacity | number >= 0 The total capacity allocated for meters of this meter type. This value serves as a reference of upper limit for each meter of this type. |
| category | string <= 50 characters Specify the category to which the meter type should be assigned. By using the category when configuring the Meter processor, meter types can be added, edited, or deleted without necessarily affecting the Meter processor configuration. If no category is specified, the meter type will be assigned to the DEFAULT category. |
| description | string <= 200 characters You can add a more detailed description for the meter type with this parameter. |
| externalRef | string <= 100 characters If the meter type is registered as a product in an external system, you can add the external ID to reference it. |
| name required | string <= 80 characters ^[\w\s().-]+$ Name of the meter type. Only alphanumeric characters, spaces, and the following special characters are supported |
required | object Determines how often the usage counting data should be reset and sent to downstream systems defined in crontab format. |
Array of Using absolute value (object) or Using percentage of capacity (object) <= 5 items A list of one or more thresholds that define usage checkpoints for meters of this meter type. When meter value reaches the defined threshold, a signal or action can be triggered. | |
| timezone required | string The canonical timezone that should be applied for reset time. See IANA time zones for the complete available list. |
| unit required | string <= 50 characters State the unit which the meters should be measuring, such as MB, minutes, etc. |
{- "activeFrom": "2023-07-26T09:00:15.690+00:00",
- "activeTo": "2024-11-22T00:00:00.000+00:00",
- "aggregation": {
- "type": "increment"
}, - "capacity": 1000,
- "category": "API Counts",
- "description": "Meter definition to count the number of API requests per customer",
- "externalRef": "878752b4-4ddf",
- "name": "Usage based API counter",
- "resetSchedule": {
- "day": "L",
- "hour": "0",
- "minute": "0",
- "month": "*",
- "weekday": "*"
}, - "thresholds": [
- {
- "absoluteValue": 990,
- "name": "Threshold 1"
}, - {
- "capacityPercentage": 70,
- "customFields": {
- "action": "alert",
- "notifyTeam": true,
- "severity": "high"
}, - "name": "Threshold 2"
}
], - "timezone": "Etc/UTC",
- "unit": "requests"
}{- "accountId": "4d6548c8-1793-498f-9306-9ec101cb9bf8",
- "activeFrom": "2023-07-26T09:00:15.690+00:00",
- "activeTo": "2024-11-22T00:00:00.000+00:00",
- "aggregation": {
- "type": "increment"
}, - "capacity": 1000,
- "category": "API Counts",
- "createdAt": "2023-07-26T09:00:15.690+00:00",
- "description": "Meter definition to count the number of API requests per customer",
- "externalRef": "878752b4-4ddf",
- "id": "645ed240-02b5-400c-9a3c-21857e8f2ac4",
- "name": "Usage based API counter",
- "numberOfMeters": 0,
- "resetSchedule": {
- "day": "L",
- "hour": "0",
- "minute": "0",
- "month": "*",
- "weekday": "*"
}, - "thresholds": [
- {
- "absoluteValue": 990,
- "name": "Threshold 1"
}, - {
- "capacityPercentage": 70,
- "customFields": {
- "action": "alert",
- "notifyTeam": true,
- "severity": "high"
}, - "name": "Threshold 2"
}
], - "timezone": "Etc/UTC",
- "unit": "requests",
- "updatedAt": "2023-07-26T09:00:15.690+00:00"
}Deletes the specified meter type. It is not allowed to delete meter type with associated meters. You must delete associated meters first to delete meter type.
Rate Limits
Each client can make up to 5000 requests every 5m. The burst capacity is 100 requests.
| id required | string The unique ID of meter type. |
| Authorization required | string Bearer token for authentication |
{- "deletedCount": 1
}Retrieves details for a specific meter type by its unique identifier.
Rate Limits
Each client can make up to 5000 requests every 5m. The burst capacity is 100 requests.
| id required | string The unique ID of meter type. |
| Authorization required | string Bearer token for authentication |
{- "accountId": "4d6548c8-1793-498f-9306-9ec101cb9bf8",
- "activeFrom": "2023-07-26T09:00:15.690+00:00",
- "activeTo": "2024-11-22T00:00:00.000+00:00",
- "aggregation": {
- "type": "increment"
}, - "capacity": 1000,
- "category": "API Counts",
- "createdAt": "2023-07-26T09:00:15.690+00:00",
- "description": "Meter definition to count the number of API requests per customer",
- "externalRef": "878752b4-4ddf",
- "id": "645ed240-02b5-400c-9a3c-21857e8f2ac4",
- "name": "Usage based API counter",
- "numberOfMeters": 0,
- "resetSchedule": {
- "day": "L",
- "hour": "0",
- "minute": "0",
- "month": "*",
- "weekday": "*"
}, - "thresholds": [
- {
- "absoluteValue": 990,
- "name": "Threshold 1"
}, - {
- "capacityPercentage": 70,
- "customFields": {
- "action": "alert",
- "notifyTeam": true,
- "severity": "high"
}, - "name": "Threshold 2"
}
], - "timezone": "Etc/UTC",
- "unit": "requests",
- "updatedAt": "2023-07-26T09:00:15.690+00:00"
}Updates the properties of a specified meter type.
Rate Limits
Each client can make up to 5000 requests every 5m. The burst capacity is 100 requests.
| id required | string The unique ID of meter type. |
| Authorization required | string Bearer token for authentication |
string or null The new active from date you want the meter type to use. | |
string or null The new active to date you want the meter type to use. | |
| capacity | number >= 0 A new total capacity allocated for meters of this meter type. |
string or null <= 50 characters The new category you want the meter type to use. You may need to revise the configuration in the Meter processor following the category update. | |
| description | string <= 200 characters The updated description you want the meter type to have. |
string or null <= 100 characters The new external ID you want to associate with the meter type. | |
| name | string <= 80 characters ^[\w\s().-]+$ The new name you want the meter type to have. Only alphanumeric characters, spaces, and the following special characters are supported |
object The new reset schedule you want the meter type to use. The new reset schedule takes effect after the current period has ended and meters have been reset. | |
Array of Using absolute value (object) or Using percentage of capacity (object) <= 5 items A new list of threshold objects, each of which can specify either an absolute value or a percentage of capacity. | |
| timezone | string The new canonical timezone you want the meter type to use. See IANA time zones for the complete available list. |
| unit | string <= 50 characters State the unit which the meters should be measuring, such as MB, minutes, etc. |
{- "activeFrom": "2023-07-26T09:00:15.690+00:00",
- "activeTo": "2024-11-22T00:00:00.000+00:00",
- "capacity": 1000,
- "category": "API Counts",
- "description": "Meter definition to count the number of API requests per customer",
- "externalRef": "878752b4-4ddf",
- "name": "Usage based API counter",
- "resetSchedule": {
- "day": "L",
- "hour": "0",
- "minute": "0",
- "month": "*",
- "weekday": "*"
}, - "thresholds": [
- {
- "absoluteValue": 990,
- "name": "Threshold 1"
}, - {
- "capacityPercentage": 70,
- "customFields": {
- "action": "alert",
- "notifyTeam": true,
- "severity": "high"
}, - "name": "Threshold 2"
}
], - "timezone": "Etc/UTC",
- "unit": "requests"
}{- "accountId": "4d6548c8-1793-498f-9306-9ec101cb9bf8",
- "activeFrom": "2023-07-26T09:00:15.690+00:00",
- "activeTo": "2024-11-22T00:00:00.000+00:00",
- "aggregation": {
- "type": "increment"
}, - "capacity": 1000,
- "category": "API Counts",
- "createdAt": "2023-07-26T09:00:15.690+00:00",
- "description": "Meter definition to count the number of API requests per customer",
- "externalRef": "878752b4-4ddf",
- "id": "645ed240-02b5-400c-9a3c-21857e8f2ac4",
- "name": "Usage based API counter",
- "numberOfMeters": 0,
- "resetSchedule": {
- "day": "L",
- "hour": "0",
- "minute": "0",
- "month": "*",
- "weekday": "*"
}, - "thresholds": [
- {
- "absoluteValue": 990,
- "name": "Threshold 1"
}, - {
- "capacityPercentage": 70,
- "customFields": {
- "action": "alert",
- "notifyTeam": true,
- "severity": "high"
}, - "name": "Threshold 2"
}
], - "timezone": "Etc/UTC",
- "unit": "requests",
- "updatedAt": "2023-07-26T09:00:15.690+00:00"
}Retrieves all meters configured for your account.
Rate Limits
Each client can make up to 10000 requests every 5m. The burst capacity is 10000 requests.
| limit | string Defines the number of meters to be returned. A maximum of 100 items can be returned. |
| skip | string Defines an offset for the meters to be returned. If you set skip to 10, the first 10 meters will be skipped in the returned list. |
| meterKey | string Defines the meter key for which meters should be returned. |
| meterTypeId | string Defines the meter type ID for which meters should be returned. |
| userId | string Defines the user ID for which meters should be returned. |
| Authorization required | string Bearer token for authentication |
{- "meters": [
- {
- "capacity": 1000,
- "carryFirst": {
- "country": "Norway"
}, - "carryLast": {
- "timestamp": "2023-07-05T22:01:04.431Z"
}, - "createdAt": "2023-07-01T00:00:00.000Z",
- "customFields": {
- "billingId": 778899,
- "organizationName": "Alpha group",
- "usageLocation": "Stockholm"
}, - "deleteOnReset": false,
- "groupBreakdowns": [
- {
- "groups": [
- {
- "carryFirst": {
- "country": "Norway"
}, - "carryLast": {
- "timestamp": "2023-07-05T22:01:04.431Z"
}, - "fields": {
- "API name": "createUser"
}, - "key": "API name:createUser",
- "value": 10
}, - {
- "carryFirst": {
- "country": "Norway"
}, - "carryLast": {
- "timestamp": "2023-07-05T22:01:04.431Z"
}, - "fields": {
- "API name": "updateCounter"
}, - "key": "API name:updateCounter",
- "value": 15
}
], - "name": "API name"
}
], - "groups": [
- {
- "fields": {
- "API name": "createUser"
}, - "key": "API name:createUser",
- "value": 10
}, - {
- "fields": {
- "API name": "updateCounter"
}, - "key": "API name:updateCounter",
- "value": 15
}
], - "id": "8a76066d-ff29-417c-a18e-abde22e44310",
- "meterKey": "a1f8797b-c827-4483-b6cf-6d3d3baa18a7",
- "meterMetaData": {
- "firstEvent": "2023-07-01T13:37:11.111Z",
- "lastEvent": "2023-07-05T22:01:04.431Z"
}, - "meterTypeId": "645ed240-02b5-400c-9a3c-21857e8f2ac4",
- "meterTypeName": "Usage based API counter",
- "periodEnd": "2023-08-01T00:00:00.000Z",
- "periodStart": "2023-07-01T00:00:00.000Z",
- "thresholds": [
- {
- "absoluteValue": 990,
- "name": "Threshold 1",
- "reachedAt": "2023-08-01T12:34:56.000Z"
}, - {
- "capacityPercentage": 70,
- "customFields": {
- "action": "alert",
- "notifyTeam": true,
- "severity": "high"
}, - "name": "Threshold 2"
}
], - "timezone": "Etc/UTC",
- "unit": "requests",
- "updatedAt": "2023-07-05T22:01:04.431Z",
- "userId": "user0@example.com",
- "value": 25
}
]
}Creates a new meter for tracking customer usage.
Rate Limits
Each client can make up to 10000 requests every 5m. The burst capacity is 10000 requests.
| Authorization required | string Bearer token for authentication |
object Custom fields to enrich the metered output. | |
| meterKey required | string <= 36 characters The meter key for the Meter processor counting the usage for the meter. |
| meterTypeId required | string <= 36 characters The unique ID of the meter type that the meter should count usage for. |
| userId required | string <= 320 characters Unique ID of the user the meter belongs to, for example an email address, user name or MSISDN number. |
{- "customFields": {
- "billingId": 778899,
- "organizationName": "Alpha group",
- "usageLocation": "Stockholm"
}, - "meterKey": "a1f8797b-c827-4483-b6cf-6d3d3baa18a7",
- "meterTypeId": "645ed240-02b5-400c-9a3c-21857e8f2ac4",
- "userId": "user0@example.com"
}{- "capacity": 1000,
- "carryFirst": {
- "country": "Norway"
}, - "carryLast": {
- "timestamp": "2023-07-05T22:01:04.431Z"
}, - "createdAt": "2023-07-01T00:00:00.000Z",
- "customFields": {
- "billingId": 778899,
- "organizationName": "Alpha group",
- "usageLocation": "Stockholm"
}, - "deleteOnReset": false,
- "groupBreakdowns": [
- {
- "groups": [
- {
- "carryFirst": {
- "country": "Norway"
}, - "carryLast": {
- "timestamp": "2023-07-05T22:01:04.431Z"
}, - "fields": {
- "API name": "createUser"
}, - "key": "API name:createUser",
- "value": 10
}, - {
- "carryFirst": {
- "country": "Norway"
}, - "carryLast": {
- "timestamp": "2023-07-05T22:01:04.431Z"
}, - "fields": {
- "API name": "updateCounter"
}, - "key": "API name:updateCounter",
- "value": 15
}
], - "name": "API name"
}
], - "groups": [
- {
- "fields": {
- "API name": "createUser"
}, - "key": "API name:createUser",
- "value": 10
}, - {
- "fields": {
- "API name": "updateCounter"
}, - "key": "API name:updateCounter",
- "value": 15
}
], - "id": "8a76066d-ff29-417c-a18e-abde22e44310",
- "meterKey": "a1f8797b-c827-4483-b6cf-6d3d3baa18a7",
- "meterMetaData": {
- "firstEvent": "2023-07-01T13:37:11.111Z",
- "lastEvent": "2023-07-05T22:01:04.431Z"
}, - "meterTypeId": "645ed240-02b5-400c-9a3c-21857e8f2ac4",
- "meterTypeName": "Usage based API counter",
- "periodEnd": "2023-08-01T00:00:00.000Z",
- "periodStart": "2023-07-01T00:00:00.000Z",
- "thresholds": [
- {
- "absoluteValue": 990,
- "name": "Threshold 1",
- "reachedAt": "2023-08-01T12:34:56.000Z"
}, - {
- "capacityPercentage": 70,
- "customFields": {
- "action": "alert",
- "notifyTeam": true,
- "severity": "high"
}, - "name": "Threshold 2"
}
], - "timezone": "Etc/UTC",
- "unit": "requests",
- "updatedAt": "2023-07-05T22:01:04.431Z",
- "userId": "user0@example.com",
- "value": 25
}Deletes the specified meter from your account.
Rate Limits
Each client can make up to 10000 requests every 5m. The burst capacity is 10000 requests.
| id required | string The unique ID of meter. |
| Authorization required | string Bearer token for authentication |
{- "deletedCount": 1
}Retrieves details for a specific meter by its unique identifier.
Rate Limits
Each client can make up to 10000 requests every 5m. The burst capacity is 10000 requests.
| id required | string The unique ID of meter. |
| Authorization required | string Bearer token for authentication |
{- "capacity": 1000,
- "carryFirst": {
- "country": "Norway"
}, - "carryLast": {
- "timestamp": "2023-07-05T22:01:04.431Z"
}, - "createdAt": "2023-07-01T00:00:00.000Z",
- "customFields": {
- "billingId": 778899,
- "organizationName": "Alpha group",
- "usageLocation": "Stockholm"
}, - "deleteOnReset": false,
- "groupBreakdowns": [
- {
- "groups": [
- {
- "carryFirst": {
- "country": "Norway"
}, - "carryLast": {
- "timestamp": "2023-07-05T22:01:04.431Z"
}, - "fields": {
- "API name": "createUser"
}, - "key": "API name:createUser",
- "value": 10
}, - {
- "carryFirst": {
- "country": "Norway"
}, - "carryLast": {
- "timestamp": "2023-07-05T22:01:04.431Z"
}, - "fields": {
- "API name": "updateCounter"
}, - "key": "API name:updateCounter",
- "value": 15
}
], - "name": "API name"
}
], - "groups": [
- {
- "fields": {
- "API name": "createUser"
}, - "key": "API name:createUser",
- "value": 10
}, - {
- "fields": {
- "API name": "updateCounter"
}, - "key": "API name:updateCounter",
- "value": 15
}
], - "id": "8a76066d-ff29-417c-a18e-abde22e44310",
- "meterKey": "a1f8797b-c827-4483-b6cf-6d3d3baa18a7",
- "meterMetaData": {
- "firstEvent": "2023-07-01T13:37:11.111Z",
- "lastEvent": "2023-07-05T22:01:04.431Z"
}, - "meterTypeId": "645ed240-02b5-400c-9a3c-21857e8f2ac4",
- "meterTypeName": "Usage based API counter",
- "periodEnd": "2023-08-01T00:00:00.000Z",
- "periodStart": "2023-07-01T00:00:00.000Z",
- "thresholds": [
- {
- "absoluteValue": 990,
- "name": "Threshold 1",
- "reachedAt": "2023-08-01T12:34:56.000Z"
}, - {
- "capacityPercentage": 70,
- "customFields": {
- "action": "alert",
- "notifyTeam": true,
- "severity": "high"
}, - "name": "Threshold 2"
}
], - "timezone": "Etc/UTC",
- "unit": "requests",
- "updatedAt": "2023-07-05T22:01:04.431Z",
- "userId": "user0@example.com",
- "value": 25
}Updates the properties of a specified meter.
Rate Limits
Each client can make up to 10000 requests every 5m. The burst capacity is 10000 requests.
| id required | string The unique ID of meter. |
| Authorization required | string Bearer token for authentication |
| capacity | number >= 0 The new total capacity allocated to this meter after the update, representing reference of usage limit. This value is used as the reference for evaluating capacityPercentage thresholds for this meter. |
object Custom fields to enrich the metered output. | |
| deleteOnReset | boolean Determine whether the meter should be deleted after the next reset. |
Array of Using absolute value (object) or Using percentage of capacity (object) <= 5 items A new list of threshold objects, each of which can specify either an absolute value or a percentage of capacity. |
{- "capacity": 1000,
- "customFields": {
- "billingId": 778899,
- "organizationName": "Alpha group",
- "usageLocation": "Stockholm"
}, - "deleteOnReset": true,
- "thresholds": [
- {
- "absoluteValue": 990,
- "name": "Threshold 1"
}, - {
- "capacityPercentage": 70,
- "customFields": {
- "action": "alert",
- "notifyTeam": true,
- "severity": "high"
}, - "name": "Threshold 2"
}
]
}{- "capacity": 1000,
- "carryFirst": {
- "country": "Norway"
}, - "carryLast": {
- "timestamp": "2023-07-05T22:01:04.431Z"
}, - "createdAt": "2023-07-01T00:00:00.000Z",
- "customFields": {
- "billingId": 778899,
- "organizationName": "Alpha group",
- "usageLocation": "Stockholm"
}, - "deleteOnReset": false,
- "groupBreakdowns": [
- {
- "groups": [
- {
- "carryFirst": {
- "country": "Norway"
}, - "carryLast": {
- "timestamp": "2023-07-05T22:01:04.431Z"
}, - "fields": {
- "API name": "createUser"
}, - "key": "API name:createUser",
- "value": 10
}, - {
- "carryFirst": {
- "country": "Norway"
}, - "carryLast": {
- "timestamp": "2023-07-05T22:01:04.431Z"
}, - "fields": {
- "API name": "updateCounter"
}, - "key": "API name:updateCounter",
- "value": 15
}
], - "name": "API name"
}
], - "groups": [
- {
- "fields": {
- "API name": "createUser"
}, - "key": "API name:createUser",
- "value": 10
}, - {
- "fields": {
- "API name": "updateCounter"
}, - "key": "API name:updateCounter",
- "value": 15
}
], - "id": "8a76066d-ff29-417c-a18e-abde22e44310",
- "meterKey": "a1f8797b-c827-4483-b6cf-6d3d3baa18a7",
- "meterMetaData": {
- "firstEvent": "2023-07-01T13:37:11.111Z",
- "lastEvent": "2023-07-05T22:01:04.431Z"
}, - "meterTypeId": "645ed240-02b5-400c-9a3c-21857e8f2ac4",
- "meterTypeName": "Usage based API counter",
- "periodEnd": "2023-08-01T00:00:00.000Z",
- "periodStart": "2023-07-01T00:00:00.000Z",
- "thresholds": [
- {
- "absoluteValue": 990,
- "name": "Threshold 1",
- "reachedAt": "2023-08-01T12:34:56.000Z"
}, - {
- "capacityPercentage": 70,
- "customFields": {
- "action": "alert",
- "notifyTeam": true,
- "severity": "high"
}, - "name": "Threshold 2"
}
], - "timezone": "Etc/UTC",
- "unit": "requests",
- "updatedAt": "2023-07-05T22:01:04.431Z",
- "userId": "user0@example.com",
- "value": 25
}Retrieves a paginated and sortable list of collectors associated with your account.
Rate Limits
Each client can make up to 1000 requests every 5m. The burst capacity is 100 requests.
| limit | integer Defines the number of collectors to be returned. A maximum of 100 items can be returned. |
| skip | integer Defines an offset for the collectors to be returned. If you set skip to 10, the first 10 collectors will be skipped in the returned list. |
| sortOrder | string Enum: "ASC" "DESC" Determines the sort order of the returned list. |
| sortBy | string Enum: "name" "status" "createdAt" "updatedAt" Determines the field in the collector by which the returned list will be sorted. |
| Authorization required | string Bearer token for authentication |
{- "collectors": [
- {
- "createdAt": "2023-07-01T00:00:00.000Z",
- "id": "8a76066d-ff29-417c-a18e-abde22e44310",
- "name": "Example collector 1",
- "status": "ACTIVE",
- "updatedAt": "2023-07-05T22:01:04.431Z"
}
], - "limit": 25,
- "skip": 0,
- "total": 150
}Creates a new collector for your account. Each account may have up to five collectors.
Rate Limits
Each client can make up to 5 requests every 5s. The burst capacity is 1 requests.
| Authorization required | string Bearer token for authentication |
| name required | string [ 1 .. 50 ] characters |
{- "name": "Example collector 1"
}{- "createdAt": "2023-07-01T00:00:00.000Z",
- "id": "8a76066d-ff29-417c-a18e-abde22e44310",
- "name": "Collector Name",
- "status": "ACTIVE",
- "updatedAt": "2023-07-05T22:01:04.431Z"
}Removes the specified collector from your account.
Rate Limits
Each client can make up to 5 requests every 5s. The burst capacity is 1 requests.
| id required | string The collector ID. A unique ID used to group and store all usage records. |
| Authorization required | string Bearer token for authentication |
{- "deletedCount": 1
}Retrieves details for a specific collector by its unique identifier.
Rate Limits
Each client can make up to 1000 requests every 5m. The burst capacity is 100 requests.
| id required | string The collector ID. A unique ID used to group and store all usage records. |
| Authorization required | string Bearer token for authentication |
{- "createdAt": "2023-07-01T00:00:00.000Z",
- "id": "8a76066d-ff29-417c-a18e-abde22e44310",
- "name": "Collector Name",
- "status": "ACTIVE",
- "updatedAt": "2023-07-05T22:01:04.431Z"
}Updates the specified collector's properties. Only the name field can be modified.
Rate Limits
Each client can make up to 5 requests every 5s. The burst capacity is 1 requests.
| id required | string The collector ID. A unique ID used to group and store all usage records. |
| Authorization required | string Bearer token for authentication |
| name | string [ 1 .. 50 ] characters The new name for the collector |
{- "name": "Updated Collector Name"
}{- "createdAt": "2023-07-01T00:00:00.000Z",
- "id": "8a76066d-ff29-417c-a18e-abde22e44310",
- "name": "Collector Name",
- "status": "ACTIVE",
- "updatedAt": "2023-07-05T22:01:04.431Z"
}Submits usage records to the online collection storage for the specified collector.
Rate Limits
Each client can make up to 300000 requests every 5m. The burst capacity is 1000 requests.
| id required | string The collector ID. A unique ID used to group and store all usage records. |
| Authorization required | string Bearer token for authentication |
required | string or object |
{- "data": {
- "key": "value"
}
}{- "ingestionId": "645ed240-02b5-400c-9a3c-21857e8f2ac4"
}Exports the complete configuration of a stream, including all nodes (instantiated functions), edges (data flows), node groups, and optional annotations.
Rate Limits
Each client can make up to 5000 requests every 5m. The burst capacity is 100 requests.
| id required | string The unique identifier of the stream to export. |
| tag | string A version tag that identifies which version of the stream configuration to export. If not provided, the latest version will be returned. |
| Authorization required | string Bearer token for authentication |
{- "annotation": {
- "color": "blue",
- "text": "This is my example stream."
}, - "description": "Initial draft version",
- "edges": [
- {
- "config": { },
- "from": "d3ac8f10-9f8a-11f0-aecf-d383d406af6c",
- "id": "e0fac740-9f8a-11f0-aecf-d383d406af6c",
- "to": "d78d99d0-9f8a-11f0-aecf-d383d406af6c"
}, - {
- "config": { },
- "from": "d78d99d0-9f8a-11f0-aecf-d383d406af6c",
- "id": "e3cad730-9f8a-11f0-aecf-d383d406af6c",
- "output": "8812b101-c9ef-4824-9aee-5c0cfd2fc984",
- "to": "dacfa570-9f8a-11f0-aecf-d383d406af6c"
}
], - "name": "My Stream",
- "nodeGroups": [
- {
- "annotation": {
- "color": "blue",
- "text": "Responsible for collecting and validating input records."
}, - "id": "4d8ad4e0-9f8b-11f0-aecf-d383d406af6c",
- "name": "Collect and Validate",
- "nodeIds": [
- "d3ac8f10-9f8a-11f0-aecf-d383d406af6c",
- "d78d99d0-9f8a-11f0-aecf-d383d406af6c"
]
}
], - "nodes": [
- {
- "id": "d3ac8f10-9f8a-11f0-aecf-d383d406af6c",
- "name": "Count",
- "params": {
- "max": 10
}, - "schemaVersion": 2,
- "type": "readers/counter",
- "x": 700,
- "y": 200
}, - {
- "id": "d78d99d0-9f8a-11f0-aecf-d383d406af6c",
- "name": "Validate",
- "params": {
- "multiOutput": {
- "fixed": {
- "valid": {
- "id": "8812b101-c9ef-4824-9aee-5c0cfd2fc984"
}
}
}, - "schema": {
- "properties": {
- "value": {
- "multipleOf": 2
}
}, - "required": [ ]
}, - "suspenseManagement": {
- "abortOnDisabled": false,
- "enabled": true,
- "eventThreshold": 10000,
- "onThresholdExceeded": "ABORT",
- "resetOnValidEvent": true
}
}, - "schemaVersion": 1,
- "type": "transforms/validate",
- "x": 900,
- "y": 200
}, - {
- "id": "dacfa570-9f8a-11f0-aecf-d383d406af6c",
- "name": "Log",
- "params": { },
- "schemaVersion": 1,
- "type": "writers/log",
- "x": 1100,
- "y": 200
}
], - "tag": "v1.0"
}Retrieves a list of all available versions for a specific stream.
Rate Limits
Each client can make up to 5000 requests every 5m. The burst capacity is 100 requests.
| id required | string The unique identifier of the stream. |
| skip | integer The number of stream versions to skip before starting to return results. Use for pagination. |
| limit | integer The maximum number of stream versions to return. Use for pagination. The maximum allowed value is 100. |
| Authorization required | string Bearer token for authentication |
{- "versions": [
- {
- "createdAt": "2025-10-08T13:50:19.464Z",
- "createdBy": "d3ac8f10-9f8a-11f0-aecf-d383d406af6c",
- "description": "Latest untagged version",
- "tag": null
}, - {
- "createdAt": "2025-10-08T13:50:09.624Z",
- "createdBy": "d3ac8f10-9f8a-11f0-aecf-d383d406af6c",
- "description": "Patched draft version",
- "tag": "1.1"
}, - {
- "createdAt": "2025-10-08T13:39:58.262Z",
- "createdBy": "d3ac8f10-9f8a-11f0-aecf-d383d406af6c",
- "description": "Initial draft version",
- "tag": "1.0"
}
]
}Retrieves a session by calculating its session key from the provided fieldValues, which must be in the same order as the fields defined in your Script aggregator configuration. This endpoint enables direct lookup of a session in the specified aggregation store without pagination.
How it works:
The API uses the values you provide (in the correct order) to generate a unique session key, just like your script aggregation function does. It then looks up and returns the session that matches this key.
Tip: Before using this endpoint, make sure your values match the field order in your Script aggregator function configuration.
Rate Limits
Each client can make up to 10000 requests every 5m. The burst capacity is 1000 requests.
| id required | string The unique identifier of the aggregation store in which to search for the session. Required to scope the lookup to the correct store. |
| fieldValues required | string Array of values, in the same order as the fields defined in your script aggregation function configuration, used to generate the session key. Example: |
| Authorization required | string Bearer token for authentication |
{- "createdAt": "2025-10-27T14:04:31.648Z",
- "data": {
- "location": "Stockholm",
- "name": "bob.jones",
- "subscription": "Basic",
- "usage": 255
}, - "meta": {
- "count": 14,
- "firstEvent": "2025-10-27T14:04:31.510Z",
- "lastEvent": "2025-10-27T16:00:17.645Z"
}, - "timeoutAt": "2025-10-28T16:00:17.645Z",
- "updatedAt": "2025-10-27T16:00:17.809Z"
}