Help Center/ ModelArts/ API Reference/ Model Inference/ Service Deployment Instance Management/ Obtaining the Service Deployment Instance List
Updated on 2026-07-24 GMT+08:00

Obtaining the Service Deployment Instance List

Function

This API is used to obtain the service deployment instances of the current tenant and filter them by status, which can be Running and Deleted. Pagination and keyword filtering are supported. It is used when you need to manage and monitor service instance status. Before calling this API, ensure that you have the query permission and provide optional filter criteria and pagination parameters. The returned list contains the basic information about all deployment instances, including the deployment name, latest update time, and status. If the current tenant does not have any service instance that meets the conditions or the provided parameters are invalid, an empty list or the corresponding error message is returned, prompting you to check the validity and permission of the input data.

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:service:listDeploymentInstances

    Read

    service *

    -

    -

    -

URI

GET /v2/{project_id}/services/{id}/deployments/{name}/instances

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

id

Yes

String

Definition

Unique service ID.

name

Yes

String

Definition

Service deployment name. The value can be all.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

status

No

Array of strings

Definition

Service instance status. Multiple statuses can be filtered at a time. Separate multiple statuses with commas (,). No space is allowed. By default, filtering is disabled. The value can be RUNNING, ERROR, INIT, or DELETED.

Constraints

N/A

limit

No

Integer

Definition

Maximum number of records displayed on each page.

Constraints

N/A

Range

[1,500]

Default Value

10.

offset

No

String

Definition

Start page of the pagination list.

Constraints

N/A

Range

N/A

Default Value

0.

pod_name

No

String

Definition

Pod name.

Range

N/A

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

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

current

Integer

Definition

Current page number, starting from 0.

Range

N/A

data

Array of ServiceInstanceResponse objects

Definition

Service instance list.

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

size

Integer

Definition

Number of records on the current page.

Range

N/A

total

Integer

Definition

Total number of records.

Range

N/A

Table 5 ServiceInstanceResponse

Parameter

Type

Description

instance_name

String

Definition

Service instance name.

Range

N/A

status

String

Definition

Service instance status.

Range

  • RUNNING

  • PENDING: The instance is not ready.

  • CONCERNING: There is an alarm.

  • FAILED

  • UNKNOWN

  • DELETED

weight

Integer

Definition

Service instance weight.

Range

[0, 100] or left empty.

pod_count

Long

Definition

Number of service instance pods.

Range

N/A

running_pod_count

Long

Definition

Number of running pods of a service instance.

Range

N/A

update_at

Long

Definition

Last update time of the service instance.

Range

N/A

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A.

error_msg

String

Definition: Error message.

Range: N/A.

Status code: 401

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A.

error_msg

String

Definition: Error message.

Range: N/A.

Status code: 403

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A.

error_msg

String

Definition: Error message.

Range: N/A.

Status code: 404

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A.

error_msg

String

Definition: Error message.

Range: N/A.

Example Requests

Obtain a specified deployment list.

GET https://{endpoint}/v2/{project_id}/services/{service_id}/deployments/{name}/instances

Example Responses

Status code: 200

Deployment instances are listed.

{
  "current" : 1,
  "data" : [ {
    "instance_name" : "infer-a07f5c03-18c5-4dfb-849a-c3506020a1f8-1ghsj",
    "status" : "DELETED",
    "pod_count" : 1,
    "running_pod_count" : 1,
    "update_at" : 1747766464765,
    "weight" : 50
  }, {
    "instance_name" : "infer-a07f5c03-18c5-4dfb-849a-c3506020a1f8-ecfip",
    "status" : "DELETED",
    "update_at" : 1747785331567,
    "pod_count" : 1,
    "running_pod_count" : 1,
    "weight" : 50
  } ],
  "pages" : 1,
  "size" : 2,
  "total" : 2
}

Status Codes

Status Code

Description

200

Deployment instances are listed.

400

Invalid request parameter.

401

Authentication failed.

403

Insufficient permissions.

404

Resource not found.

Error Codes

See Error Codes.