For AI agents: this documentation is indexed for you in llms.txt, and all of it in /llms.txt. Every page is also available as markdown: append .md to its address.

API overview

TPOSS provides two types of API:

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:

yaml

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 ApiKey query parameter of each request. For example: ApiKey=clientid-secret.
  • The JSON-RPC 2.0 API expects the AuthKey field and the FeId field in the params object 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.