Add Permissions
curl --request POST \
--url https://cloudlab.scispot.io/labspace/folder/add-permissions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"location": "My Labspace:Protocols Folder",
"users": [
{
"email": "scientist@example.com",
"permission": "Editor"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
location: 'My Labspace:Protocols Folder',
users: [{email: 'scientist@example.com', permission: 'Editor'}]
})
};
fetch('https://cloudlab.scispot.io/labspace/folder/add-permissions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cloudlab.scispot.io/labspace/folder/add-permissions"
payload = {
"location": "My Labspace:Protocols Folder",
"users": [
{
"email": "scientist@example.com",
"permission": "Editor"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true
}{
"success": false,
"message": "Bad request"
}{
"success": false,
"message": "Invalid Authentication Token"
}{
"success": false,
"message": "Missing Authentication Token"
}{
"success": false,
"message": "Validation error"
}{
"success": false,
"message": "Operation failed"
}Permissions (Super Admin Only)
Add Permissions
This endpoint allows you to add permissions to a private folder in the labspace.
Notes:
-
The owner of the API token must have Super Admin permissions
-
The folder must already be privated
-
You cannot add a user who already has permission to a private folder. (To edit a permission you must delete the user first and then add them back with the correct permission)
Validation notes: provide at least one of users, teams; provide at least one of uuid, location.
Provide uuid or location. teams is not supported by the current service. Requires Super Admin and a private folder.
POST
https://cloudlab.scispot.io
/
labspace
/
folder
/
add-permissions
Add Permissions
curl --request POST \
--url https://cloudlab.scispot.io/labspace/folder/add-permissions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"location": "My Labspace:Protocols Folder",
"users": [
{
"email": "scientist@example.com",
"permission": "Editor"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
location: 'My Labspace:Protocols Folder',
users: [{email: 'scientist@example.com', permission: 'Editor'}]
})
};
fetch('https://cloudlab.scispot.io/labspace/folder/add-permissions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cloudlab.scispot.io/labspace/folder/add-permissions"
payload = {
"location": "My Labspace:Protocols Folder",
"users": [
{
"email": "scientist@example.com",
"permission": "Editor"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true
}{
"success": false,
"message": "Bad request"
}{
"success": false,
"message": "Invalid Authentication Token"
}{
"success": false,
"message": "Missing Authentication Token"
}{
"success": false,
"message": "Validation error"
}{
"success": false,
"message": "Operation failed"
}⌘I
