Batch Check Access
curl --request POST \
--url https://sync.useparagon.com/api/permissions/{syncId}/batch-check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"checks": [
{
"object": "a657df3b-17e2-5989-bc5f-13ddb7fdab41",
"user": "user:email@example.com"
}
]
}
'import requests
url = "https://sync.useparagon.com/api/permissions/{syncId}/batch-check"
payload = { "checks": [
{
"object": "a657df3b-17e2-5989-bc5f-13ddb7fdab41",
"user": "user:email@example.com"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
checks: [
{object: 'a657df3b-17e2-5989-bc5f-13ddb7fdab41', user: 'user:email@example.com'}
]
})
};
fetch('https://sync.useparagon.com/api/permissions/{syncId}/batch-check', 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://sync.useparagon.com/api/permissions/{syncId}/batch-check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'checks' => [
[
'object' => 'a657df3b-17e2-5989-bc5f-13ddb7fdab41',
'user' => 'user:email@example.com'
]
]
]),
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://sync.useparagon.com/api/permissions/{syncId}/batch-check"
payload := strings.NewReader("{\n \"checks\": [\n {\n \"object\": \"a657df3b-17e2-5989-bc5f-13ddb7fdab41\",\n \"user\": \"user:email@example.com\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://sync.useparagon.com/api/permissions/{syncId}/batch-check")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"checks\": [\n {\n \"object\": \"a657df3b-17e2-5989-bc5f-13ddb7fdab41\",\n \"user\": \"user:email@example.com\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sync.useparagon.com/api/permissions/{syncId}/batch-check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"checks\": [\n {\n \"object\": \"a657df3b-17e2-5989-bc5f-13ddb7fdab41\",\n \"user\": \"user:email@example.com\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"result": [
{
"allowed": true,
"request": {
"object": "a657df3b-17e2-5989-bc5f-13ddb7fdab41",
"user": "user:email@example.com"
},
"error": "<string>"
}
]
}Permissions API
Batch Check Access
Check access for a list of users and Synced Objects
POST
/
api
/
permissions
/
{syncId}
/
batch-check
Batch Check Access
curl --request POST \
--url https://sync.useparagon.com/api/permissions/{syncId}/batch-check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"checks": [
{
"object": "a657df3b-17e2-5989-bc5f-13ddb7fdab41",
"user": "user:email@example.com"
}
]
}
'import requests
url = "https://sync.useparagon.com/api/permissions/{syncId}/batch-check"
payload = { "checks": [
{
"object": "a657df3b-17e2-5989-bc5f-13ddb7fdab41",
"user": "user:email@example.com"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
checks: [
{object: 'a657df3b-17e2-5989-bc5f-13ddb7fdab41', user: 'user:email@example.com'}
]
})
};
fetch('https://sync.useparagon.com/api/permissions/{syncId}/batch-check', 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://sync.useparagon.com/api/permissions/{syncId}/batch-check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'checks' => [
[
'object' => 'a657df3b-17e2-5989-bc5f-13ddb7fdab41',
'user' => 'user:email@example.com'
]
]
]),
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://sync.useparagon.com/api/permissions/{syncId}/batch-check"
payload := strings.NewReader("{\n \"checks\": [\n {\n \"object\": \"a657df3b-17e2-5989-bc5f-13ddb7fdab41\",\n \"user\": \"user:email@example.com\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://sync.useparagon.com/api/permissions/{syncId}/batch-check")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"checks\": [\n {\n \"object\": \"a657df3b-17e2-5989-bc5f-13ddb7fdab41\",\n \"user\": \"user:email@example.com\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sync.useparagon.com/api/permissions/{syncId}/batch-check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"checks\": [\n {\n \"object\": \"a657df3b-17e2-5989-bc5f-13ddb7fdab41\",\n \"user\": \"user:email@example.com\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"result": [
{
"allowed": true,
"request": {
"object": "a657df3b-17e2-5989-bc5f-13ddb7fdab41",
"user": "user:email@example.com"
},
"error": "<string>"
}
]
}Authorizations
Paragon User Token. Add to the Authorization header of your requests.
Path Parameters
UUID of the Sync to query, returned from the Enable Sync endpoint.
Body
application/json
A list of access checks to perform between users and Synced Objects.
Show child attributes
Show child attributes
Response
Batch access check result
Show child attributes
Show child attributes
Was this page helpful?
⌘I