DAM: Folders
Create a new smart folder
Creates a smart folder: a folder holding every file that matches its filter, kept up to date in the background. Requires a client admin token and the smart folders feature.
post/dam/folders/{folder_id}/smart-folders
Request
- Base URLhttps://api.kontainer.com/jsonapi/v2
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
folder_idstring required
ID of folder to create the smart folder in
Request body
Example request
{
"data": {
"attributes": {
"show_large_folder_name": true,
"thumbs_scale_to_fit": true,
"source_folders": [
{
"id": 1234,
"include_subfolders": true
}
],
"source_folder_mode": "only",
"filter_config": {
"logical_operator": "and",
"rows": [
{
"criteria": [
{
"field": {
"type": "custom_field",
"id": 77
},
"in": [
301,
302
]
},
{
"field": {
"type": "custom_field",
"id": 82
},
"gte": 100,
"lte": 500
},
{
"field": {
"type": "file",
"name": "file_extension"
},
"in": [
"jpg",
"png"
]
},
{
"field": {
"type": "file",
"name": "file_created_at"
},
"gte": {
"days": -30
}
}
]
}
]
}
}
}
}Response
created
Example response
{
"type": "folder",
"id": "1234",
"attributes": {
"name": "Folder name",
"description": "Folder description",
"created_at": "2099-12-31T23:59:59.000000Z",
"updated_at": "2099-12-31T23:59:59.000000Z",
"sort": 1,
"files_count": 7,
"files_size": 10000,
"path": ".1233.1234",
"show_large_folder_name": true,
"thumbs_scale_to_fit": true
},
"links": {
"self": "https://example.kontainer.com/jsonapi/v2/dam/folders/1234"
},
"meta": {
"folder_type": "folder"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.