Help Center/ CodeArts Req/ API Reference/ API/ Project Information/ Querying a Work Template (V2)
Updated on 2025-09-10 GMT+08:00

Querying a Work Template (V2)

Function

This API is used to query a work template (V2).

Calling Method

For details, see Calling APIs.

URI

GET /v2/project-template/template

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

search

No

String

Definition:

Fuzzy search by name.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition:

User token. Obtain a token by calling the IAM API forobtaining a user token. The value of X-Subject-Token in the response header is the user token.

Constraints:

Mandatory.

Value range:

Minimum length: 10 characters. Maximum length: 32,768 characters.

Default value:

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

result

result object

Definition:

Returned result.

status

String

Definition:

Returned status.

Value range:

success: Command execution succeeds.

error: Command execution failed.

Table 4 result

Parameter

Type

Description

templates

Array of templates objects

Definition:

Template.

Value range:

N/A

Table 5 templates

Parameter

Type

Description

name

String

Definition:

Template name.

Value range:

N/A

description

String

Definition:

Template description.

Value range:

N/A

creator

creator object

Definition:

Template owner.

Value range:

N/A

source_project

source_project object

Definition:

Source project of a template.

Value range:

N/A

count

Integer

Definition:

Number of templates.

Value range:

N/A

project_list

Array of project_list objects

Definition:

Project list.

Value range:

N/A

children

Array of children objects

Definition:

Sub-item.

Value range:

N/A

Table 6 creator

Parameter

Type

Description

nick_name

String

Definition:

Owner name.

Value range:

N/A

Table 7 source_project

Parameter

Type

Description

project_name

String

Definition:

Name of the source project of a template.

Value range:

N/A

Table 8 project_list

Parameter

Type

Description

name

String

Definition:

Project name.

Value range:

N/A

identifier

String

Definition:

Project UUID.

Value range:

N/A

description

String

Definition:

Template description.

Value range:

N/A

total

Integer

Definition:

Priority.

Value range:

N/A

close

Integer

Definition:

Whether the project is closed.

Value range:

0: closed

1: open

role

Integer

Definition:

Project member role.

Value range:

N/A

type

String

Definition:

Project type.

Value range:

Scrum

mem_count

Integer

Definition:

Number of project members.

Value range:

N/A

Table 9 children

Parameter

Type

Description

id

Integer

Definition:

Sub-project ID.

Value range:

N/A

name

String

Definition:

Name of a sub-project.

Value range:

N/A

description

String

Definition:

Sub-project description.

Value range:

N/A

authorId

Integer

Definition:

ID of the sub-project owner.

Value range:

N/A

count

Integer

Definition:

Number of sub-projects.

Value range:

N/A

Example Requests

{endpoint}/v2/project-template/template

Example Responses

Status code: 200

Response indicating successful retrieval of work item template settings.

{
  "result" : {
    "templates" : [ {
      "name" : "Scrum",
      "description" : "Default work item template",
      "creator" : {
        "nick_name" : "System"
      },
      "source_project" : {
        "project_name" : ""
      },
      "count" : 1311,
      "project_list" : [ {
        "name" : "Scrum01192024",
        "identifier" : "9cf57d978ce74cb7aa4b444e1ca379fd",
        "description" : "",
        "total" : 0,
        "close" : 0,
        "role" : 0,
        "type" : "scrum",
        "mem_count" : 0
      } ],
      "children" : [ {
        "id" : 384006,
        "name" : "12345",
        "description" : "",
        "authorId" : 4091,
        "count" : 0
      } ]
    } ]
  },
  "status" : "success"
}

Status Codes

Status Code

Description

200

Response indicating successful retrieval of work item template settings.

Error Codes

See Error Codes.