Skip to main content

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. Try it out

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 this 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.
ActionAccess levelResource typeCondition keyDependent action
sfm:DeletePromptTemplatedelete
*All resources
*
    None
None

Request syntax

DELETE /{workspaceId}/promptTemplates/{promptTemplateId} HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample
workspaceIdstringYes

The workspace ID.

llm-us9hjmt32nysdxxx
promptTemplateIdstringYes

The template ID.

6e49109bfeb94a39bb268f4e483ccxxx

Response parameters

NameTypeDescriptionExample
object

Schema of Response

requestIdstring

The request ID.

FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx

Examples

Sample success response JSON format
{
  "requestId": "FE9B6CBF-47E6-5D76-9C5D-B814DD5ABxxx"
}

Error codes

HTTP status codeError codeError messageDescription
404PromptTemplate.TemplateNotFoundPrompt template not found.The prompt template was not found.
500PromptTemplate.InternalErrorPrompt template service inner exception.An internal error occurred in the prompt template service.
For more error codes, see Error Center.