Help Center> ServiceStage> API Reference> CSE API> Microservice> Deleting Definition and Related Information About a Microservice

Deleting Definition and Related Information About a Microservice

Function

This API is used to delete the definition and related information about a microservice, and deregister all instances of the microservice.

Constraints

None

URI

DELETE /v4/{project_id}/registry/microservices/{service_id}

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: ^.*$

Table 2 Query parameters

Parameter

Mandatory

Type

Description

force

No

Boolean

Whether forcible deletion is allowed. true: Forcible deletion is allowed. false: Forcible deletion is prohibited. If the value is true, all service instances are automatically deregistered and related service dependencies are deleted. If the value is not specified and the microservice has instances, the microservice cannot be deleted.

Default: false

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

DELETE https://{endpoint}/v4/d9f4da085f2c11e8959a00ff2d7c69b7/registry/microservices/e0f0da073f2c91e8979a89ff2d7c69t6

Example Responses

None

Status Codes

Status Code

Description

200

OK

400

Bad Request

500

Internal Server Error

Error Codes

See Error Codes.