Databases

Get databases

Retrieves a list of databases.

Request
Security:
ApiKeyAuth
query Parameters
require_permissions
stringtrue
Responses
200

OK

get/database/list
Request samples
curl -i -X GET \
  https://api.treasuredata.com/v3/database/list \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "databases": [
    ]
}

Get database

Retrieves a specified database.

Request
Security:
ApiKeyAuth
path Parameters
database_name
required
string

database name

Example: Alpha
query Parameters
require_permissions
stringtrue
Responses
200

OK

get/database/show/{database_name}
Request samples
curl -i -X GET \
  'https://api.treasuredata.com/v3/database/show/{database_name}' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "count": 5,
  • "created_at": "2020-12-31 11:22:33 UTC",
  • "delete_protected": true,
  • "datatank": true,
  • "id": "7",
  • "name": "Alpha",
  • "organization": "Treasure Data",
  • "permission": "string",
  • "database_permissions": {
    },
  • "updated_at": "2020-12-31 11:22:33 UTC"
}

Create database

Creates a database.

Request
Security:
ApiKeyAuth
path Parameters
database_name
required
string

database name

Example: Alpha
Responses
200

OK

post/database/create/{database_name}
Request samples
curl -i -X POST \
  'https://api.treasuredata.com/v3/database/create/{database_name}' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "database": "Alpha"
}

Delete database

Deletes a specified database.

Request
Security:
ApiKeyAuth
path Parameters
database_name
required
string

database name

Example: Alpha
Responses
200

OK

post/database/delete/{database_name}
Request samples
curl -i -X POST \
  'https://api.treasuredata.com/v3/database/delete/{database_name}' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "database": "Alpha"
}
Support
Copyright © 2021 Treasure Data, Inc. (or its affiliates). All rights reserved.