curl --request GET \
--url https://api.opal.dev/v1/resources \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.opal.dev/v1/resources"
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/resources', 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/resources",
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/resources"
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/resources")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opal.dev/v1/resources")
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": [
{
"resource_id": "f454d283-ca67-4a8a-bdbb-df212eca5353",
"description": "This resource represents AWS IAM role \"SupportUser\".",
"admin_owner_id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"remote_id": "arn:aws:iam::490306337630:role/SupportUser",
"remote_name": "SupportUser",
"max_duration": 120,
"require_manager_approval": false,
"require_support_ticket": false,
"parent_resource_id": "f454d283-ca67-4a8a-bdbb-df212eca5345"
},
{
"resource_id": "99d0b81d-14be-4cf6-bd27-348b4af1d11b",
"description": "This resource represents GCP project \"app-demo\".",
"remote_id": "app-demo-307223",
"remote_name": "app-demo",
"admin_owner_id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"max_duration": 360,
"require_manager_approval": false,
"require_support_ticket": true
}
]
}Returns a list of resources for your organization.
curl --request GET \
--url https://api.opal.dev/v1/resources \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.opal.dev/v1/resources"
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/resources', 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/resources",
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/resources"
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/resources")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opal.dev/v1/resources")
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": [
{
"resource_id": "f454d283-ca67-4a8a-bdbb-df212eca5353",
"description": "This resource represents AWS IAM role \"SupportUser\".",
"admin_owner_id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"remote_id": "arn:aws:iam::490306337630:role/SupportUser",
"remote_name": "SupportUser",
"max_duration": 120,
"require_manager_approval": false,
"require_support_ticket": false,
"parent_resource_id": "f454d283-ca67-4a8a-bdbb-df212eca5345"
},
{
"resource_id": "99d0b81d-14be-4cf6-bd27-348b4af1d11b",
"description": "This resource represents GCP project \"app-demo\".",
"remote_id": "app-demo-307223",
"remote_name": "app-demo",
"admin_owner_id": "7c86c85d-0651-43e2-a748-d69d658418e8",
"max_duration": 360,
"require_manager_approval": false,
"require_support_ticket": true
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
The pagination cursor value.
Number of results to return per page. Default is 200.
x <= 1000The resource type to filter by. Required when remote_id is provided. The type of the resource.
AWS_IAM_ROLE, AWS_EC2_INSTANCE, AWS_EKS_CLUSTER, AWS_RDS_POSTGRES_CLUSTER, AWS_RDS_POSTGRES_INSTANCE, AWS_RDS_MYSQL_CLUSTER, AWS_RDS_MYSQL_INSTANCE, AWS_ACCOUNT, AWS_SSO_PERMISSION_SET, AWS_ORGANIZATIONAL_UNIT, AZURE_MANAGEMENT_GROUP, AZURE_RESOURCE_GROUP, AZURE_SUBSCRIPTION, AZURE_VIRTUAL_MACHINE, AZURE_STORAGE_ACCOUNT, AZURE_STORAGE_CONTAINER, AZURE_SQL_SERVER, AZURE_SQL_MANAGED_INSTANCE, AZURE_SQL_DATABASE, AZURE_SQL_MANAGED_DATABASE, AZURE_USER_ASSIGNED_MANAGED_Identity, AZURE_ENTRA_ID_ROLE, AZURE_ENTERPRISE_APP, CUSTOM, CUSTOM_CONNECTOR, DATABRICKS_ACCOUNT_SERVICE_PRINCIPAL, GCP_ORGANIZATION, GCP_BUCKET, GCP_COMPUTE_INSTANCE, GCP_FOLDER, GCP_GKE_CLUSTER, GCP_PROJECT, GCP_CLOUD_SQL_POSTGRES_INSTANCE, GCP_CLOUD_SQL_MYSQL_INSTANCE, GCP_BIG_QUERY_DATASET, GCP_BIG_QUERY_TABLE, GCP_SERVICE_ACCOUNT, GCP_BILLING_ACCOUNT, GIT_HUB_REPO, GIT_HUB_ORG_ROLE, GIT_LAB_PROJECT, GOOGLE_WORKSPACE_ROLE, MONGO_INSTANCE, MONGO_ATLAS_INSTANCE, NETSUITE_ROLE, DATADOG_ROLE, OKTA_APP, OKTA_ROLE, OPAL_ROLE, OPAL_SCOPED_ROLE, PAGERDUTY_ROLE, TAILSCALE_SSH, SALESFORCE_PERMISSION_SET, SALESFORCE_PROFILE, SALESFORCE_ROLE, SNOWFLAKE_DATABASE, SNOWFLAKE_SCHEMA, SNOWFLAKE_TABLE, WORKDAY_ROLE, MYSQL_INSTANCE, MARIADB_INSTANCE, POSTGRES_INSTANCE, TELEPORT_ROLE, ILEVEL_ADVANCED_ROLE, DATASTAX_ASTRA_ROLE, COUPA_ROLE, CURSOR_ORGANIZATION, OPENAI_PLATFORM_PROJECT, OPENAI_PLATFORM_SERVICE_ACCOUNT, ANTHROPIC_WORKSPACE, GIT_HUB_ORG, ORACLE_FUSION_ROLE, DEVIN_ORGANIZATION, DEVIN_ROLE, VAULT_SECRET, VAULT_POLICY, VAULT_OIDC_ROLE, GIT_HUB_ENTERPRISE_ROLE, GRAFANA_FOLDER, GRAFANA_DASHBOARD, GRAFANA_BASIC_ROLE, GRAFANA_ROLE, CLICKHOUSE_DATABASE, CLICKHOUSE_TABLE, TWINGATE_RESOURCE, ZENDESK_ROLE, HUBSPOT_ROLE, ALICLOUD_RAM_ROLE, ALICLOUD_ECS_INSTANCE, DOCUSIGN_PERMISSION_PROFILE, ZOOM_ROLE, ZOOM_LICENSE "AWS_IAM_ROLE"
The resource ids to filter by.
Resource name.
The parent resource id to filter by.
The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource.
Filter resources by their remote id. This will return all resources that have a remote id that matches the provided remote id. Note that this requires resource_type_filter to be provided.
The IDs of the tags to filter by. Returns only resources that have any of these tags applied.
Response
One page worth resources associated with your organization.
Show child attributes
Show child attributes
The cursor with which to continue pagination if additional result pages exist.
"cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw"
The cursor used to obtain the current result page.
"cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ"
Was this page helpful?