curl --request GET \
--url https://api.opal.dev/v1/groups \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.opal.dev/v1/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.opal.dev/v1/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.opal.dev/v1/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.opal.dev/v1/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.opal.dev/v1/groups")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opal.dev/v1/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{
"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
"previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ",
"results": [
{
"group_id": "f454d283-ca87-4a8a-bdbb-df212eca5353",
"app_id": "b5a5ca27-0ea3-4d86-9199-2126d57d1fbd",
"name": "Payments Production Admin",
"description": "This group represents Active Directory group \"Payments Production Admin\". We use this AD group to facilitate staging deployments and qualifying new releases.",
"admin_owner_id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"group_leader_user_ids": [
"7c86c85d-0651-43e2-a748-d69d658418e8"
],
"remote_id": "037m2jsg218b2wb",
"remote_name": "Finance Team",
"group_type": "ACTIVE_DIRECTORY_GROUP",
"max_duration": 120,
"recommended_duration": 60,
"extensions_duration_in_minutes": 60,
"require_manager_approval": false,
"require_support_ticket": false,
"require_mfa_to_approve": false,
"require_mfa_to_request": false,
"auto_approval": false,
"is_requestable": true
},
{
"group_id": "99d0b81d-14be-4cf6-bd27-348b4af1d11b",
"app_id": "a7c3e291-1234-4abc-9def-1234567890ab",
"name": "Integrations On-Call",
"description": "Manages the Integrations Team on-call privileged resources. This group is automatically synced with the on-call rotation defined in PagerDuty.",
"admin_owner_id": "4220bc12-ab8a-4b5d-be7b-f6bbcf9159f3",
"group_leader_user_ids": [],
"remote_id": "pagerduty-schedule:P123XYZ",
"remote_name": "Integrations On-Call",
"group_type": "PAGERDUTY_ON_CALL_SCHEDULE",
"max_duration": 360,
"recommended_duration": 120,
"extensions_duration_in_minutes": 0,
"require_manager_approval": false,
"require_support_ticket": true,
"require_mfa_to_approve": false,
"require_mfa_to_request": false,
"auto_approval": false,
"is_requestable": true
}
]
}Get groups
Returns a list of groups for your organization.
curl --request GET \
--url https://api.opal.dev/v1/groups \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.opal.dev/v1/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.opal.dev/v1/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.opal.dev/v1/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.opal.dev/v1/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.opal.dev/v1/groups")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opal.dev/v1/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{
"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
"previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ",
"results": [
{
"group_id": "f454d283-ca87-4a8a-bdbb-df212eca5353",
"app_id": "b5a5ca27-0ea3-4d86-9199-2126d57d1fbd",
"name": "Payments Production Admin",
"description": "This group represents Active Directory group \"Payments Production Admin\". We use this AD group to facilitate staging deployments and qualifying new releases.",
"admin_owner_id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"group_leader_user_ids": [
"7c86c85d-0651-43e2-a748-d69d658418e8"
],
"remote_id": "037m2jsg218b2wb",
"remote_name": "Finance Team",
"group_type": "ACTIVE_DIRECTORY_GROUP",
"max_duration": 120,
"recommended_duration": 60,
"extensions_duration_in_minutes": 60,
"require_manager_approval": false,
"require_support_ticket": false,
"require_mfa_to_approve": false,
"require_mfa_to_request": false,
"auto_approval": false,
"is_requestable": true
},
{
"group_id": "99d0b81d-14be-4cf6-bd27-348b4af1d11b",
"app_id": "a7c3e291-1234-4abc-9def-1234567890ab",
"name": "Integrations On-Call",
"description": "Manages the Integrations Team on-call privileged resources. This group is automatically synced with the on-call rotation defined in PagerDuty.",
"admin_owner_id": "4220bc12-ab8a-4b5d-be7b-f6bbcf9159f3",
"group_leader_user_ids": [],
"remote_id": "pagerduty-schedule:P123XYZ",
"remote_name": "Integrations On-Call",
"group_type": "PAGERDUTY_ON_CALL_SCHEDULE",
"max_duration": 360,
"recommended_duration": 120,
"extensions_duration_in_minutes": 0,
"require_manager_approval": false,
"require_support_ticket": true,
"require_mfa_to_approve": false,
"require_mfa_to_request": false,
"auto_approval": false,
"is_requestable": true
}
]
}Authorizations
Query Parameters
The group type to filter by. Required when remote_id is provided. The type of the group.
ACTIVE_DIRECTORY_GROUP, AWS_SSO_GROUP, DATABRICKS_ACCOUNT_GROUP, DUO_GROUP, GIT_HUB_TEAM, GIT_LAB_GROUP, GOOGLE_GROUPS_GROUP, GOOGLE_GROUPS_GKE_GROUP, LDAP_GROUP, OKTA_GROUP, OKTA_GROUP_RULE, TAILSCALE_GROUP, OPAL_GROUP, OPAL_ACCESS_RULE, AZURE_AD_SECURITY_GROUP, AZURE_AD_MICROSOFT_365_GROUP, CONNECTOR_GROUP, SNOWFLAKE_ROLE, WORKDAY_USER_SECURITY_GROUP, PAGERDUTY_ON_CALL_SCHEDULE, INCIDENTIO_ON_CALL_SCHEDULE, ROOTLY_ON_CALL_SCHEDULE, DATADOG_ON_CALL_SCHEDULE, DEVIN_GROUP, GIT_HUB_ENTERPRISE_TEAM, GRAFANA_TEAM, CLICKHOUSE_ROLE, SLACK_USER_GROUP, CURSOR_GROUP, ANTHROPIC_RBAC_GROUP, TWINGATE_GROUP, TWINGATE_GROUP_SYNCED, ZENDESK_GROUP, ZENDESK_ORGANIZATION, HUBSPOT_TEAM, TABLEAU_GROUP, CONFLUENCE_GROUP, JIRA_GROUP, DOCUSIGN_GROUP, ZOOM_GROUP, LINEAR_TEAM, RAMP_DEPARTMENT, RAMP_LOCATION, WRIKE_GROUP, AXIOM_GROUP, BOX_GROUP, VAULT_IDENTITY_GROUP, ACTIVECAMPAIGN_GROUP, AHA_TEAM, ASANA_TEAM, BITWARDEN_GROUP, CALENDLY_GROUP, MIRO_TEAM, MIRO_USER_GROUP, ONELOGIN_ROLE, ONELOGIN_GROUP, SQUARE_LOCATION, SQUARE_JOB, RIPPLING_DEPARTMENT, RIPPLING_TEAM, RIPPLING_SUPERGROUP "OPAL_GROUP"
How to apply group_name. Requires group_name to be set. Defaults to CONTAINS when group_name is provided without this parameter.
How to match a free-text name filter on list endpoints. All match types are case-insensitive. When omitted, CONTAINS is used. REGEX is not supported here — use POST /queries/run for regular-expression matching.
CONTAINS, EQUALS, STARTS_WITH, ENDS_WITH Filter groups by their remote id. Returns groups whose remote id matches the provided value exactly. Requires group_type_filter. Remote ids are only unique within a connection, so groups from different connections can share a remote id and more than one group may be returned. Unmanaged groups are not returned.
Only return groups this user can request at one or more access levels, using the same
evaluation as GET /groups/{group_id}/requestable/users/{user_id}. Filtering for
another user requires an Opal admin or a custom role with the CHECK_REQUESTABILITY
permission. The response is always filtered by the caller's own READ visibility, so a
non-admin CHECK_REQUESTABILITY holder sees the intersection of groups they can read
and groups the target user can request. Filtering for yourself needs no permission.
Response
One page worth groups associated with your organization.
Was this page helpful?