Actions
Create
Create a new folder for the user that has authenticated itself.
https://portal.robotsindeklas.nl/API/v1/folder/create
Parameters:
- name - string: the new name of the folder;
-
type - string: the type of folder. We currently only support the type
folderApp
.
Info
Get the document of a particular folder.
https://portal.robotsindeklas.nl/API/v1/folder/info
Parameter:
- folder - string: the object id of the folder you want the info of
Copy
Create a copy of an existing folder.
https://portal.robotsindeklas.nl/API/v1/folder/copy
Parameters:
- folder - string: the object id of the folder you want to copy;
- name - string - (optional, default: name of the original folder): the new name of the copied folder.
Lock
Lock a folder. If a folder is locked, users with play or edit share rights will no longer have access to the content of the apps inside the folder.
https://portal.robotsindeklas.nl/API/v1/folder/lock
Parameters:
- folder - string: the object id of the folder you want to lock;
- lock - boolean - (optional, default: false): lock (true) or unlock (false) this folder.
Share
Share a folder with a user or group. We define four levels of share rights:
- 0 (revoked rights): user or group will no longer have access to this folder;
- 1 (play rights): user or group is only allowed to view and play the contents of this folder;
- 2 (edit rights): user or group is allowed to play and edit the contents of this folder;
- 3 (admin rights): user or group is allowed to play, edit and further share the contents of this folder with other users.
https://portal.robotsindeklas.nl/API/v1/folder/share
Parameters:
- folder - string: the object id of the folder you want to share;
- level - int: the share level we want to assign to the user or group with this request;
- oid - string: the object id of the user or group we want the share this folder with.
Trash
Remove a folder or bring it back from the trash bin.
https://portal.robotsindeklas.nl/API/v1/folder/trash
Parameters:
- folder - string: the object id of the folder we want to trash;
- del - boolean: delete (true) or restore (false) deleted item.
Response
If the request was successful, you will receive the following response:
Model:
{
'_id': ObjectId - The id of the folder
'data': {
'items': Array - the object ids of the items stored inside the folder
},
'name': String - The name of the folder, visible in the portal
'type': String - The type of the folder (describes which items can be stored inside)
'info': String - Additional info describing this folder
'tags': Array - An array of tags describing this folder
'owner': ObjectId - The user id of the user who owns the folder
'author': ObjectId - The user id of the user who created the folder
'locked': Boolean - Is the folder locked
'access': Integer - The access level you have over this folder
}
Example:
{
'_id': {
'$oid': '6181f4bcfdb83741374238a1'
},
'data': {
'items': [
{'$oid': '6001af2696de5e50e546b1ab'}, {'$oid': '600aace6e0121c1f6e8863c1'}
]
},
'name': 'Exercises',
'type': 'folderApp',
'info': '',
'tags': [],
'owner': {'$oid': '6ae8672795fdd61d94272358'},
'author': {'$oid': '6ae8672795fdd61d94272358'},
'locked': False,
'access': 2
}