Get Session by ID
curl --request GET \
--url https://eu.whitecircle.com/api/protect/get_by_id \
--header 'Authorization: Bearer <token>' \
--header 'whitecircle-version: <whitecircle-version>'import requests
url = "https://eu.whitecircle.com/api/protect/get_by_id"
headers = {
"whitecircle-version": "<whitecircle-version>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'whitecircle-version': '<whitecircle-version>',
Authorization: 'Bearer <token>'
}
};
fetch('https://eu.whitecircle.com/api/protect/get_by_id', 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://eu.whitecircle.com/api/protect/get_by_id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"whitecircle-version: <whitecircle-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://eu.whitecircle.com/api/protect/get_by_id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("whitecircle-version", "<whitecircle-version>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://eu.whitecircle.com/api/protect/get_by_id")
.header("whitecircle-version", "<whitecircle-version>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.whitecircle.com/api/protect/get_by_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["whitecircle-version"] = '<whitecircle-version>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"list": [
{
"external_id": "user-session-001",
"internal_id": "123e4567-e89b-12d3-a456-426614174000",
"violation": true,
"violations": {
"70289e06-9111-463e-b121-7247c2b7bfbd": {
"name": "No PII Sharing",
"violation": true
},
"a4a91875-1e54-42d7-b9b0-a75dfebeb057": {
"name": "Drugs",
"violation": false
}
}
}
]
}Required Parameters
| Parameter | Description |
|---|---|
deployment_id | Specific deployment ID used for the check. See Deployments. |
Authorizations
API Key required. Format: Bearer wc-your-api-key
Headers
API Version
Query Parameters
Specific deployment ID used for the check. See Deployments.
Whether to include human-readable policy names in the response (default: false)
Find check results by external ID (your tracking identifier)
Find check results by internal ID (system-generated UUID)
Response
Success
List of check results matching the query
Hide child attributes
Hide child attributes
Unique internal identifier for this check
Whether any policy violations were detected
Map of policy IDs to policy status objects containing violation and optional name
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Whether a violation was detected for this policy
Sources where violations were detected (includes only triggered violations)
text, image Human-readable policy name (only present if include_policy_names=true)
{
"name": "No PII Sharing",
"violation": true,
"violation_source": ["text"]
}
Optional external identifier provided by client
curl --request GET \
--url https://eu.whitecircle.com/api/protect/get_by_id \
--header 'Authorization: Bearer <token>' \
--header 'whitecircle-version: <whitecircle-version>'import requests
url = "https://eu.whitecircle.com/api/protect/get_by_id"
headers = {
"whitecircle-version": "<whitecircle-version>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'whitecircle-version': '<whitecircle-version>',
Authorization: 'Bearer <token>'
}
};
fetch('https://eu.whitecircle.com/api/protect/get_by_id', 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://eu.whitecircle.com/api/protect/get_by_id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"whitecircle-version: <whitecircle-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://eu.whitecircle.com/api/protect/get_by_id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("whitecircle-version", "<whitecircle-version>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://eu.whitecircle.com/api/protect/get_by_id")
.header("whitecircle-version", "<whitecircle-version>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.whitecircle.com/api/protect/get_by_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["whitecircle-version"] = '<whitecircle-version>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"list": [
{
"external_id": "user-session-001",
"internal_id": "123e4567-e89b-12d3-a456-426614174000",
"violation": true,
"violations": {
"70289e06-9111-463e-b121-7247c2b7bfbd": {
"name": "No PII Sharing",
"violation": true
},
"a4a91875-1e54-42d7-b9b0-a75dfebeb057": {
"name": "Drugs",
"violation": false
}
}
}
]
}