AssignReviewer

Updated at:

Manually assign quality reviewers.

Operation description

You can manually assign files that have completed quality inspection to reviewers. Assignments can be made one file at a time or in batches:

Single-file assignment: Assign a specific file to a specified reviewer.

Batch assignment: Assign multiple filtered files to one or more reviewers. You can specify how many files each reviewer receives, or let the system distribute the files evenly among reviewers.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

sca:AssignReviewer

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

JsonStr

string

Yes

A complete JSON string. For details, see the following sections.

{"assignmentList":[{"taskId":"1C21CF1E-2917-4236-A046-20E37B293B69","fileId":"7981b466fd6a4c70a7065da159739a5b"},{"taskId":"0111DDBC-5F10-47E0-B7D4-7175F47D626F","fileId":"1814eeae3cff41e989e31ab547f07561"}],"assignments":[{"reviewer":"255746168704895558"},{"reviewer":"268370362815185444"}]}

BaseMeAgentId

integer

No

Workspace ID

123456

JsonStr parameter details

PropertyTypeRequiredDescription
assignmentListListNoList of files to assign. Files are assigned one by one. This field and searchParam cannot both be empty. If both are provided, assignmentList takes precedence. For details, see assignmentList structure
searchParamObjectNoFilter conditions. These match the request parameters of GetResult. Use them to select files for batch assignment.
assignmentsListNoReviewer information. Used during batch assignment to specify reviewers. For details, see Assignments structure

assignmentList structure

PropertyTypeRequiredDescription
taskIdStringYesTask ID of the file
fileIdStringYesFile ID
reviewerStringNoReviewer ID. Used only for single-file assignment.

Assignments structure

PropertyTypeRequiredDescription
reviewerStringYesReviewer ID
countStringNoNumber of files to assign. If empty, files are distributed evenly.

Request examples

1. Distribute multiple files evenly among multiple reviewers

{
        "assignmentList":[
            {
                "taskId":"1C21CF1E-2917-4236-A046-20E37B293B69",
                "fileId":"7981b466fd6a4c70a7065da159739a5b"
            },
            {
                "taskId":"0111DDBC-5F10-47E0-B7D4-7175F47D626F",
                "fileId":"1814eeae3cff41e989e31ab547f07561"
            }
        ],
        "assignments":[
            {
                "reviewer":"255746168704895558"
            },
            {
                "reviewer":"268370362815185444"
            }
        ]
}

2. Assign a specific number of files to each reviewer

Assign multiple files to multiple reviewers, specifying how many files each reviewer receives.

{
        "assignmentList":[
            {
                "taskId":"C97132A8-F0C5-4FA3-83C3-8C145CECB8C1",
                "fileId":"fae2f045162d459daa35f8ec5570c68e"
            },
            {
                "taskId":"1C21CF1E-2917-4236-A046-20E37B293B69",
                "fileId":"7981b466fd6a4c70a7065da159739a5b"
            },
            {
                "taskId":"0111DDBC-5F10-47E0-B7D4-7175F47D626F",
                "fileId":"1814eeae3cff41e989e31ab547f07561"
            }
        ],
        "assignments":[
            {
                "reviewer":"255746168704895558",
                "count":1
            },
            {
                "reviewer":"268370362815185444",
                "count":2
            }
        ]
}

3. Batch assign files using filter conditions

{
        "searchParam":{
            "dataType":1,
            "sourceType":0,
            "startTime":"2020-03-07 00:00:00",
            "endTime":"2020-03-13 23:59:59"
        },
        "assignments":[
            {
                "reviewer":"255746168704895558"
            },
            {
                "reviewer":"268370362815185444"
            }
        ]
}

4. Assign a single file

{
        "assignmentList":[
            {
                "taskId":"C97132A8-F0C5-4FA3-83C3-8C145CECB8C1",
                "fileId":"fae2f045162d459daa35f8ec5570c68e",
                "reviewer":"255746168704895558"
            }
        ]
}

Response elements

Element

Type

Description

Example

object

Code

string

Result code. 200 means success. Any other value means failure. Use this field to identify the cause of failure.

200

Message

string

Error details if the call fails. Returns successful if the call succeeds.

successful

RequestId

string

Request ID

82C91484-B2D5-4D2A-A21F-A6D73F4D55C6

Success

boolean

Indicates whether the request succeeded. true means success. false or null means failure.

true

Examples

Success response

JSON format

{
  "Code": "200",
  "Message": "successful",
  "RequestId": "82C91484-B2D5-4D2A-A21F-A6D73F4D55C6",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.