API Key and API Server Search Order Reference
If you discover you can’t access a database you think you ought to have access to, check that you’re in the correct environment and using the correct API key. You can verify the td config and environmental variables are consistent with the API key and endpoint you need to access using the appropriate commands for your operating system. With correct permissions, the inability to access a specific database could happen for various reasons. To help determine the reason, it’s helpful to understand the order in which TD Toolbelt searches for the API key and API server:
Search Order for the API Key
-
Specified on the command line by
td -k
option, which allows you to specify an API key instead of reading the config file -
TREASURE_DATA_API_KEY
environment variable -
TD_API_KEY
environment variable -
TD_API_KEY
in config file which path is specified bytd -c
option -
TD_API_KEY
in config file which path is specified byTREASURE_DATA_CONFIG_PATH
environment variable -
TD_API_KEY
in config file which path is specified byTD_CONFIG_PATH
environment variable -
TD_API_KEY
in config file locates at~/.td/td.conf
Search Order for the API Server
-
Specified on the command line by
td -e
option, which allows you to designate an endpoint -
TREASURE_DATA_API_SERVER
environment variable -
TD_API_SERVER
environment variable -
TD_API_SERVER
in config file which path is specified bytd -c
option -
TD_API_SERVER
in config file which path is specified byTREASURE_DATA_CONFIG_PATH
environment variable -
TD_API_SERVER
in config file which path is specified byTD_CONFIG_PATH
environment variable -
TD_API_SERVER
in config file locates at~/.td/td.conf