Skip to main content

Get Multiple Presets

Retrieve presets for multiple keys with hierarchical scope resolution. This endpoint allows you to efficiently fetch presets for multiple configuration keys in a single request, with options to include content and collapse the hierarchy.

URL

CODE
(POST) /api/apps/presets

PARAMETERS

JSON object in the request body:

Property

Description

Type

scope

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

object, Mandatory

keys

Array of preset keys to retrieve

string[], Mandatory

includeContent

Whether to include the preset content in the response. If false, only metadata is returned.

bool?, Optional

collapse

Whether to collapse the hierarchy and return only the effective default preset for each key. When true, returns the first default preset found in the hierarchy (User → Resource → Platform).

bool?, Optional

RESULTS

property

Description

Type

[key]

Each requested key becomes a property containing an array of presets

PresetModel[]

PresetModel Structure:

Property

Description

Type

id

Unique identifier for the preset

string

name

Display name of the preset

string

desc

Optional description of the preset

string?

level

Hierarchical level where the preset is stored (User, Resource, Platform)

string

entityId

Entity ID associated with the preset level (null for Platform level)

int?

content

JSON content of the preset configuration (only included if includeContent=true)

string?

date

Creation or last modification timestamp

string (ISO 8601)

isDefault

Indicates if this preset is the default for its scope level

bool

Example Request (includeContent: false, collapse: false):

JSON
{
  "scope": {},
  "keys": ["editor.ui.settings", "view.layout.preferences"],
  "includeContent": false,
  "collapse": false
}

Example Response:

JSON
{
  "editor.ui.settings": [
    {
      "id": "abc123def456",
      "name": "My Editor Config",
      "desc": "Custom editor configuration",
      "level": "User",
      "entityId": 1001,
      "date": "2023-10-15T14:30:00Z",
      "isDefault": true
    },
    {
      "id": "def456ghi789",
      "name": "Alternative Config", 
      "desc": "Light theme configuration",
      "level": "User",
      "entityId": 1001,
      "date": "2023-10-10T10:00:00Z",
      "isDefault": false
    }
  ],
  "view.layout.preferences": [
    {
      "id": "xyz789uvw012",
      "name": "Default View",
      "desc": null,
      "level": "Platform",
      "entityId": null,
      "date": "2023-09-20T09:15:00Z",
      "isDefault": true
    },
    {
      "id": "uvw012mno345",
      "name": "Compact View",
      "desc": "Smaller layout for mobile",
      "level": "Platform", 
      "entityId": null,
      "date": "2023-09-15T08:30:00Z",
      "isDefault": false
    }
  ]
}

With collapse: true:

JSON
{
  "editor.ui.settings": [
    {
      "id": "abc123def456",
      "name": "My Editor Config",
      "desc": "Custom editor configuration",
      "level": "User",
      "entityId": 1001,
      "date": "2023-10-15T14:30:00Z",
      "isDefault": true
    }
  ],
  "view.layout.preferences": [
    {
      "id": "xyz789uvw012",
      "name": "Default View",
      "desc": null,
      "level": "Platform",
      "entityId": null,
      "date": "2023-09-20T09:15:00Z",
      "isDefault": true
    }
  ]
}

With includeContent: true:

JSON
{
  "editor.ui.settings": [
    {
      "id": "abc123def456",
      "name": "My Editor Config",
      "desc": "Custom editor configuration",
      "level": "User",
      "entityId": 1001,
      "content": "{\"theme\":\"dark\",\"fontSize\":14}",
      "date": "2023-10-15T14:30:00Z",
      "isDefault": true
    }
  ],
  "view.layout.preferences": [
    {
      "id": "xyz789uvw012",
      "name": "Default View",
      "desc": null,
      "level": "Platform",
      "entityId": null,
      "content": "{\"layout\":\"grid\",\"pageSize\":50}",
      "date": "2023-09-20T09:15:00Z",
      "isDefault": true
    }
  ]
}

Error Scenarios:

  • Empty keys array provided

  • Invalid key names or unsupported key formats

  • Insufficient permissions to access presets in the specified scope

  • Scope context invalid or inaccessible to the user

JavaScript errors detected

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

If this problem persists, please contact our support.