Get Single Preset
Retrieve a specific preset by its unique ID. This endpoint always returns the preset with its content included, regardless of hierarchy level. Access is controlled by the user's permissions to the preset's scope level.
URL
(POST) /api/apps/presets/get
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 |
id | Unique identifier of the specific preset to retrieve | string, Mandatory |
RESULTS
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 | 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:
{
"scope": {},
"key": "editor.ui.settings",
"id": "abc123def456ghi789"
}
Example Response:
{
"id": "abc123def456ghi789",
"name": "My Custom Editor Config",
"desc": "Dark theme with large font",
"level": "User",
"entityId": 1001,
"content": "{\"theme\":\"dark\",\"fontSize\":16,\"showLineNumbers\":true}",
"date": "2023-10-15T14:30:00Z",
"isDefault": true
}
Access Control:
User Level Presets: Can only be accessed by the owner
Resource Level Presets: Can be accessed by users with access to the resource
Platform Level Presets: Can be accessed by all authenticated users
Error Scenarios:
Preset not found with specified ID and key combination
Insufficient permissions to access the preset
User attempting to access preset they don't own (User level)
Invalid preset ID or key provided
Preset exists but user lacks resource access (Resource level)