Check Access
curl --request POST \
--url https://sync.useparagon.com/api/permissions/{syncId}/check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"object": "a657df3b-17e2-5989-bc5f-13ddb7fdab41",
"user": "[email protected]"
}
'import requests
url = "https://sync.useparagon.com/api/permissions/{syncId}/check"
payload = {
"object": "a657df3b-17e2-5989-bc5f-13ddb7fdab41",
"user": "[email protected]"
}
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({object: 'a657df3b-17e2-5989-bc5f-13ddb7fdab41', user: '[email protected]'})
};
fetch('https://sync.useparagon.com/api/permissions/{syncId}/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}/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([
'object' => 'a657df3b-17e2-5989-bc5f-13ddb7fdab41',
'user' => '[email protected]'
]),
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}/check"
payload := strings.NewReader("{\n \"object\": \"a657df3b-17e2-5989-bc5f-13ddb7fdab41\",\n \"user\": \"[email protected]\"\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}/check")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"object\": \"a657df3b-17e2-5989-bc5f-13ddb7fdab41\",\n \"user\": \"[email protected]\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sync.useparagon.com/api/permissions/{syncId}/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 \"object\": \"a657df3b-17e2-5989-bc5f-13ddb7fdab41\",\n \"user\": \"[email protected]\"\n}"
response = http.request(request)
puts response.read_body{
"hasAccess": true
}Permissions API
Check Access
Check if a user has access to a specific Synced Object
POST
/
api
/
permissions
/
{syncId}
/
check
Check Access
curl --request POST \
--url https://sync.useparagon.com/api/permissions/{syncId}/check \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"object": "a657df3b-17e2-5989-bc5f-13ddb7fdab41",
"user": "[email protected]"
}
'import requests
url = "https://sync.useparagon.com/api/permissions/{syncId}/check"
payload = {
"object": "a657df3b-17e2-5989-bc5f-13ddb7fdab41",
"user": "[email protected]"
}
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({object: 'a657df3b-17e2-5989-bc5f-13ddb7fdab41', user: '[email protected]'})
};
fetch('https://sync.useparagon.com/api/permissions/{syncId}/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}/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([
'object' => 'a657df3b-17e2-5989-bc5f-13ddb7fdab41',
'user' => '[email protected]'
]),
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}/check"
payload := strings.NewReader("{\n \"object\": \"a657df3b-17e2-5989-bc5f-13ddb7fdab41\",\n \"user\": \"[email protected]\"\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}/check")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"object\": \"a657df3b-17e2-5989-bc5f-13ddb7fdab41\",\n \"user\": \"[email protected]\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sync.useparagon.com/api/permissions/{syncId}/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 \"object\": \"a657df3b-17e2-5989-bc5f-13ddb7fdab41\",\n \"user\": \"[email protected]\"\n}"
response = http.request(request)
puts response.read_body{
"hasAccess": true
}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
UUID of the Synced Object, returned from the Pull Synced Records endpoint.
Example:
"a657df3b-17e2-5989-bc5f-13ddb7fdab41"
The email of the user to check permissions for.
Example:
The role to use for the access check.
Available options:
can_read, can_write, is_owner Response
Access check result
Returns true if the user has access to the Synced Object with the specified role.
Was this page helpful?
⌘I