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 -koption, which allows you to specify an API key instead of reading the config file -
TREASURE_DATA_API_KEYenvironment variable -
TD_API_KEYenvironment variable -
TD_API_KEYin config file which path is specified bytd -coption -
TD_API_KEYin config file which path is specified byTREASURE_DATA_CONFIG_PATHenvironment variable -
TD_API_KEYin config file which path is specified byTD_CONFIG_PATHenvironment variable -
TD_API_KEYin config file locates at~/.td/td.conf
Search Order for the API Server
-
Specified on the command line by
td -eoption, which allows you to designate an endpoint -
TREASURE_DATA_API_SERVERenvironment variable -
TD_API_SERVERenvironment variable -
TD_API_SERVERin config file which path is specified bytd -coption -
TD_API_SERVERin config file which path is specified byTREASURE_DATA_CONFIG_PATHenvironment variable -
TD_API_SERVERin config file which path is specified byTD_CONFIG_PATHenvironment variable -
TD_API_SERVERin config file locates at~/.td/td.conf