Conditions
Get Condition
GET
/
api
/
condition
/
{id}
cURL
curl --request GET \
--url https://eu.whitecircle.com/api/condition/{id} \
--header 'Authorization: Bearer <token>' \
--header 'whitecircle-version: <whitecircle-version>'import requests
url = "https://eu.whitecircle.com/api/condition/{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/condition/{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/condition/{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/condition/{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/condition/{id}")
.header("whitecircle-version", "<whitecircle-version>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.whitecircle.com/api/condition/{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{
"conditions": {
"conditions": [
{
"field": "user.region",
"operator": "eq",
"type": "condition",
"value": "eu"
}
],
"op": "and",
"type": "group"
},
"created_at": "2026-06-01T12:00:00Z",
"description": "Applies stricter Policies to users in the EU",
"environment_ids": [
"117b391d-569a-4b55-8241-9f172b17a63d"
],
"id": "019f0000-0000-7000-8000-000000000001",
"metric_ids": [
"6c0710ea-d669-49b9-9465-e52aebf95b66"
],
"name": "EU users",
"policy_ids": [
"70289e06-9111-463e-b121-7247c2b7bfbd"
],
"revision_id": "019f0000-0000-7000-8000-0000000000f1",
"state": "active",
"updated_at": "2026-06-01T12:00:00Z"
}Get the current revision of a Condition by its stable Condition ID, including an inactive Condition.
The response includes
This endpoint is available only in API version
2026-06-01. Send the whitecircle-version: 2026-06-01 header on every request.revision_id, the metadata expression, state, Policy IDs in policy_ids, Metric IDs in metric_ids, and Environment attachments in environment_ids.Authorizations
API Key required. Format: Bearer wc-your-api-key
Headers
API Version
Path Parameters
Response
Success
Available options:
Active, Inactive, Draft ⌘I
cURL
curl --request GET \
--url https://eu.whitecircle.com/api/condition/{id} \
--header 'Authorization: Bearer <token>' \
--header 'whitecircle-version: <whitecircle-version>'import requests
url = "https://eu.whitecircle.com/api/condition/{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/condition/{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/condition/{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/condition/{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/condition/{id}")
.header("whitecircle-version", "<whitecircle-version>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.whitecircle.com/api/condition/{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{
"conditions": {
"conditions": [
{
"field": "user.region",
"operator": "eq",
"type": "condition",
"value": "eu"
}
],
"op": "and",
"type": "group"
},
"created_at": "2026-06-01T12:00:00Z",
"description": "Applies stricter Policies to users in the EU",
"environment_ids": [
"117b391d-569a-4b55-8241-9f172b17a63d"
],
"id": "019f0000-0000-7000-8000-000000000001",
"metric_ids": [
"6c0710ea-d669-49b9-9465-e52aebf95b66"
],
"name": "EU users",
"policy_ids": [
"70289e06-9111-463e-b121-7247c2b7bfbd"
],
"revision_id": "019f0000-0000-7000-8000-0000000000f1",
"state": "active",
"updated_at": "2026-06-01T12:00:00Z"
}