Help Center> ServiceStage> API Reference (ME-Abu Dhabi Region)> CSE API> Changing the Status of a Microservice Instance
Updated on 2023-06-25 GMT+08:00

Changing the Status of a Microservice Instance

Function

This API is used to change the status of a microservice instance based on the instance ID after the instance is registered.

URI

PUT /v4/{project_id}/registry/microservices/{serviceId}/instances/{instanceId}/status

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_.-]*$

Table 2 Query parameters

Parameter

Type

Mandatory

Description

value

String

Yes

Instance status. Options:

  • UP: online.
  • OUTOFSERVICE: off-hook.
  • STARTING: starting.
  • DOWN: offline.
  • TESTING: dialing test.

Request

Request parameters

None

Response

Response parameters

None

Example

Example request

PUT /v4/default/registry/microservices/a0c572b9ede946712698081a87552a7a87169bcb/instances/831113358b7811ebb23100ff14de2ec3/status?value=UP

Example response

None

Status Code

See Status Codes.

Error Code

See CSE Error Codes.