Batch Saving, Modifying, and Deleting Authorization Records
Function
This API is used to save, modify, and delete specified self-developed authorization rule records in batches.
URI
POST /v1/{project_id}/authorization/cooperate-authorization/rules/batch-save
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For how to obtain the project ID, see Obtaining a Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Workspace-Id |
Yes |
String |
Workspace ID. For how to obtain it, see Obtaining a Workspace ID. |
X-Auth-Token |
Yes |
String |
User token. Obtain a user token by calling IAM's API. X-Subject-Token in the response header is the desired user token. For how to obtain a token, see Authentication. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
[Array element] |
Yes |
Array of CooperateAuthorizationRuleDto objects |
Authorization rules. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
auth_id |
No |
String |
User or user group ID of the authorization entity. |
auth_level |
No |
String |
Authorization entity level. The options include:
|
authority |
No |
String |
Permissions. The options include:
|
resource_id |
No |
String |
Resource ID. |
resource_type |
No |
String |
Explanation Enumerated value of the resource type, which is used to specify the type of the authorized object. For example, datasource indicates that the type of the authorized object is a data source. Constraints N/A Value range The enumerated values are:
Default value N/A |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
message |
String |
Message content of the general Message structure. |
Example Request
Save, modify, and delete specified self-developed authorization rule records in batches.
POST https://{endpoint}/v1/xxxx3ab4dac4055888643b331axxxx/authorization/cooperate-authorization/rules/batch-save [ { "auth_id" : "de9cb4xxxx4b0ba2887b80dc18d273", "auth_level" : "user", "authority" : "edit", "resource_id" : "d0d7919c-xxxx-462e-xxxx-da82bf8be44e", "resource_type" : "dashboard" }, { "auth_id" : "de9cb4axxxxa2887b80dc18d273", "auth_level" : "user", "authority" : "edit,export", "resource_id" : "d0d7919c-4e87-xxxx-xxxx-da82bf8be44e", "resource_type" : "dashboard" } ]
Example Response
The request is successful, and success is returned.
{ "message" : "success" }
Status Codes
Status Code |
Description |
---|---|
200 |
The request is successful, and success is returned. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot