ListCommitStatuses - List commit statuses

Updated at:

You can query commit status lists using OpenAPI. Paging is supported.

Applicable editions

Central edition, Region edition

Endpoint and authorization information

  • Obtain endpoints. You can replace {domain} in the API request syntax.
  • Obtain a personal access token.
  • To obtain the organizationId. This is required only for the Central edition. You can go to the Basic Information page in the Organization Management console to retrieve the organization ID.

Product

Resource

Required permissions

Code Management

Commit status

Read-only

Request syntax

Central edition

GET https://{domain}/oapi/v1/codeup/organizations/{organizationId}/repositories/{repositoryId}/commits/{sha}/statuses

Region edition

GET https://{domain}/oapi/v1/codeup/repositories/{repositoryId}/commits/{sha}/statuses

Request headers

Parameter

Type

Required

Description

Example value

x-yunxiao-token

string

Yes

Personal access token.

pt-0fh3****0fbG_35af****0484

Request parameters

Parameter

Type

Location

Required

Description

Example value

organizationId

string

path

  • Yes, the Central edition.

  • Region edition

Organization ID.

60d54f3daccf2bbd6659f3ad

repositoryId

string

path

Yes

Repository ID or the URL-encoded full path.

2813489 or 60de7a6852743a5162b5f957%2FDemoRepo

sha

string

path

Yes

Commit ID, which is the Commit SHA.

6da8c14b5a9102998148b7ea35f96507d5304f74

page

integer

query

No

Page number. The default value is 1. Do not exceed 150 pages.

1

perPage

integer

query

No

Number of entries per page. The default value is 20. Valid values are 1 to 100.

20

Request examples

Central edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/codeup/organizations/60d54f3daccf2bbd6659f3ad/repositories/2813489 or 60de7a6852743a5162b5f957%2FDemoRepo/commits/6da8c14b5a9102998148b7ea35f96507d5304f74/statuses?page=1&perPage=20' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/codeup/repositories/2813489 or 60de7a6852743a5162b5f957%2FDemoRepo/commits/6da8c14b5a9102998148b7ea35f96507d5304f74/statuses?page=1&perPage=20' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example value

-

array

-

object

author

object

Author information.

avatarUrl

string

Profile picture URL.

https://example/example/w/100/h/100

id

string

User ID.

62c795xxxb468af8

name

string

User name.

codeup-name

type

string

Author type: User - user; Bot - application (not yet available).

User

username

string

User logon name.

codeup-username

context

string

A string identity used to distinguish different systems. It is displayed as a title on the corresponding page. The length cannot exceed 50 characters. Do not set values randomly in formal use.

default-context

createdAt

string

Write time.

2024-10-05T15:30:45Z

description

string

Brief description. The length cannot exceed 3000 characters.

commit status description

id

integer

Primary key ID, with no business meaning.

1

sha

string

Commit ID, which is the Commit SHA.

6da8c14b5a9102998148b7ea35f96507d5304f74

state

string

Write status: error - abnormal; failure - failed; pending - running; success - successful.

success

targetUrl

string

The external link written by the user. The code platform provides a UI for redirection. You can set it to a third-party system link.

http://example.com/example

updatedAt

string

Update time.

2024-10-05T15:30:45Z

Response example

[
    {
        "author": {
            "avatarUrl": "https://example/example/w/100/h/100",
            "id": "62c795xxxb468af8",
            "name": "codeup-name",
            "type": "User",
            "username": "codeup-username"
        },
        "context": "default-context",
        "createdAt": "2024-10-05T15:30:45Z",
        "description": "commit status description",
        "id": 1,
        "sha": "6da8c14b5a9102998148b7ea35f96507d5304f74",
        "state": "success",
        "targetUrl": "http://example.com/example",
        "updatedAt": "2024-10-05T15:30:45Z"
    }
]

Response headers

Parameter

Description

Example value

x-next-page

Next page.

3

x-page

Current page.

2

x-per-page

Number of entries per page.

20

x-prev-page

Previous page.

1

x-request-id

Request ID.

37294673-00CA-5B8B-914F-A8B35511E90A

x-total

Total count.

50

x-total-pages

Total number of pages.

3

Error codes

You can access the error code center to view API error codes.