Timbr API Service
The Timbr API Service is run in a Kubernetes container and can have different configuration flags to be passed down as environment variables.
Environment Variables
The following environment variables are required to run the Timbr API Service
Key | Default value | Options | Description |
---|---|---|---|
FLASK_APP | ./timbr_api_service/__init__.py | relative or absoulte path inside the container | Location of the timbr api service init script |
FLASK_ENV | development | development or production | The environment for which the service is running |
THRIFT_HOST | localhost | Local or Remote DNS or IP | The Timbr Server host name or ip |
THRIFT_PORT | 11000 | Port number | The Timbr server port |
These environment variables are optional:
Key | Default value | Options | Description |
---|---|---|---|
ALLOWED_CONFIG_ENVS_IN_API | TIMBR_DB_DOMAIN | List of strings separated by comma | A list of environment variables that can be retrieved by querying the get_config endpoint. For example: TIMBR_DB_DOMAIN,REDIS_HOST |
TIMBR_DB_DOMAIN | Timbr Server JDBC URI | A string representing the JDBC URI of the Timbr Server | |
TIMBR_DB_USER | token | Token or username | The username or token for authenticating with the Timbr Server. Needs to be token for token based authentication. If another username is provided, the Timbr API Service becomes public |
TIMBR_DB_PASSWORD | ************ | Astrix or user password | Must be 12 astrix to be used with token based authentication. |
API_AUTH_SALT | xxxxxxxxxxxxxx | Any string up to 128 characters | Key used to decrypt a base64 username/password combination for the get_token request to retrieve a user's token |
REDIS_HOST | Local or Remote DNS or IP | The host name of the Redis instance that stores the cache | |
REDIS_PORT | Port number | The port of the Redis instance that stores the cache | |
REDIS_DB | Valid string for a Redis DB name | The DB name of the Redis instance that stores the cache | |
REDIS_AUTH | Valid string for a Redis Password | The password for the Redis instance that stores the cache |
The API_AUTH_SALT flag
The use of the API_AUTH_SALT
flag is used only for authenticating to get an API token.
The process is further explained in Timbr API Requirements