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

Deleting Prompts in Batches

Function

Delete prompts in batches by ID.

URI

DELETE /v1/{project_id}/applications/{application_id}/uni-search/prompt

Table 1 Path 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.

Constraints:

N/A

Value range:

The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter.

Default value:

N/A

application_id

Yes

String

Definition:

Application ID. For details about how to obtain the application ID, see Obtaining an Application ID.

Constraints:

Character string

Value range:

The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter.

Default value:

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition:

Token used for API authentication. For details about how to obtain the token, see Obtaining an IAM User Token.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

prompt_ids

No

Array of strings

Definition:

ID of batch-deleted prompts.

Constraints:

N/A

Value range:

Prompt ID. The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed.

Default value:

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total_count

Integer

Definition:

Number of expected deletions.

Value range:

N/A

deleted_count

Integer

Definition:

Number of deleted records.

Value range:

N/A

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Definition:

Error Code.

Value range:

N/A

error_msg

String

Definition:

Error message.

Value range:

N/A

Status code: 500

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Definition:

Error Code.

Value range:

N/A

error_msg

String

Definition:

Error message.

Value range:

N/A

Example Requests

Delete prompts in batches.

/v1/b25446daeb1a41a7953c5deba2b2677a/applications/be9b19bf-4865-4fb8-b9f8-2fd1fea98d76/uni-search/prompt

{
  "prompt_ids" : [ "0004614d-4b5b-4574-9b89-59624ad23c3e" ]
}

Example Responses

None

Status Codes

Status Code

Description

200

Response body for prompt deletion.

400

Incorrect request body parameter.

500

Internal error.

Error Codes

See Error Codes.