Skip to content

Treasure Data API (3)

Download OpenAPI description
Languages
Servers

https://api.treasuredata.com/v3/

https://api.treasuredata.co.jp/v3/

https://api.ap02.treasuredata.com/v3/

https://api.eu01.treasuredata.com/v3/

Access Control - Policies

Operations

get Access Control Policies

Request

Retrieves a list of policies.

Security
ApiKeyAuth
Query
column_permission_tagstring

Return only policies that refer to the specified tag

curl -i -X GET \
  'https://api.treasuredata.com/v3/access_control/policies?column_permission_tag=string' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/jsonArray [
idinteger(AccessControlPolicyId)required
Example: 67
account_idinteger(AccountId)required
Example: 123
namestringrequired

Policy's name

Example: "some_policy"
descriptionstring

Policy's description

Example: "written about the policy"
user_countinteger

The number of users which the policy attaches to

Example: 3
]
Response
application/json
[ { "id": 67, "account_id": 123, "name": "some_policy", "description": "written about the policy", "user_count": 3 } ]

Create an Access Control Policy

Request

Creates a policy.

Security
ApiKeyAuth
Bodyapplication/json
policyobjectrequired
policy.​namestringrequired

Policy's name

Example: "some_policy"
policy.​descriptionstring

Policy's description

Example: "written about the policy"
curl -i -X POST \
  https://api.treasuredata.com/v3/access_control/policies \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "policy": {
      "name": "some_policy",
      "description": "written about the policy"
    }
  }'

Responses

OK

Bodyapplication/json
idinteger(AccessControlPolicyId)required
Example: 67
account_idinteger(AccountId)required
Example: 123
namestringrequired

Policy's name

Example: "some_policy"
descriptionstring

Policy's description

Example: "written about the policy"
user_countinteger

The number of users which the policy attaches to

Example: 3
Response
application/json
{ "id": 67, "account_id": 123, "name": "some_policy", "description": "written about the policy", "user_count": 3 }

Get an Access Control Policy

Request

Retrieves information about the specified policy.

Security
ApiKeyAuth
Path
policy_idinteger(AccessControlPolicyId)required
Example: 67
curl -i -X GET \
  https://api.treasuredata.com/v3/access_control/policies/67 \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
idinteger(AccessControlPolicyId)required
Example: 67
account_idinteger(AccountId)required
Example: 123
namestringrequired

Policy's name

Example: "some_policy"
descriptionstring

Policy's description

Example: "written about the policy"
user_countinteger

The number of users which the policy attaches to

Example: 3
Response
application/json
{ "id": 67, "account_id": 123, "name": "some_policy", "description": "written about the policy", "user_count": 3 }

Update an Access Control Policy

Request

Updates information related to a policy.

Security
ApiKeyAuth
Path
policy_idinteger(AccessControlPolicyId)required
Example: 67
Bodyapplication/json
policyobjectrequired
policy.​namestring

Policy's name

Example: "some_policy"
policy.​descriptionstring

Policy's description

Example: "written about the policy"
curl -i -X PATCH \
  https://api.treasuredata.com/v3/access_control/policies/67 \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "policy": {
      "name": "some_policy",
      "description": "written about the policy"
    }
  }'

Responses

OK

Bodyapplication/json
idinteger(AccessControlPolicyId)required
Example: 67
account_idinteger(AccountId)required
Example: 123
namestringrequired

Policy's name

Example: "some_policy"
descriptionstring

Policy's description

Example: "written about the policy"
user_countinteger

The number of users which the policy attaches to

Example: 3
Response
application/json
{ "id": 67, "account_id": 123, "name": "some_policy", "description": "written about the policy", "user_count": 3 }

Delete an Access Control Policy

Request

Deletes a policy.

Security
ApiKeyAuth
Path
policy_idinteger(AccessControlPolicyId)required
Example: 67
curl -i -X DELETE \
  https://api.treasuredata.com/v3/access_control/policies/67 \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
idinteger(AccessControlPolicyId)required
Example: 67
account_idinteger(AccountId)required
Example: 123
namestringrequired

Policy's name

Example: "some_policy"
descriptionstring

Policy's description

Example: "written about the policy"
user_countinteger

The number of users which the policy attaches to

Example: 3
Response
application/json
{ "id": 67, "account_id": 123, "name": "some_policy", "description": "written about the policy", "user_count": 3 }

get User Policies

Request

Retrieves a list of policies by user.

Security
ApiKeyAuth
Path
user_idinteger(UserId)required
Example: 123
curl -i -X GET \
  https://api.treasuredata.com/v3/access_control/users/123/policies \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/jsonArray [
