Skip to content
Last updated

Setting Your API Key and Endpoints

Secrets are objects that contain sensitive data. Secrets allow you to access Treasure Data and pass sensitive information into the Console without compromising security. To do this, you’ll need to set your API Key and endpoint. You can access your API Key from TD Console.

Prerequisites

Obtain your API Key and Endpoints

  1. Open the Console

  2. Select My Settings > API Keys

  1. Copy your API Key

  1. Select the appropriate endpoint.
    For example: https://api-workflow.us01.treasuredata.com

Set your API Key and Endpoint using the CLI

  1. Open the terminal.

  2. Open your workflow directory.

cd /users/<yourname>/mydirectory
  1. Pass Secrets into the CLI using --project and --set commands to designate the project and set the API Key and endpoint.
td wf secrets --project my_project --set apikey=1234565/abcdefghijklmnopqrstu --endpoint=https://api-workflow.treasuredata.com

The terminal displays the following results: