Updated on 2026-07-24 GMT+08:00

Obtaining Services

Function

Pagination and filtering are supported.

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, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    modelarts::listServices

    List

    -

    -

    modelarts:service:list

    -

URI

GET /v2/{project_id}/services

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

N/A

Range

Project ID.

Default Value

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

id

No

String

Definition

Service ID, which can be obtained from the response body during service creation or by obtaining services owned by the current user. The service_id field is the service ID.

Constraints

N/A

Range

Service ID.

Default Value

N/A

pool_id

No

String

Definition

Resource pool ID. Services in a specified resource pool are queried. By default, no resource pool is filtered. You can obtain the value by querying the resource pool list.

Constraints

N/A

Range

N/A

Default Value

N/A

pool_name

No

String

Definition

Resource pool name. Services in a specified resource pool are queried. By default, no resource pool is filtered. You can obtain the value by querying the resource pool list.

Constraints

N/A

Range

N/A

Default Value

N/A

sort_key

No

String

Definition

Sorting field. Separate multiple fields with commas (,). The value can be create_at or update_at. The default value is update_at.

Constraints

N/A

Range

  • create_at: sorting by creation time

  • update_at: sorting by update time

Default Value

update_at

status

No

String

Definition

Service status. You can filter services by status. By default, filtering is disabled.

Constraints

N/A

Range

  • DEPLOYING

  • FAILED

  • STOPPED

  • RUNNING

  • DELETING

  • STOPPING

  • CONCERNING: There is an alarm.

  • UPGRADING

  • ERROR: abnormal

  • INTERRUPTING

Default Value

N/A

name

No

String

Definition

Service name, which is customized when you create a service.

Constraints

The service name must be unique before being deleted.

Range

The value can contain 1 to 128 characters, including letters, digits, hyphens (-), and underscores (_).

Default Value

N/A

auth_type

No

String

Definition

Authentication type. By default, the authentication type is not filtered.

Constraints

N/A

Range

  • TOKEN: IAM token authentication.

  • API_KEY: API key authentication.

  • NONE: No authentication.

Default Value

N/A

type

No

String

Definition

Inference service type.

Constraints

N/A

Range

  • REAL_TIME: real-time service

  • ASYNC_REAL_TIME: asynchronous service

Default Value

N/A

description

No

String

Definition

Service description, which is used for fuzzy query. By default, the service description is not filtered. It is set by the user when the service is created.

Constraints

N/A

Range

N/A

Default Value

N/A

workspace_id

No

String

Definition

Workspace ID.

Range

  • 0: default workspace ID

  • 32 characters consisting of digits and lowercase letters. For details about other space IDs, see Creating a Workspace.

Constraints

N/A

Default Value

N/A

user_name

No

String

Definition

Creator, that is, the name of the user who creates the service.

Constraints

N/A

Range

Username for creating a service.

Default Value

N/A

tags

No

String

Definition

Tag used to query services. By default, tags are not filtered. The service parameter is filtered by tag. The format is as follows: Use commas (,) to separate tags, and use vertical bars (|) to separate the key and value in each tag. Example: tag_key1|tag_value1,tag_key2|tag_value2.

Constraints

The value cannot start with a comma (,) or vertical bar (|), end with a comma (,), or contain consecutive vertical bars (|) or commas (,). Only Spanish, Portuguese, and special characters (_.:/=+-@) are allowed. Separate characters with commas (,) or vertical bars (|).

Range

N/A

Default Value

N/A

asset_id

No

String

Definition

Asset ID. Services that use the specified asset are queried. By default, no asset is filtered. Obtain the value from [asset management][the model list].

Constraints

N/A

Range

N/A

Default Value

N/A

sort_dir

No

String

Definition

Sorting mode.

Constraints

N/A

Range

  • ASC: ascending order

  • DESC: descending order

Default Value

DESC

limit

No

Integer

Definition

Maximum number of records that can be returned.

Constraints

N/A

Range

[1,500]

Default Value

10.

offset

No

Integer

Definition

Offset of the pagination list query.

Constraints

The value must be an integral multiple of limit.

Range

N/A

Default Value

0.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. For details about how to obtain the token, see Obtaining a User Token Through Password Authentication.

Constraints

N/A

Range

N/A

Default Value

N/A

Content-Type

Yes

String

Definition

Message body type or format.

Constraints

N/A

Range

  • application/json

  • application/json;charset=utf-8

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

data

Array of data objects

Definition

Real-time service data.

current

Integer

Definition

Current page number, starting from 0.

Range

N/A

size

Integer

Definition

Number of records on the current page.

Range

N/A

pages

Integer

Definition

Total number of pages, which is calculated based on the limit field and the total number of data records. For example, if the total number of records is 10 and the value of limit (maximum number of records on a page) is 3, there are four pages.

Range

N/A

total

Integer

Definition

Total number of records.

Range

N/A

Table 5 data

Parameter

Type

Description

id

String

Definition

Service ID, which can be obtained from the response body during service creation or by obtaining services owned by the current user. The service_id field is the service ID.

Range

Service ID.

name

String

Definition

Service name, which is customized when you create a service.

Range

The value can contain 1 to 128 characters, including letters, digits, hyphens (-), and underscores (_).

status

String

Definition

Service status.

Range

  • DEPLOYING

  • FAILED

  • STOPPED

  • RUNNING

  • DELETING

  • STOPPING

  • CONCERNING: There is an alarm.

  • UPGRADING

  • ERROR: abnormal

  • INTERRUPTING

version

String

Definition

Service version, which consists of digits and periods (.), for example, 1.0.1.

Range

The value ranges from 1.0.0 to 99.99.99 and can contain at most eight characters.

version_count

Integer

Definition

Number of service versions.

Range

N/A

description

String

Definition

Service description, which is set by the user when the service is created.

Range

N/A

type

String

Definition

Inference service type.

Constraints

N/A

Range

  • REAL_TIME: real-time service

  • ASYNC_REAL_TIME: asynchronous service

Default Value

N/A

deploy_type

String

Definition

Deployment type.

Range

  • SINGLE: single-node single-PU

  • MULTI: multi-node multi-PU

user_name

String

Definition

Username for creating a service.

Range

Username.

workspace_id

String

Definition

Workspace ID.

Range

  • 0: default workspace ID.

  • 32 characters consisting of digits and lowercase letters. For details about other space IDs, see Creating a Workspace.

create_at

Long

Definition

Creation time, which is automatically generated.

Range

Millisecond-level timestamp, which is a 13-digit number.

update_at

Long

Definition

Update time, which is automatically generated.

Range

Millisecond-level timestamp, which is a 13-digit number.

auth_type

String

Definition

Authentication type of a real-time service.

Range

  • TOKEN: IAM token authentication.

  • API_KEY: API key authentication.

  • NONE: No authentication.

task_type

String

Definition

Model type.

Range

  • TEXT_GENERATION

  • IMAGE_UNDERSTANDING

  • VIDEO_GENERATION

  • IMAGE_GENERATION

  • RERANK

  • VECTOR_MODEL

  • EMBEDDING

tags

Array of TagsResponse objects

Definition

Real-time service tag data.

schedule

Array of ScheduleConfigResponse objects

Definition

Scheduled stop configuration.

frozen_infos

Array of FrozenInfo objects

Definition

Freezing type returned when a service or deployment is frozen.

Table 6 TagsResponse

Parameter

Type

Description

key

String

Definition

Tag key field.

Constraints

N/A

Range

The value can contain 1 to 128 characters. Only letters, digits, spaces, and special characters (_.:=+-@) are allowed. However, the value cannot start or end with a space or start with sys.

Default Value

N/A

value

String

Definition

Tag value field.

Range

The value can contain 255 characters. Only letters, digits, underscores (_), periods (.), slashes (/), equal signs (=), plus signs (+), minus signs (-), and at signs (@) are allowed.

Table 7 ScheduleConfigResponse

Parameter

Type

Description

due_time

Long

Definition

Trigger time. The value is a 13-digit timestamp, UTC time, in milliseconds.

Range

N/A

duration

Integer

Definition

Value mapping a time unit.

Range

N/A

time_unit

String

Definition

Scheduling time unit.

Range

  • MINUTES (min)

  • HOURS (hour)

  • DAYS (day)

type

String

Definition

Scheduling type. Only the value STOP is supported.

Range

  • STOP

processed

Boolean

Definition

Indicates whether the processing is complete.

Range

  • true: The scheduled task has been executed.

  • false: The scheduled task has not been executed.

Table 8 FrozenInfo

Parameter

Type

Description

scene

String

Freezing scenario. Options:

  • ARREAR: Frozen due to arrears

  • POLICE: frozen due to public security issues

  • ILLEGAL: Frozen due to abuse

effect

Integer

Impacts of freezing. Options:

  • 1: can be released after being frozen

  • 2: cannot be released after being frozen

Example Requests

Obtain services. limit indicates the maximum number of records returned in a query. offset indicates the sequence number from which records are returned. The value of status must be in uppercase. name indicates the value contained in the service name in the query result. id indicates the service ID in the query result.

GET https://{endpoint}/v2/{project_id}/services?limit=50&offset=0&type=REAL_TIME&status=STOPPED&name=test&id=testid

Example Responses

Status code: 200

Service list information.

{
  "current" : 0,
  "data" : [ {
    "id" : "841e8dc2-2640-4916-ad21-a18b147b9149",
    "name" : "service_name***example",
    "status" : "STOPPED",
    "version" : "0.0.1",
    "version_count" : 1,
    "description" : "infer-description",
    "type" : "REAL_TIME",
    "deploy_type" : "SINGLE",
    "user_name" : "user_name***example",
    "workspace_id" : "0",
    "create_at" : 1747990876171,
    "update_at" : 1747994527244,
    "auth_type" : "API_KEY",
    "task_type" : "TEXT_GENERATION",
    "tags" : [ {
      "key" : "Tag key",
      "value" : "Tag value"
    } ],
    "schedule" : [ {
      "due_time" : 1749798035000,
      "duration" : 3,
      "processed" : true,
      "time_unit" : "HOURS",
      "type" : "STOP"
    } ]
  } ],
  "pages" : 1,
  "size" : 1,
  "total" : 1
}

Status Codes

Status Code

Description

200

Service list information.

Error Codes

See Error Codes.