Reviewing Scripts
Function
This API is used to review a script.
Constraints
The script can be reviewed only when the reviewer has been specified during script creation and the script is in the to-be-reviewed state.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
 - If you are using identity policy-based authorization, the following identity policy-based permissions are required. 
    
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
coc:document:update
Write
document *
-
-
-
 
URI
POST /v1/job/scripts/{script_uuid}/action
| 
        Parameter  | 
      
        Mandatory  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|---|
| 
        script_uuid  | 
      
        Yes  | 
      
        String  | 
      
        Definition: UUID of the script to be reviewed. Constraints: UUID of the script returned when the script is created. Value range: N/A. Default value: N/A.  | 
     
Request Parameters
| 
        Parameter  | 
      
        Mandatory  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|---|
| 
        X-Auth-Token  | 
      
        Yes  | 
      
        String  | 
      
        Definition: Tenant token. Constraints: Tenant token obtained from IAM. Value range: N/A. Default value: N/A.  | 
     
| 
        x-project-id  | 
      
        No  | 
      
        String  | 
      
        Definition: The project ID. Constraints: Project ID corresponding to the region. Value range: N/A. Default value: N/A.  | 
     
| 
        x-user-profile  | 
      
        No  | 
      
        String  | 
      
        Definition: IAM 5.0 user information. Constraints: N/A. Value range: N/A. Default value: N/A.  | 
     
| 
        X-Language  | 
      
        No  | 
      
        String  | 
      
        Definition: Internationalization tag. zh-cn indicates Chinese, and en-us or no value indicates English. Constraints: zh-cn indicates Chinese, and en-us or no value indicates English. Value range: zh-cn and en-us Default value: N/A.  | 
     
| 
        Parameter  | 
      
        Mandatory  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|---|
| 
        status  | 
      
        Yes  | 
      
        String  | 
      
        Definition: Review status. Constraints: The value can be APPROVED or REJECTED. Value range: APPROVED or REJECTED. Default value: N/A.  | 
     
| 
        comments  | 
      
        No  | 
      
        String  | 
      
        Definition: Review comments. Constraints: N/A. Value range: N/A. Default value: N/A.  | 
     
Response Parameters
Status code: 200
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        data  | 
      
        Boolean  | 
      
        Definition: Review result. Value range: The value can be true or false.  | 
     
Example Requests
Approve the script.
POST https://{Endpoint}/v1/job/scripts/{script_uuid}/action
{
  "status" : "APPROVED",
  "comments" : "agree"
}
 Example Responses
Status code: 200
The review result is returned.
For more status codes, see Status Codes.
{
  "data" : true
}
 Status Codes
| 
        Status Code  | 
      
        Description  | 
     
|---|---|
| 
        200  | 
      
        The review result is returned. For more status codes, see Status Codes.  | 
     
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