REST API
TPOSS REST API enables secure, RESTful access to subscriber management, charging accounts, balances, sessions, and event data. It provides support for JSON requests and responses, advanced filtering, and sorting.
Query parameters
Each endpoint requires the ApiKey query parameter, which is described in the API overview document. Some of the endpoints additionally support the following query parameters:
LimitOffsetSortFilterFields
These parameters work the same way as the JSON-RPC 2.0 API parameters.
The session list endpoints support one more query parameter - IncludeAffectedCount. If it is set to true, the response contains the TotalEntriesAffectedByFilter field with the total number of sessions matched by the given filter, regardless of the Limit and Offset values. By default, it is set to false.
Common error scenarios
If a request fails, the response body contains the ErrorCode and ErrorMessage fields. For example:
Despite each endpoint may have its own set of possible errors, all the endpoints share common error scenarios:
401 Not authenticated- the request does not contain theApiKeyquery parameter, or its value can't be verified400 Bad request- the request contains an invalid list query, for example, an unknown field in theFilterorSortparameter.404 Not found- the object addressed by the request does not exist. The returned error code depends on the object type. For example, the-31401error code is returned for a subscriber, and the-31601error code is returned for a CDR.
All the possible errors related to a particular endpoint are described in the API specification below.