Help Center/ ModelArts/ API Reference/ Lite Server Management/ Obtaining the Lite Server Job Template List
Updated on 2026-01-30 GMT+08:00

Obtaining the Lite Server Job Template List

Function

This API is used to obtain the list of available Lite Server job templates. It is used when you need to view available job templates and select a proper template to create a Lite Server task. After the query, the API returns all available Lite Server job templates, including the template ID, name, and description. If no template is available in the system, the API returns an error message.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

GET /v1/{project_id}/dev-servers/jobs/templates

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition: Project ID. For details, see Obtaining a Project ID and Name.

Constraints: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed.

Range: N/A

Default Value: N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

id

No

String

Definition: ID of the DevServer job template.

Constraints: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed.

Range: N/A

Default Value: N/A

name

No

String

Definition: Name of the DevServer job template.

Constraints: The value can contain letters, digits, and hyphens (-).

Range: N/A

Default Value: N/A

type

No

String

Definition: Type of the DevServer job template.

Constraints: The value can contain letters, digits, and hyphens (-).

Range: N/A

Default Value: N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

current

Integer

Current page number.

data

Array of DevServerTemplateListResponse objects

Template list.

pages

Integer

Total number of pages.

size

Integer

Number of records on each page.

total

Long

Total number of records.

Table 4 DevServerTemplateListResponse

Parameter

Type

Description

id

String

Task template ID.

name

String

Task template name.

description

String

Task template description.

type

String

Definition: Task template type.

Range: COMMON, LOG_COLLECT, and others.

flavor_type

String

Definition: Flavor type.

Range: ASCEND_SNT9B, ASCEND_SNT9C, and ASCEND_GENERIC.

params

Array of TemplateParam objects

Template parameters.

Table 5 TemplateParam

Parameter

Type

Description

name

String

Name.

description

String

Description.

value

String

Value.

visible

String

Definition: Specifies whether to display on the console.

Range: true or false.

regex

String

Regular expression verification.

Example Requests

GET https://{endpoint}/v1/{project_id}/dev-servers/jobs/templates

{ }

Example Responses

Status code: 200

OK

{
  "current" : 0,
  "data" : [ {
    "id" : "2b087a09-e90d-414c-9b15-ffec45e400e9",
    "type" : "ASCEND_SYSTEM_CONFIG",
    "flavor_type" : "ASCEND_GENERIC",
    "params" : [ {
      "description" : "Configure the RoCE network uplink ports properly and set up the parameter plane network with correct IP addresses, subnet masks, and gateways.",
      "name" : "JOB_ITEM_RDMA_CONFIG",
      "regex" : "^[A-Za-z0-9-_]{1,128}$",
      "value" : "Parameter Plane Network Configuration",
      "visible" : "true"
    }, {
      "description" : "Detect and fix security vulnerabilities in the HCE2.0 system.",
      "name" : "JOB_ITEM_SYSTEM_FIX",
      "regex" : "^[A-Za-z0-9-_]{1,128}$",
      "value" : "System Bug Fixes",
      "visible" : "true"
    }, {
      "description" : "Timeout of RDMA_CONFIG job item",
      "name" : "TIMEOUT_RDMA_CONFIG",
      "regex" : "^[A-Za-z0-9-_]{1,128}$",
      "value" : "300",
      "visible" : "false"
    }, {
      "description" : "Timeout of SYSTEM_FIX job item",
      "name" : "TIMEOUT_SYSTEM_FIX",
      "regex" : "^[A-Za-z0-9-_]{1,128}$",
      "value" : "300",
      "visible" : "false"
    } ]
  } ],
  "pages" : 1,
  "size" : 10,
  "total" : 1
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.