Help Center/ CodeArts Build/ API Reference/ Task APIs/ Viewing the build task List of Users in a Project
Updated on 2023-12-06 GMT+08:00

Viewing the build task List of Users in a Project

Function

Viewing the build task List of Users in a Project

Calling Method

For details, see Calling APIs.

URI

GET /v3/{project_id}/jobs

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

CodeArts project ID, which is a string of 32 digits and lowercase letters.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

page_index

Yes

Integer

Page number, indicating that the query starts from this page. The value of page_index is greater than or equal to 0.

page_size

Yes

Integer

Number of items displayed on each page. The value of page_size is less than or equal to 100.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. Obtain the value by calling the IAM service interface. (value of X-Subject-Token in the response header). Global tenant tokens are not supported. Use a region-level token whose scope is project.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

jobs

Array of Job objects

Task list

total

Integer

Total number of queried tasks.

Table 5 Job

Parameter

Type

Description

id

String

Task ID

job_name

String

Task Name

job_creator

String

Indicates the task creator.

user_name

String

Username.

last_build_time

Number

Latest Execution Time

health_score

Integer

Health Score

source_code

String

Code Source

last_build_status

String

Latest Build Status

is_finished

Boolean

Ended or Not

disabled

Boolean

Disabled or Not

favorite

Boolean

Indicates whether the content has been added to favorites.

is_modify

Boolean

Indicates whether the user has the permission to modify tasks.

is_delete

Boolean

Indicates whether the user has the permission to delete tasks.

is_execute

Boolean

Indicates whether the user has the permission to execute the task.

is_copy

Boolean

Specifies whether you have the permission to copy tasks.

is_forbidden

Boolean

Indicates whether the user has the permission to disable tasks.

is_view

Boolean

Indicates whether the user has the permission to view tasks.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Status code: 401

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Status code: 403

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Status code: 404

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Example Requests

GET https://{endpoint}/v3/6ecbc5bac7c8442fb3d2563d53c13582/jobs?page_index=1&page_size=10

Example Responses

Status code: 200

OK

{
  "total" : 1,
  "jobs" : [ {
    "id" : "2a86c3c1ed18416399279fe6........",
    "job_name" : "demo",
    "job_creator" : "ae22fd035f354cfa8d82a3f1........",
    "user_name" : "test",
    "last_build_time" : 1608004535000,
    "health_score" : 75,
    "source_code" : "test",
    "last_build_status" : "blue",
    "is_finished" : true,
    "disabled" : true,
    "favorite" : true,
    "is_modify" : true,
    "is_delete" : true,
    "is_execute" : true,
    "is_copy" : true,
    "is_forbidden" : true,
    "is_view" : true
  } ]
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

Error Codes

See Error Codes.