Folders
folder-tree
This relation targets the root of the folder tree.
For each node in the folder tree, children nodes are embedded in the representation as a child
.
To retrieve sub tree, retrieve the children nodes resource using the self
relation.
GET http://baobab.keepeek.com/api/dam/folder-tree HTTP/1.1
[...]
HTTP/1.1 200 OK
Content-Type: application/hal+json;version=1;charset=UTF-8
[...]
{
"_links": {
"self": {"href": "http://baobab.keepeek.com/api/dam/folder-tree"},
"curies": [ {
"name": "kpk",
"href": "http://baobab.keepeek.com/api/doc/rels/{rel}",
"templated": true
}]
},
"_embedded": {"child": [
{
"id": 434,
"title": "Documentation technique",
"description": "",
"treeMediaCount": 47,
"hasChildren": true,
"_links": {
"self": {"href": "http://baobab.keepeek.com/api/dam/folder-tree/434"},
"kpk:folder": {"href": "http://baobab.keepeek.com/api/dam/folders/434"},
"kpk:medias": {"href": "http://baobab.keepeek.com/api/dam/folder-tree/434/medias"}
}
},
{
"id": 432,
"title": "Equipes",
"description": "",
"treeMediaCount": 75,
"hasChildren": false,
"_links": {
"self": {"href": "http://baobab.keepeek.com/api/dam/folder-tree/432"},
"kpk:folder": {"href": "http://baobab.keepeek.com/api/dam/folders/432"},
"kpk:medias": {"href": "http://baobab.keepeek.com/api/dam/folder-tree/432/medias"}
}
},
[...]
{
"id": 431,
"title": "Sites et infrastructures",
"description": "",
"treeMediaCount": 180,
"hasChildren": true,
"_links": {
"self": {"href": "http://baobab.keepeek.com/api/dam/folder-tree/431"},
"kpk:folder": {"href": "http://baobab.keepeek.com/api/dam/folders/431"},
"kpk:medias": {"href": "http://baobab.keepeek.com/api/dam/folder-tree/431/medias"}
}
}
]},
"childrenCount": 8
}
To retrieve children nodes of a node, you can use this request :
GET http://baobab.keepeek.com/api/dam/folder-tree/434
[...]
HTTP/1.1 200 OK
Content-Type: application/hal+json;version=1;charset=UTF-8
[...]
{
"id": 434,
"title": "Documentation technique",
"description": "<p>Description</p>",
"permission": "READ",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/folder-tree/434"
},
"curies": [
{
"name": "kpk",
"href": "http://baobab.keepeek.com/api/doc/rels/{rel}",
"templated": true
}
],
"kpk:folder": {
"href": "http://baobab.keepeek.com/api/dam/folders/434"
},
"kpk:medias": {
"href": "http://baobab.keepeek.com/api/dam/folder-tree/434/medias"
}
},
"_embedded": {
"child": [
{
"id": 362,
"title": "Cartographie",
"description": "<p>EN</p>",
"treeMediaCount": 11,
"hasChildren": false,
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/folder-tree/434/children/362"
},
"kpk:folder": {
"href": "http://baobab.keepeek.com/api/dam/folders/362"
},
"kpk:medias": {
"href": "http://baobab.keepeek.com/api/dam/folder-tree/434/children/362/medias"
}
}
},
{
"id": 361,
"title": "Schéma",
"description": "",
"treeMediaCount": 16,
"hasChildren": false,
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/folder-tree/434/children/361"
},
"kpk:folder": {
"href": "http://baobab.keepeek.com/api/dam/folders/361"
},
"kpk:medias": {
"href": "http://baobab.keepeek.com/api/dam/folder-tree/434/children/361/medias"
}
}
},
{
"id": 368,
"title": "Guide d'installation",
"description": "",
"treeMediaCount": 4,
"hasChildren": false,
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/folder-tree/434/children/368"
},
"kpk:folder": {
"href": "http://baobab.keepeek.com/api/dam/folders/368"
},
"kpk:medias": {
"href": "http://baobab.keepeek.com/api/dam/folder-tree/434/children/368/medias"
}
}
},
{
"id": 363,
"title": "Maquette",
"description": "",
"treeMediaCount": 9,
"hasChildren": false,
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/folder-tree/434/children/363"
},
"kpk:folder": {
"href": "http://baobab.keepeek.com/api/dam/folders/363"
},
"kpk:medias": {
"href": "http://baobab.keepeek.com/api/dam/folder-tree/434/children/363/medias"
}
}
},
{
"id": 365,
"title": "Réglementation",
"description": "",
"treeMediaCount": 2,
"hasChildren": false,
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/folder-tree/434/children/365"
},
"kpk:folder": {
"href": "http://baobab.keepeek.com/api/dam/folders/365"
},
"kpk:medias": {
"href": "http://baobab.keepeek.com/api/dam/folder-tree/434/children/365/medias"
}
}
},
{
"id": 414,
"title": "Etude",
"description": "",
"treeMediaCount": 12,
"hasChildren": false,
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/folder-tree/434/children/414"
},
"kpk:folder": {
"href": "http://baobab.keepeek.com/api/dam/folders/414"
},
"kpk:medias": {
"href": "http://baobab.keepeek.com/api/dam/folder-tree/434/children/414/medias"
}
}
}
]
},
"childrenCount": 6
}
4.0.1+
The permission
field of a folder-tree exposes the user rights on the represented folder. Possible permissions are, from most restrictive to most permissive (a given permission always includes lower permissions):
- READ: user can see elements of the folder
- LD: user can download elements of the folder in low definition export formats
- HD: user can download elements of the folder in high definition export formats and original file
-
WRITE: user can create an element in the folder, change the sheet, replace the file and change the status to
DRAFT
orARCHIVED
of the folder elements -
PUBLISH: user can change the status of the folder elements to
PUBLISHED
- DELETE: user can remove from the folder or delete folder elements
- ADMIN: user can update and delete the folder and create sub folders in the folder
4.61.0+
Order sub-folders of a folder
The /order-children
path can be used on a folder-tree node to order sub-folders of this node:
PUT https://baobab.keepeek.com/api/dam/folder-tree/527/order-children
{
"foldersOrder": [
782,
1034
]
}
The foldersOrder
property is an array that must contain ALL identifiers of the targeted folder sub-folders, in the desired order.
Only users with ADMIN permission on the parent folder can perform this action.
4.85.0+
folders
This relation targets the flat collection of folders related to the current resource.
- dam --> folders: all the declared folders in the DAM instance
- media --> folders: all the folders containing the media
The targeted resource is provided for traversability purpose.
/!\ If the total number of folder reaches a maximum limit, for performance reason, the collection returned by the resource may be empty. Folder can still be browsed through the folder tree or accessed through its canonical representation.
4.0.0+
folder
This relation targets the canonical representation of a folder.
4.0.0+