idinteger(AccessControlPolicyId)required
Example: 67
account_idinteger(AccountId)required
Example: 123
namestringrequired

Policy's name

Example: "some_policy"
descriptionstring

Policy's description

Example: "written about the policy"
user_countinteger

The number of users which the policy attaches to

Example: 3
]
Response
application/json
[ { "id": 67, "account_id": 123, "name": "some_policy", "description": "written about the policy", "user_count": 3 } ]

Update User Policies

Request

Updates policies by user ID.

Security
ApiKeyAuth
Path
user_idinteger(UserId)required
Example: 123
Bodyapplication/json
policy_idsArray of stringsrequired
Example: ["1","2","42"]
curl -i -X PATCH \
  https://api.treasuredata.com/v3/access_control/users/123/policies \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "policy_ids": [
      "1",
      "2",
      "42"
    ]
  }'

Responses

OK

Bodyapplication/jsonArray [
idinteger(AccessControlPolicyId)required
Example: 67
account_idinteger(AccountId)required
Example: 123
namestringrequired

Policy's name

Example: "some_policy"
descriptionstring

Policy's description

Example: "written about the policy"
user_countinteger

The number of users which the policy attaches to

Example: 3
]
Response
application/json
[ { "id": 67, "account_id": 123, "name": "some_policy", "description": "written about the policy", "user_count": 3 } ]

Attach a policy to a user.

Request

Attaches a policy to a user.

Security
ApiKeyAuth
Path
user_idinteger(UserId)required
Example: 123
policy_idinteger(AccessControlPolicyId)required
Example: 67
curl -i -X POST \
  https://api.treasuredata.com/v3/access_control/users/123/policies/67 \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
idinteger(AccessControlPolicyId)required
Example: 67
account_idinteger(AccountId)required
Example: 123
namestringrequired

Policy's name

Example: "some_policy"
descriptionstring

Policy's description

Example: "written about the policy"
user_countinteger

The number of users which the policy attaches to

Example: 3
Response
application/json
{ "id": 67, "account_id": 123, "name": "some_policy", "description": "written about the policy", "user_count": 3 }

Detach a Policy from a User

Request

Detaches a policy from a user.

Security
ApiKeyAuth
Path
user_idinteger(UserId)required
Example: 123
policy_idinteger(AccessControlPolicyId)required
Example: 67
curl -i -X DELETE \
  https://api.treasuredata.com/v3/access_control/users/123/policies/67 \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
idinteger(AccessControlPolicyId)required
Example: 67
account_idinteger(AccountId)required
Example: 123
namestringrequired

Policy's name

Example: "some_policy"
descriptionstring

Policy's description

Example: "written about the policy"
user_countinteger

The number of users which the policy attaches to

Example: 3
Response
application/json
{ "id": 67, "account_id": 123, "name": "some_policy", "description": "written about the policy", "user_count": 3 }

Attach

Request

This operation attaches a policy to a user.

Security
ApiKeyAuth
Path
policy_idinteger(AccessControlPolicyId)required
Example: 67
user_idinteger(UserId)required
Example: 123
curl -i -X POST \
  https://api.treasuredata.com/v3/access_control/policies/67/users/123 \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
idinteger(AccessControlPolicyId)required
Example: 67
account_idinteger(AccountId)required
Example: 123
namestringrequired

Policy's name

Example: "some_policy"
descriptionstring

Policy's description

Example: "written about the policy"
user_countinteger

The number of users which the policy attaches to

Example: 3
Response
application/json
{ "id": 67, "account_id": 123, "name": "some_policy", "description": "written about the policy", "user_count": 3 }

Detach

Request

Detaches a user from a policy.

Security
ApiKeyAuth
Path
policy_idinteger(AccessControlPolicyId)required
Example: 67
user_idinteger(UserId)required
Example: 123
curl -i -X DELETE \
  https://api.treasuredata.com/v3/access_control/policies/67/users/123 \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
idinteger(AccessControlPolicyId)required
Example: 67
account_idinteger(AccountId)required
Example: 123
namestringrequired

Policy's name

Example: "some_policy"
descriptionstring

Policy's description

Example: "written about the policy"
user_countinteger

The number of users which the policy attaches to

Example: 3
Response
application/json
{ "id": 67, "account_id": 123, "name": "some_policy", "description": "written about the policy", "user_count": 3 }

Access Control - Permissions

Operations

Access Control - Users

Operations

Access Control - Policy Groups

Operations

Connections

Operations

Databases

Operations

Jobs

Operations

Tables

Operations

Policy Group Tags

Operations

Schedules

Operations

Users

Operations