List groups
curl --request GET \
--url https://api.onecli.sh/scim/v2/Groups \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onecli.sh/scim/v2/Groups"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.onecli.sh/scim/v2/Groups', 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://api.onecli.sh/scim/v2/Groups",
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>"
],
]);
$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://api.onecli.sh/scim/v2/Groups"
req, _ := http.NewRequest("GET", url, nil)
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://api.onecli.sh/scim/v2/Groups")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onecli.sh/scim/v2/Groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:ListResponse"
],
"totalResults": 123,
"startIndex": 123,
"itemsPerPage": 123,
"Resources": [
{}
]
}{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"status": "<string>",
"scimType": "<string>",
"detail": "<string>"
}SCIM 2.0
List SCIM groups with filtering
Returns groups in RFC 7644 list format. Filter by displayName or externalId equality, and page with startIndex and count, which defaults to 100, max 500.
GET
/
Groups
List groups
curl --request GET \
--url https://api.onecli.sh/scim/v2/Groups \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onecli.sh/scim/v2/Groups"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.onecli.sh/scim/v2/Groups', 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://api.onecli.sh/scim/v2/Groups",
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>"
],
]);
$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://api.onecli.sh/scim/v2/Groups"
req, _ := http.NewRequest("GET", url, nil)
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://api.onecli.sh/scim/v2/Groups")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onecli.sh/scim/v2/Groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:ListResponse"
],
"totalResults": 123,
"startIndex": 123,
"itemsPerPage": 123,
"Resources": [
{}
]
}{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"status": "<string>",
"scimType": "<string>",
"detail": "<string>"
}An RFC 7644 list. Filter with
displayName eq "..." or externalId eq "...", and page with startIndex and count (default 100, max 500).
Related guide: User provisioning: set up SCIM.
RFC 7644 list with filter (displayName eq "…" or externalId eq "…"), startIndex, and count (default 100, max 500).
Availability: Cloud · Enterprise (self-hosted). The SCIM endpoint answers
401 on an unlicensed self-hosted deployment.SCIM lives on its own base URL:
https://api.onecli.sh/scim/v2 on Cloud, http://localhost:10254/scim/v2 self-hosted. It authenticates with a SCIM token (oc_scim_…, minted at POST /org/scim/tokens), never a OneCLI API key, and speaks application/scim+json per RFC 7644. Each token is rate-limited to 600 requests per minute.Authorizations
A workspace API key (oc_…) or organization API key (oc_org_…). Workspace-scoped endpoints called with an organization key also need X-Workspace-Id.