Skip to main content
GET
/
resources
Get resources
curl --request GET \
  --url https://api.opal.dev/v1/resources \
  --header 'Authorization: Bearer <token>'
{
  "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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

cursor
string

The pagination cursor value.

page_size
integer

Number of results to return per page. Default is 200.

Required range: x <= 1000
resource_type_filter
enum<string>

The resource type to filter by. Required when remote_id is provided.

Available options:
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,
GIT_HUB_REPO,
GIT_HUB_ORG_ROLE,
GIT_LAB_PROJECT,
GOOGLE_WORKSPACE_ROLE,
MONGO_INSTANCE,
MONGO_ATLAS_INSTANCE,
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
Example:

"AWS_IAM_ROLE"

resource_ids
string<uuid>[]

The resource ids to filter by.

resource_name
string

Resource name.

parent_resource_id
string<uuid>

The parent resource id to filter by.

ancestor_resource_id
string<uuid>

The ancestor resource id to filter by. Returns all resources that are descendants of the specified resource.

remote_id
string

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.

Response

200 - application/json

One page worth resources associated with your organization.

results
object[]
required
next
string | null

The cursor with which to continue pagination if additional result pages exist.

Example:

"cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw"

previous
string | null

The cursor used to obtain the current result page.

Example:

"cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ"