API overview
TPOSS provides two types of API:
- TPOSS REST API to manage UDR, CCS, and PCS and HSS data
- JSON-RPC 2.0 APIOpens in a new tab to manage only UDR, CCS, and PCS data
Both APIs require authentication. For details, see the section below.
Authentication
TPOSS APIs are authenticated based on secret API keys that TPOSS clients send in the API requests. Such a key must be configured in the TPOSS API server configuration by a TPOSS operator using the following configuration option:
The tposs_http_api.secret_keys is a list of the authentication keys separated by a comma. Each key consists of the FeId and the AuthKey parts split by a dash. For example, in clientid-secret, the clientid is FeId and the secret is AuthKey.
How a client passes such a key depends on the API it uses:
- The REST API expects the complete key in the
ApiKeyquery parameter of each request. For example:ApiKey=clientid-secret. - The JSON-RPC 2.0 API expects the
AuthKeyfield and theFeIdfield in theparamsobject of each request.
If the client does not provide the key or provides a value that is unknown for TPOSS, TPOSS returns the -33333 Not authenticated error.
After you configure TPOSS with the given API authentication keys, you must share the keys with the client so that it can use these keys for API requests. This procedure is out-of-band and not handled by the authentication API itself. Once an authentication key is obtained, a client can use it for authenticated API requests. All the TPOSS API methods require an authentication key to be passed along with the other parameters.