Get sages for a council
curl --request GET \
--url https://{domain}/wp-json/sagescreen/v1/councils/{council_id}/sages \
--header 'X-WP-Nonce: <api-key>'import requests
url = "https://{domain}/wp-json/sagescreen/v1/councils/{council_id}/sages"
headers = {"X-WP-Nonce": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-WP-Nonce': '<api-key>'}};
fetch('https://{domain}/wp-json/sagescreen/v1/councils/{council_id}/sages', 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://{domain}/wp-json/sagescreen/v1/councils/{council_id}/sages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-WP-Nonce: <api-key>"
],
]);
$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://{domain}/wp-json/sagescreen/v1/councils/{council_id}/sages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-WP-Nonce", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{domain}/wp-json/sagescreen/v1/councils/{council_id}/sages")
.header("X-WP-Nonce", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/wp-json/sagescreen/v1/councils/{council_id}/sages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-WP-Nonce"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"id": 1234,
"name": "Customer Service - Core Representative",
"status": "Active",
"created_on": "2025-01-15 09:30:00",
"last_screen": "John Doe - Customer Service",
"created_by": "Admin User",
"screens_count": 12,
"is_system_sage": 1
},
{
"id": 1235,
"name": "Software Engineer - Senior Developer",
"status": "Draft (Step: 3)",
"created_on": "2025-02-01 14:00:00",
"last_screen": "",
"created_by": "Jane Smith",
"screens_count": 0,
"is_system_sage": 0
}
],
"message": "Council sages retrieved successfully"
}{
"code": "missing_council_id",
"message": "No council context found",
"data": {
"status": 400
}
}{
"code": "rest_not_logged_in",
"message": "You are not currently logged in.",
"data": {
"status": 401
}
}{
"code": "rest_forbidden",
"message": "Sorry, you are not allowed to do that.",
"data": {
"status": 403
}
}{
"code": "internal_error",
"message": "Error retrieving council sages",
"data": {
"status": 500
}
}Sage – REST
Get sages for a council
Returns all council sages for the given council. Non-admin users
(council_member role) only see sages in ss_active status.
All other roles see sages in all valid statuses.
Requires a valid JWT Bearer token and the ss_council_sage capability.
GET
/
councils
/
{council_id}
/
sages
Get sages for a council
curl --request GET \
--url https://{domain}/wp-json/sagescreen/v1/councils/{council_id}/sages \
--header 'X-WP-Nonce: <api-key>'import requests
url = "https://{domain}/wp-json/sagescreen/v1/councils/{council_id}/sages"
headers = {"X-WP-Nonce": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-WP-Nonce': '<api-key>'}};
fetch('https://{domain}/wp-json/sagescreen/v1/councils/{council_id}/sages', 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://{domain}/wp-json/sagescreen/v1/councils/{council_id}/sages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-WP-Nonce: <api-key>"
],
]);
$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://{domain}/wp-json/sagescreen/v1/councils/{council_id}/sages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-WP-Nonce", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{domain}/wp-json/sagescreen/v1/councils/{council_id}/sages")
.header("X-WP-Nonce", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/wp-json/sagescreen/v1/councils/{council_id}/sages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-WP-Nonce"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"id": 1234,
"name": "Customer Service - Core Representative",
"status": "Active",
"created_on": "2025-01-15 09:30:00",
"last_screen": "John Doe - Customer Service",
"created_by": "Admin User",
"screens_count": 12,
"is_system_sage": 1
},
{
"id": 1235,
"name": "Software Engineer - Senior Developer",
"status": "Draft (Step: 3)",
"created_on": "2025-02-01 14:00:00",
"last_screen": "",
"created_by": "Jane Smith",
"screens_count": 0,
"is_system_sage": 0
}
],
"message": "Council sages retrieved successfully"
}{
"code": "missing_council_id",
"message": "No council context found",
"data": {
"status": 400
}
}{
"code": "rest_not_logged_in",
"message": "You are not currently logged in.",
"data": {
"status": 401
}
}{
"code": "rest_forbidden",
"message": "Sorry, you are not allowed to do that.",
"data": {
"status": 403
}
}{
"code": "internal_error",
"message": "Error retrieving council sages",
"data": {
"status": 500
}
}Authorizations
WordPress REST nonce (wp_rest action)
Path Parameters
Council UUID
Example:
"c9d8e7f6-5a4b-3c2d-1e0f-a1b2c3d4e5f6"
⌘I