List realms
Lists the realms you are a member of, 50 per page by default (at most 100), across all
your organizations or only org_id. Filter by exact slug, search with query, or
owned: me for realms you own.
Requires a signed-in user token; with org_id, membership in that organization. With neither, the results are limited to what you can see.
POST
/
v1
/
realms
/
get
List realms
curl --request POST \
--url https://{host}/v1/realms/get \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"org_id": "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
"sort_by": "name"
}
'import requests
url = "https://{host}/v1/realms/get"
payload = {
"org_id": "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
"sort_by": "name"
}
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({org_id: '2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f', sort_by: 'name'})
};
fetch('https://{host}/v1/realms/get', 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://{host}/v1/realms/get",
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([
'org_id' => '2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f',
'sort_by' => 'name'
]),
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://{host}/v1/realms/get"
payload := strings.NewReader("{\n \"org_id\": \"2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f\",\n \"sort_by\": \"name\"\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://{host}/v1/realms/get")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"org_id\": \"2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f\",\n \"sort_by\": \"name\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/v1/realms/get")
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 \"org_id\": \"2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f\",\n \"sort_by\": \"name\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"items": [
{
"id": "5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b",
"slug": "production",
"org_slug": "acme",
"qualified_slug": "acme.production",
"name": "Production",
"owner_user_id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"created_by": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"created_by_username": "sshah",
"created_at": 1759000000000,
"updated_at": 1759000000000
}
],
"total": 1,
"offset": 0,
"limit": 50,
"type": "array"
}
}{
"ok": false,
"error": {
"code": "unauthorized",
"message": "Authentication required"
}
}{
"ok": false,
"error": {
"code": "forbidden",
"message": "You do not have access to do this"
}
}{
"ok": false,
"error": {
"code": "not_found",
"message": "Not found"
}
}{
"ok": false,
"error": "slug: Required",
"code": "invalid_params"
}{
"ok": false,
"error": "Internal server error",
"code": "internal_error"
}Authorizations
User PAT (cliq_tok_…, including session-scoped) or realm token (cliq_dt_…).
Body
application/json
Exact slug filter
Minimum string length:
1Substring search on slug or name
Minimum string length:
1me = owned by caller; default = personal default realm
Available options:
me, default When set, only realms in this org
Page size (default server-side)
Required range:
1 <= x <= 100Page offset
Required range:
x >= 0Sort column
Available options:
slug, name, created_at, updated_at, created_by Sort direction
Available options:
asc, desc Site admins only: every record on the hub, not just the caller\
⌘I
List realms
curl --request POST \
--url https://{host}/v1/realms/get \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"org_id": "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
"sort_by": "name"
}
'import requests
url = "https://{host}/v1/realms/get"
payload = {
"org_id": "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
"sort_by": "name"
}
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({org_id: '2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f', sort_by: 'name'})
};
fetch('https://{host}/v1/realms/get', 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://{host}/v1/realms/get",
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([
'org_id' => '2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f',
'sort_by' => 'name'
]),
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://{host}/v1/realms/get"
payload := strings.NewReader("{\n \"org_id\": \"2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f\",\n \"sort_by\": \"name\"\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://{host}/v1/realms/get")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"org_id\": \"2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f\",\n \"sort_by\": \"name\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/v1/realms/get")
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 \"org_id\": \"2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f\",\n \"sort_by\": \"name\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"items": [
{
"id": "5b0c3a7e-2f4d-4b8e-9a51-7c1d2e3f4a5b",
"slug": "production",
"org_slug": "acme",
"qualified_slug": "acme.production",
"name": "Production",
"owner_user_id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"created_by": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"created_by_username": "sshah",
"created_at": 1759000000000,
"updated_at": 1759000000000
}
],
"total": 1,
"offset": 0,
"limit": 50,
"type": "array"
}
}{
"ok": false,
"error": {
"code": "unauthorized",
"message": "Authentication required"
}
}{
"ok": false,
"error": {
"code": "forbidden",
"message": "You do not have access to do this"
}
}{
"ok": false,
"error": {
"code": "not_found",
"message": "Not found"
}
}{
"ok": false,
"error": "slug: Required",
"code": "invalid_params"
}{
"ok": false,
"error": "Internal server error",
"code": "internal_error"
}