ListCodeReviews

Updated at:

Lists code reviews with pagination.

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

dataworks:ListCodeReviews

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ProjectId

integer

Yes

The workspace ID.

23620

Status

string

No

The review status.

Valid values:

  • Cancelled :

    Cancelled.

  • Rejected :

    Rejected.

  • Accepted :

    Accepted.

  • Reviewing :

    Reviewing.

Reviewing

Creator

string

No

The account ID of the submitter.

209000000000000002

Reviewer

string

No

The account ID of the specified reviewer for an exact match.

209000000000000001

PageNumber

integer

No

The page number. Pages start from 1. Default value: 1.

1

PageSize

integer

No

The number of entries per page. Default value: 10. Maximum value: 100.

10

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

request-id

PagingInfo

object

The pagination information.

TotalCount

integer

The total number of entries.

1

PageSize

integer

The number of entries per page.

10

PageNumber

integer

The page number.

1

CodeReviews

array<object>

The list of code reviews.

object

Id

string

The unique identifier of the review.

review-id

RegionId

string

The region ID.

cn-shanghai

ProjectId

integer

The workspace ID.

23620

ObjectId

string

The ID of the root review object.

8600000000000000001

ObjectName

string

The name of the root review object.

sales_workflow

ObjectType

string

The root object type.

WorkflowDefinition

Command

string

The node command of the root object.

WORKFLOW

Creator

string

The account ID of the actual submitter.

209000000000000002

Reviewers

array

The list of account IDs of the specified reviewers.

string

The account ID of the specified reviewer.

209000000000000001

FinalReviewer

string

The account ID of the final reviewer. This value is empty if the review has not been approved.

209000000000000001

Status

string

The review status.

Valid values:

  • Cancelled :

    Cancelled.

  • Rejected :

    Rejected.

  • Accepted :

    Accepted.

  • Reviewing :

    Reviewing.

Reviewing

Description

string

The review description provided at creation.

Code review

CreateTime

integer

The creation time as a timestamp in milliseconds.

1793145600000

ModifyTime

integer

The modification time as a timestamp in milliseconds.

1793145600000

ReviewTime

integer

The review time. This value is empty if the review has not been approved. The value is a 13-digit UNIX timestamp in milliseconds.

1793145660000

Examples

Success response

JSON format

{
  "RequestId": "request-id",
  "PagingInfo": {
    "TotalCount": 1,
    "PageSize": 10,
    "PageNumber": 1,
    "CodeReviews": [
      {
        "Id": "review-id",
        "RegionId": "cn-shanghai",
        "ProjectId": 23620,
        "ObjectId": "8600000000000000001",
        "ObjectName": "sales_workflow",
        "ObjectType": "WorkflowDefinition",
        "Command": "WORKFLOW",
        "Creator": "209000000000000002",
        "Reviewers": [
          "209000000000000001"
        ],
        "FinalReviewer": "209000000000000001",
        "Status": "Reviewing",
        "Description": "Code review",
        "CreateTime": 1793145600000,
        "ModifyTime": 1793145600000,
        "ReviewTime": 1793145660000
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 MissingParameter The required parameter is not supplied.
400 InvalidParameter The specified parameter is invalid.
403 Forbidden.AccessDenied Request was denied due to access control.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.