Help Center/ ImageSearch/ API Reference/ APIs/ Deleting an Instance
Updated on 2023-12-13 GMT+08:00

Deleting an Instance

Function

You can use the API to delete an instance.

URI

DELETE /v1/{project_id}/service/{instance_name}

Table 1 Path parameters

Name

Mandatory

Type

Description

instance_name

Yes

String

Instance name

project_id

Yes

String

Project ID. See Obtaining a Project ID and Name.

Request Message

Table 2 Request header parameters

Name

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token

Used to obtain the permission to call APIs. For details about how to obtain the token, see Authentication. The value of X-Subject-Token in the response header is the token.

Response Parameters

Status code: 200

Table 3 Response body parameter

Name

Type

Description

result

String

Calling result when the API call succeeds. This parameter is not included when the API fails to be called.

Status code: 400

Table 4 Response body parameter

Name

Type

Description

error_code

String

Error code of a failed API call. For details, see Error Codes.

This parameter is not included when the API is successfully called.

error_msg

String

Error message when the API call fails.

This parameter is not included when the API is successfully called.

Example Requests

Delete an instance.

DELETE https://{endpoint}/v1/{project_id}/service/{instance_name}

Example Response

Status code: 200

Returned Result

{
  "result" : "success"
}

Status code: 400

Example of a failed response

{
  "error_code" : "IS.0004",
  "error_msg" : "The authentication token is abnormal."
}

Status Code

Status Code

Description

200

Returned result

400

Failed response

Error Code

For details, see Error Codes.