Skip to main content

Delete Preset

Delete multiple presets by their unique IDs. This operation performs validation checks before deletion and supports batch operations for efficiency. Default presets cannot be deleted unless they are the last preset at their scope level.

URL

CODE
(POST) /api/apps/presets/delete

PARAMETERS

JSON object in the request body:

Property

Description

Type

scope

The scope object. It limits resources that can be accessed.

object, Mandatory

key

Unique identifier for the preset type

string, Mandatory

ids

Array of preset IDs to delete

string[], Mandatory

RESULTS

This endpoint returns HTTP 204 No Content on successful deletion. No response body is provided.

Example Request:

JSON
{
  "scope": {},
  "key": "editor.ui.settings",
  "ids": ["abc123def456", "xyz789uvw012", "mno345pqr678"]
}

Permission Requirements:

  • User Level Presets: Can only be deleted by the owner

  • Resource/Platform Level Presets: Require management permissions

Validation Rules:

  • All specified preset IDs must exist and belong to the specified key

  • Default presets cannot be deleted if there are other presets at the same scope level

  • Users must have appropriate permissions for each preset being deleted

  • All validations are performed before any deletions occur (atomic operation)

Error Scenarios:

  • Empty IDs array provided

  • One or more preset IDs not found

  • Attempt to delete protected default preset when other presets exist at the same level

  • Insufficient permissions to delete one or more presets

  • Invalid preset IDs or preset doesn't belong to specified key

Batch Operation Behavior:

  • All deletions are validated before any database changes occur

  • If any validation fails, no presets are deleted

  • Operation is atomic - either all presets are deleted or none are deleted

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.