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}
| 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: ^.*$ |
| 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
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| x-domain-name | Yes | String | Tenant account name. |
Response Parameters
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| errorCode | String | Error code. |
| errorMessage | String | Error information. |
| detail | String | Location details. |
Status code: 500
| 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.
Last Article: Querying Information About a Microservice
Next Article: Querying Information About Microservices
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.