Help Center> ServiceStage> API Reference> CSE API> Microservice Instance> Modifying the Extended Information About a Microservice Instance

Modifying the Extended Information About a Microservice Instance

Function

This API is used to add or update the extended information about a registered microservice instance based on the instance ID.

Constraints

None

URI

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

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

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

x-domain-name

Yes

String

Tenant account name.

X-consumer_id

Yes

String

Microservice consumer ID, which must be unique.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

properties

No

Object

Extended attribute. You can customize a key and value. The value contains at least 1 byte.

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}/properties

{
  "properties" : {
    "attr1" : "b"
  }
}

Example Responses

None

Status Codes

Status Code

Description

200

OK

400

Bad Request

500

Internal Server Error

Error Codes

See Error Codes.