Help Center/ ServiceStage/ API Reference (ME-Abu Dhabi Region)/ CSE API/ Querying Details About a Microservice Instance
Updated on 2023-06-25 GMT+08:00

Querying Details About a Microservice Instance

Function

This API is used to query details about an instance based on the service ID and instance ID after the instance is registered.

URI

GET /v4/{project_id}/registry/microservices/{serviceId}/instances/{instanceId}

Table 1 Path parameters

Parameter

Type

Mandatory

Description

project_id

String

Yes

Fixed value: default.

serviceId

String

Yes

Microservice ID, which must be unique.

The value must be 1 to 64 characters long.

Regular expression: ^.*$

instanceId

String

Yes

Microservice instance ID, which must be unique.

The value must be 1 to 64 characters long.

Regular expression: ^[A-Za-z0-9_.-]*$

Request

Request parameters

None

Response

Response parameters

Table 2 describes the parameters.

Table 2 Parameter

Parameter

Type

Description

instance

Object

Microservice instance. For details, see MicroServiceInstance.

Example

Example request

GET /v4/default/registry/microservices/a0c572b9ede946712698081a87552a7a87169bcb/instances/2370d7938b7111ebb23100ff14de2ec3

Example response

{
  "instance": {
    "instanceId": "string",
    "serviceId": "string",
    "version": "string",
    "hostName": "string",
    "endpoints": [
      "string"
    ],
    "status": "string",
    "healthCheck": {
      "mode": "string",
      "port": 0,
      "interval": 0,
      "times": 0
    },
    "dataCenterInfo": {
      "name": "string",
      "region": "string",
      "availableZone": "string"
    },
    "timestamp": "string",
    "modTimestamp": "string"
  }
}

Status Code

See Status Codes.

Error Code

See CSE Error Codes.