Updated on 2025-08-20 GMT+08:00

Deleting an API

Function

This API is used to delete a specified API. Only users who have the permission to delete the service to which the API belongs can delete the API.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

DELETE /v1/{project_id}/services/{service_id}/app-auth-apis/{api_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID and Name.

service_id

Yes

String

Service ID.

api_id

Yes

String

API ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

workspace_id

No

String

Definition: Workspace ID

Constraints: If no workspaces are available, the default value is 0. If a workspace is created and used, use the actual value. For details about how to obtain the ID, see Querying the Workspace List.

Range: N/A

Default Value: N/A

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

Response Parameters

Status code: 204

Table 4 Response header parameters

Parameter

Type

Description

X-Request-Id

String

Link trace ID

Status code: 401

Table 5 Response header parameters

Parameter

Type

Description

X-Request-Id

String

Link trace ID

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Status code: 403

Table 7 Response header parameters

Parameter

Type

Description

X-Request-Id

String

Link trace ID

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Status code: 500

Table 9 Response header parameters

Parameter

Type

Description

X-Request-Id

String

Link trace ID

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Example Requests

DELETE https://{endpoint}/v1/{project_id}/services/{service_id}/app-auth-apis/{api_id}

Example Responses

None

Status Codes

Status Code

Description

204

No Content

401

Unauthorized

403

Forbidden

500

Server Internal Error

Error Codes

See Error Codes.