The method user/revoke_credentials revokes all S3 credentials belonging to a specific user. Users can revoke their own S3 credentials. Users with appropriate permissions can revoke other users' S3 credentials. You can use the method /user/list to look up the ID of the user whose credentials you want to revoke.
HTTP request syntax (URI)
POST https://host_ip:9099/mapi/v1/user/revoke_credentials
Request structure
The request body is:
{ "id": "uuid" }
Parameter | Required | Type | Description |
---|---|---|---|
id | Yes | UUID | The UUID of the user whose S3 credentials you are revoking. |
Response structure
The response body is:
{ "id": { "id": "uuid" }, "secretKey": "key", "accessKey": "key" }
Parameter |
Type |
Description |
---|---|---|
id | UUID | The ID of the user. |
secretKey | String | The secret key of the S3 credentials. |
accessKey | String | The access key of the S3 credentials. |
Return codes
Status code |
HTTP name |
Description |
---|---|---|
200 | OK | The request was executed successfully. |
400 | Bad Request | User ID is not valid. |
401 | Unauthorized | Access was denied because credentials are not valid. |
404 | Not Found | The user ID was not found. |
405 | Method Not Allowed | The specified HTTP method is not allowed for user data. Resend using POST. |
Example
Request example:
POST https://10.10.24.195:9099/mapi/v1/user/revoke_credentials
JSON request:
{ "id": "3fa85f64-1024-1954-b3fc-2c963f66afa6" }
JSON response:
{ "id": { "id": "3fa85f64-1024-1954-b3fc-2c963f66afa6" }, "secretKey": "bff...", "accessKey": "TSPl8Pop..." }