Ana içeriğe geç

Delete AI Prompt-Guard Preset

Endpoint

DELETE /apiops/settings/ai-prompt-guard-presets/{presetName}/

Authentication

Requires a Personal API Access Token with admin privileges.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeRequiredDescription
presetNamestringYesName of the prompt-guard preset to delete (case-insensitive match)

Query Parameters

ParameterTypeRequiredDefaultDescription
projectIdstringNoadminScope project id. Omit for the admin/global scope.

Response

Success Response (200 OK)

{
"status": "SUCCESS",
"deploymentResult": {
"success": true
}
}

Response Fields

FieldTypeDescription
statusstringResponse status: SUCCESS or FAILURE
deploymentResultobjectDeployment result summary
deploymentResult.successbooleantrue when the preset was deleted successfully

Error Response (400 Bad Request)

Returned when the preset name is blank, the preset is not found, the preset is built-in, or the caller lacks the ADMIN role.

{
"status": "FAILURE",
"resultMessage": "AI prompt-guard preset (name: block-internal-hostnames) was not found!"
}

Other possible messages:

{
"status": "FAILURE",
"resultMessage": "Built-in presets cannot be deleted"
}
{
"status": "FAILURE",
"resultMessage": "Unauthorized! Only users with ADMIN role can manage AI presets!"
}

Error Response (401 Unauthorized)

{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}

cURL Example

curl -X DELETE \
"https://demo.apinizer.com/apiops/settings/ai-prompt-guard-presets/block-internal-hostnames/" \
-H "Authorization: Bearer YOUR_TOKEN"

Notes and Warnings

  • Admin Only:
    • Only sysAdmin users (or users with the ADMIN role) can delete AI prompt-guard presets
    • A project-scoped AI_DEVELOPMENT token is not sufficient
  • Built-in Presets Are Read-only:
    • Built-in (seeded) presets cannot be deleted; such attempts are rejected with Built-in presets cannot be deleted
  • Must Exist:
    • Deleting a non-existent preset returns a not found error
  • Irreversible:
    • Deletion is permanent; a deleted custom preset must be recreated to restore it