Update folder permissions
curl --request PATCH \
--url https://{instance}.omniapp.co/api/v1/folders/{folderId}/permissions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accessBoost": false,
"userIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"userGroupIds": [
"<string>"
]
}
'import requests
url = "https://{instance}.omniapp.co/api/v1/folders/{folderId}/permissions"
payload = {
"accessBoost": False,
"userIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"userGroupIds": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accessBoost: false,
userIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
userGroupIds: ['<string>']
})
};
fetch('https://{instance}.omniapp.co/api/v1/folders/{folderId}/permissions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{instance}.omniapp.co/api/v1/folders/{folderId}/permissions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'accessBoost' => false,
'userIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'userGroupIds' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{instance}.omniapp.co/api/v1/folders/{folderId}/permissions"
payload := strings.NewReader("{\n \"accessBoost\": false,\n \"userIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"userGroupIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://{instance}.omniapp.co/api/v1/folders/{folderId}/permissions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accessBoost\": false,\n \"userIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"userGroupIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.omniapp.co/api/v1/folders/{folderId}/permissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accessBoost\": false,\n \"userIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"userGroupIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}Folder permissions
Update folder permissions
Update existing folder permissions for users or groups
PATCH
/
v1
/
folders
/
{folderId}
/
permissions
Update folder permissions
curl --request PATCH \
--url https://{instance}.omniapp.co/api/v1/folders/{folderId}/permissions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accessBoost": false,
"userIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"userGroupIds": [
"<string>"
]
}
'import requests
url = "https://{instance}.omniapp.co/api/v1/folders/{folderId}/permissions"
payload = {
"accessBoost": False,
"userIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"userGroupIds": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accessBoost: false,
userIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
userGroupIds: ['<string>']
})
};
fetch('https://{instance}.omniapp.co/api/v1/folders/{folderId}/permissions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{instance}.omniapp.co/api/v1/folders/{folderId}/permissions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'accessBoost' => false,
'userIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'userGroupIds' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{instance}.omniapp.co/api/v1/folders/{folderId}/permissions"
payload := strings.NewReader("{\n \"accessBoost\": false,\n \"userIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"userGroupIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://{instance}.omniapp.co/api/v1/folders/{folderId}/permissions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accessBoost\": false,\n \"userIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"userGroupIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.omniapp.co/api/v1/folders/{folderId}/permissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accessBoost\": false,\n \"userIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"userGroupIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}Authorizations
Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
Path Parameters
The UUID of the folder. Use the List folders endpoint to retrieve folder IDs.
Body
application/json
The content role to assign to the specified users or user groups.
Available options:
NO_ACCESS, VIEWER, EDITOR, MANAGER If true, AccessBoost is enabled for the folder.
The list of user IDs to update permissions for. Use the List users or List embed users endpoints to retrieve user IDs.
Either userIds or userGroupIds is required.
The list of user group IDs to update permissions for. Use the List user groups endpoint to retrieve user group IDs.
Either userIds or userGroupIds is required.
Response
Permissions updated successfully
Example:
true
Was this page helpful?
⌘I

