Ana içeriğe geç

Delete AI Privacy Preset

Endpoint​

DELETE /apiops/settings/ai-privacy-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 privacy 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 belongs to a different scope than the projectId you sent, or the caller lacks the ADMIN role.

{
"status": "FAILURE",
"resultMessage": "AI privacy preset (name: internal-account-id) was not found!"
}

Other possible messages:

{
"status": "FAILURE",
"resultMessage": "Project mismatch"
}
{
"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-privacy-presets/internal-account-id/" \
-H "Authorization: Bearer YOUR_TOKEN"

Notes and Warnings​

  • Admin Only:
    • Only sysAdmin users (or users with the ADMIN role) can delete AI privacy presets
    • A project-scoped AI_DEVELOPMENT token is not sufficient
  • Built-in Presets Can Be Deleted — Permanently:
    • A seeded row (builtIn: true) accepts this call the same as a custom preset. Mongock deduplicates seed changesets by id and none are runAlways=true, so a deleted built-in preset does not reappear on a version upgrade — it returns only if a future release ships an explicit re-seed changeset. To stop using a preset without losing it, disable it instead of deleting it.
  • Scope Must Match (projectId):
    • The preset is deleted only when its own scope equals the projectId you send. Omitting projectId targets the admin/global scope (admin).
    • Deleting a preset that belongs to a different scope is rejected with Project mismatch (error key projectmismatch) and nothing is deleted — an admin token does not let you delete another project's preset by name.
    • To delete a project-scoped preset, pass that project's id explicitly: ?projectId=<projectId>.
  • Must Exist:
    • Deleting a non-existent preset returns a not found error
  • Irreversible:
    • Deletion is permanent; a deleted preset must be recreated (or, for a built-in row, restored by a future re-seed changeset) to bring it back