Revokes (soft-destroys) a sub user and every credential it holds: its API keys are deleted, and its OAuth access tokens, refresh tokens and unexchanged authorization codes are revoked.
It does not work the other way round: deleting one of a sub user's API keys leaves the sub user and its other credentials alone. Revoking one of its OAuth tokens does deactivate it, because a sub user exists for one authorization -- see POST /oauth_token/remove/{oauth_token_id}.
An administrator may revoke any sub user in the account; a non-administrator only their own. Sub users themselves are refused entirely.
Security
ApiKeyAuth
- https://api.treasuredata.com/v3https://api.treasuredata.com/v3/sub_user/remove/{sub_user_id}
- https://api.treasuredata.co.jp/v3https://api.treasuredata.co.jp/v3/sub_user/remove/{sub_user_id}
- https://api.ap02.treasuredata.com/v3https://api.ap02.treasuredata.com/v3/sub_user/remove/{sub_user_id}
- https://api.eu01.treasuredata.com/v3https://api.eu01.treasuredata.com/v3/sub_user/remove/{sub_user_id}
curl -i -X POST \
https://api.treasuredata.com/v3/sub_user/remove/123 \
-H 'Authorization: TD1 <YOUR_TOKEN_HERE>'Response
{ "sub_user": { "id": 123, "email": "string" } }