Help Center> ServiceStage> API Reference> CSE API> Microservice Instance> Changing the Status of a Microservice Instance

Changing the Status of a Microservice Instance

Function

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

Constraints

The TESTING state is supported only in version 2.3.X.

URI

PUT /v4/{project_id}/registry/microservices/{service_id}/instances/{instance_id}/status

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Unique ID of a tenant sub-project. Length: 1–64 characters.

service_id

Yes

String

Microservice ID, which must be unique. Length: 1–64 characters. Regular expression: ^.*$

instance_id

Yes

String

ID of a microservice instance, which must be unique. Length: 1–64 characters. Regular expression: ^[A-Za-z0-9_.-]*$

Table 2 Query parameters

Parameter

Mandatory

Type

Description

value

Yes

String

Instance status. UP: online; OUTOFSERVICE: off-hook; STARTING: starting; DOWN: offline; TESTING: dialing test.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

x-domain-name

Yes

String

Tenant account name.

Response Parameters

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

errorCode

String

Error code.

errorMessage

String

Error information.

detail

String

Location details.

Status code: 500

Table 5 Response body parameters

Parameter

Type

Description

errorCode

String

Error code.

errorMessage

String

Error information.

detail

String

Location details.

Example Requests

PUT https://{endpoint}/v4/{project_id}/registry/microservices/{service_id}/instances/{instance_id}/status

Example Responses

None

Status Codes

Status Code

Description

200

OK

400

Bad Request

500

Internal Server Error

Error Codes

See Error Codes.