ListMergeRequestFilesReads

Updated at:

Retrieves a list of users who have read the changed files in a merge request.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

GET /api/v4/projects/merge_requests/diffs/files_read_infos HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

organizationId

string

Yes

The ID of the organization. You can find this ID in your Alibaba Cloud DevOps URL, for example, https://devops.aliyun.com/organization/[organizationId].

60de7a6852743a5162b5f957

accessToken

string

No

The personal access token. This parameter is not required if you authenticate using an Alibaba Cloud AccessKey pair (AK/SK) or temporary credentials from the Security Token Service (STS).

agp_4d57a6796b3626f52064ab1fba5384a5

repositoryIdentity

string

Yes

The ID or full path of the repository.

2835387 或 codeup/codeup-demo

localId

integer

Yes

The sequential ID of the merge request within the repository.

5

fromPatchSetBizId

string

Yes

The business ID of the patch set for the target branch.

Note

In APIs for merge requests and comparisons, the from and to parameters can be counter-intuitive: from is the target branch and to is the source branch. This order matches the Git execution sequence. The UI reverses these terms for clarity.

5e733626d53f4b04a6aa0e23d4ff72b8

toPatchSetBizId

string

Yes

The business ID of the patch set for the source branch.

Note

In APIs for merge requests and comparisons, the from and to parameters can be counter-intuitive: from is the target branch and to is the source branch. This order matches the Git execution sequence. The UI reverses these terms for clarity.

513fcfd81a9142d2bb0db4f72c0aa15b

Response elements

Element

Type

Description

Example

object

The response object.

requestId

string

The request ID.

ASSDS-ASSASX-XSAXSA-XSAXSAXS

success

boolean

Indicates whether the request was successful.

true

errorCode

string

The error code.

SYSTEM_UNKNOWN_ERROR

errorMessage

string

The error message.

""

result

array<object>

The list of results.

array<object>

The read status of each changed file.

oldFilePath

string

The old file path.

text.txt

newFilePath

string

The new file path.

text.txt

newFile

boolean

Indicates whether it is a new file.

true

renamedFile

string

Indicates whether the file was renamed.

false

deletedFile

string

Indicates whether the file was deleted.

false

readUsers

array<object>

The list of users who have read the file.

object

User information.

aliyunPk

string

The Alibaba Cloud account ID.

204485087002425236

name

string

The user's name.

codeup

username

string

The user's username.

test-codeup

state

string

The user's state.

  • active: The user is active.

  • blocked: The user is blocked.

active

avatarUrl

string

The user's avatar URL.

https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c3f67f1bea827c4/w/100/h/100

email

string

The user's email address.

username@example.com

Examples

Success response

JSON format

{
  "requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
  "success": true,
  "errorCode": "SYSTEM_UNKNOWN_ERROR",
  "errorMessage": "\"\"",
  "result": [
    {
      "oldFilePath": "text.txt",
      "newFilePath": "text.txt",
      "newFile": true,
      "renamedFile": "false",
      "deletedFile": "false",
      "readUsers": [
        {
          "aliyunPk": "204485087002425236",
          "name": "codeup",
          "username": "test-codeup",
          "state": "active",
          "avatarUrl": "https://tcs-devops.aliyuncs.com/thumbnail/112afcb7a6a35c3f67f1bea827c4/w/100/h/100",
          "email": "username@example.com"
        }
      ]
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.