Skip to main content

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

KeyDefault valueOptionsDescription
FLASK_APP./timbr_api_service/__init__.pyrelative or absoulte path inside the containerLocation of the timbr api service init script
FLASK_ENVdevelopmentdevelopment or productionThe environment for which the service is running
THRIFT_HOSTlocalhostLocal or Remote DNS or IPThe Timbr Server host name or ip
THRIFT_PORT11000Port numberThe Timbr server port

These environment variables are optional:

KeyDefault valueOptionsDescription
ALLOWED_CONFIG_ENVS_IN_APITIMBR_DB_DOMAINList of strings separated by commaA list of environment variables that can be retrieved by querying the get_config endpoint. For example: TIMBR_DB_DOMAIN,REDIS_HOST
TIMBR_DB_DOMAINTimbr Server JDBC URIA string representing the JDBC URI of the Timbr Server
TIMBR_DB_USERtokenToken or usernameThe 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 passwordMust be 12 astrix to be used with token based authentication.
API_AUTH_SALTxxxxxxxxxxxxxxAny string up to 128 charactersKey used to decrypt a base64 username/password combination for the get_token request to retrieve a user's token
REDIS_HOSTLocal or Remote DNS or IPThe host name of the Redis instance that stores the cache
REDIS_PORTPort numberThe port of the Redis instance that stores the cache
REDIS_DBValid string for a Redis DB nameThe DB name of the Redis instance that stores the cache
REDIS_AUTHValid string for a Redis PasswordThe 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