Help Center/MaaS/API Reference/Endpoint/Deleting an Endpoint
Updated on 2026-02-26 GMT+08:00

Deleting an Endpoint

Description

This API is used to delete a specified endpoint based on the input custom_endpoint_id.

Constraints

  • This function is only supported in CN-Hong Kong.
  • Endpoints with the same name cannot exist under the same account. A deleted endpoint cannot be used during creation.

URI

DELETE /v1/{project_id}/maas/services/custom-endpoint/endpoint/{custom_endpoint_id}

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project-id

Yes

String

Definition: Project ID. For details about how to obtain the project ID, see Obtaining a Project ID and Name.

Constraints: N/A.

Range: N/A.

Default Value: N/A.

custom_endpoint_id

Yes

String

Definition: Endpoint ID. The endpoint ID is returned when an endpoint is created or obtained using the query API. For details, see Creating an Endpoint or Querying Custom Endpoints.

Constraints: N/A.

Range: N/A.

Default Value: N/A.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition: User token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. For details, see Authentication.

Constraints: N/A.

Range: N/A.

Default Value: N/A.

Response Parameters

  • Success response:

    Status code: 204. If the deletion is successful, no message is returned.

  • The error response parameters are as follows.

    Parameter

    Type

    Description

    error_msg

    String

    Definition: Error description.

    Range: N/A.

    error_code

    String

    Definition: Error code, indicating the error type.

    Range: N/A.

Request Example

Delete the endpoint whose ID is c4513589-df2e-4d58-ab0c-d5a6f2******.

DELETE
/v1/{project_id}/maas/services/custom-endpoint/endpoint/c4513589-df2e-4d58-ab0c-d5a6f2******

Response Example

  • Success response. Status code: 204. If the deletion is successful, no content is returned.
  • Error response. Status code: 404.
    {
        "error_msg": "Invalid token.",
        "error_code": "ModelArts.0104"
    } 

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.