DeletePromptTemplate - Delete a prompt template
Deletes a prompt template by template ID.
Try it out
You can call this operation in OpenAPI Explorer without calculating a signature. After a successful call, OpenAPI Explorer can automatically generate SDK code examples.
Authorization information
The following table describes the authorization information for this API operation. You can use this information in the Action element of a RAM policy statement to grant a RAM user or RAM role permission to call the operation. The columns are described as follows:
-
Action: a specific permission.
-
Access level: the access level of an action. Valid values: Write, Read, and List.
-
Resource type: the types of resources for which the action supports authorization:
- Required resource types are marked with an asterisk (*).
- Actions that do not support resource-level authorization use
All resources.
-
Condition key: a condition key defined by the cloud service.
-
Dependent action: an additional permission required to perform the action. The caller must also have permission to perform the dependent action.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
sfm:DeletePromptTemplate | delete | *All resources | None | None |
Request syntax
DELETE /{workspaceId}/promptTemplates/{promptTemplateId} HTTP/1.1
Request parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
workspaceId | string | Yes | The workspace ID. | llm-us9hjmt32nysdxxx |
promptTemplateId | string | Yes | The template ID. | 6e49109bfeb94a39bb268f4e483ccxxx |
Response parameters
| Name | Type | Description | Example |
|---|---|---|---|
object | Schema of Response | ||
requestId | string | The request ID. | FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx |
Examples
Sample success response
JSON format
{
"requestId": "FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx"
}
Error codes
| HTTP status code | The error code. | The error message. | Description |
|---|---|---|---|
404 | PromptTemplate.TemplateNotFound | Prompt template not found. | The prompt template was not found. |
500 | PromptTemplate.InternalError | Prompt template service inner exception. | An internal error occurred in the prompt template service. |
For more error codes, see Error Center.