Setting Pipeline Resource-Level Permissions for Different Roles
Function
This API is used to set pipeline resource-level permissions for different roles.
Calling Method
For details, see Calling APIs.
URI
POST /v5/{project_id}/api/pipeline-permissions/pipeline/batch-role-permission
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition: Project ID. For details, see Obtaining a Project ID. Constraints: N/A Value range: The value consists of 32 characters, including digits and letters. Default value: N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
pipeline_ids |
Yes |
Array of strings |
Pipeline ID list. |
is_project_switch |
Yes |
Boolean |
Whether to enable project permission configuration. |
roles |
Yes |
Array of roles objects |
Role details list. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
operation_authorize |
Yes |
Boolean |
Permission configuration permissions. |
operation_delete |
Yes |
Boolean |
Permission to delete. |
operation_execute |
Yes |
Boolean |
Permission to execute. |
operation_query |
Yes |
Boolean |
Permission to query. |
operation_update |
Yes |
Boolean |
Permission to update. |
role_id |
Yes |
Integer |
Role ID. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
status |
String |
Definition: Response status. Value range: N/A |
Example Requests
POST https://(endpoint)/v5/071112d87d3e4ed49130c691936202e9/api/pipeline-permissions/pipeline/batch-role-permission { "pipeline_ids" : [ "53acae73a3f44b2994f9b20a710721c6", "146542db758a4dc0995b44dff13e1933" ], "is_project_switch" : false, "roles" : [ { "operation_authorize" : false, "operation_delete" : true, "operation_execute" : true, "operation_query" : true, "operation_update" : true, "role_id" : 3 }, { "operation_authorize" : false, "operation_delete" : false, "operation_execute" : true, "operation_query" : true, "operation_update" : false, "role_id" : 4 }, { "operation_authorize" : false, "operation_delete" : false, "operation_execute" : true, "operation_query" : true, "operation_update" : false, "role_id" : 5 }, { "operation_authorize" : false, "operation_delete" : false, "operation_execute" : false, "operation_query" : true, "operation_update" : false, "role_id" : 6 }, { "operation_authorize" : false, "operation_delete" : true, "operation_execute" : true, "operation_query" : true, "operation_update" : true, "role_id" : 7 }, { "operation_authorize" : false, "operation_delete" : false, "operation_execute" : false, "operation_query" : true, "operation_update" : false, "role_id" : 8 }, { "operation_authorize" : false, "operation_delete" : false, "operation_execute" : false, "operation_query" : true, "operation_update" : false, "role_id" : 9 } ] }
Example Responses
Status code: 200
Response body.
{ "status" : "success" }
Status Codes
Status Code |
Description |
---|---|
200 |
Response body. |
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