Updated on 2022-02-21 GMT+08:00

Querying a Service Instance List

Function

This API is used to query an instance list of a specified service.

URI

GET /v1/{projectId}/ats/applications/{application}/instances

Request

Path parameters

Table 1 describes the path parameters.

Table 1 Path parameters

Parameter

Type

Description

projectId

String

Project ID.

application

String

Service name (including port information). See the responseInfo field in the response of Querying a Service List.

Request parameters

Table 2 describes the request parameter.

Table 2 Request parameter

Parameter

Mandatory

Type

Description

monitorGroup

Yes

String

Application ID. See the responseInfo field in the response of Querying an Application List.

Example request

/v1/0/ats/applications/ams-metric:8080/instances?monitorGoup=11d5c9b83c1b2e04579fa5a34d191bb5

Response

Response parameters

Table 3 describes the response parameters.

Table 3 Response parameters

Parameter

Type

Description

errorCode

String

Error code.

SVCSTG.ATS.2000: Query succeeded.

SVCSTG.ATS.400101: Parameter verification failed.

SVCSTG.ATS.200103: No instance information found.

errorMessage

String

Error message.

responseInfo

List (string)

Instance ID list of a specified service.

Example response

{
  "errorCode": "SVCSTG.ATS.2000",
  "errorMessage":null,
  "responseInfo": [ "d056db8ebf2350c118ea7ace383ac5dd"]
}

Status Code

  • Success response
    Table 4 describes the status code.
    Table 4 Status code

    Status Code

    Description

    200

    The request has succeeded.