Access States
List access states
Returns a paginated list of access states — records of who currently has (or historically had) access to which application resources, including effective time ranges.
GET
/
api
/
v1
/
access_states
List access states
curl --request GET \
--url https://api.accessowl.com/api/v1/access_states \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.accessowl.com/api/v1/access_states"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.accessowl.com/api/v1/access_states', 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.accessowl.com/api/v1/access_states",
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.accessowl.com/api/v1/access_states"
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.accessowl.com/api/v1/access_states")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.accessowl.com/api/v1/access_states")
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{
"data": [
{
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"effective_start": "2023-11-07T05:31:56Z",
"grantee_user_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application": {
"description": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provisioning_type": "<string>",
"risk_level": "<string>",
"status": "<string>",
"title": "<string>",
"url": "<string>"
},
"effective_end": "2023-11-07T05:31:56Z",
"grantee_user": {
"deactivated_at": null,
"departments": [
"Engineering"
],
"email": "john@example.com",
"employment_type": "full_time",
"first_name": "John",
"full_name": "John Doe",
"id": "7488a646-e31f-11e4-aace-600308960662",
"inserted_at": "2023-01-01T00:00:00Z",
"job_title": "Software Engineer",
"last_name": "Doe",
"location_city": "San Francisco",
"manager_user_id": null,
"status": "active",
"teams": [
"Engineering",
"Backend"
],
"updated_at": "2023-01-01T00:00:00Z"
},
"grantee_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": {
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"multiple_permissions_selectable": true,
"parent_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requestable": true,
"title": "<string>",
"type": "<string>"
},
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_permission_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"target_permissions": [
{
"description": "<string>",
"elevated": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requestable": true,
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
]
}
],
"meta": {
"page": 1,
"page_size": 20,
"total_count": 100,
"total_pages": 5
}
}{
"error": "not_found",
"message": "Resource not found"
}{
"error": "not_found",
"message": "Resource not found"
}Authorizations
Bearer token authentication. Pass your AccessOwl API token in the Authorization header as Bearer <token>.
Query Parameters
Maximum results to return (default: 20, max: 100)
Opaque cursor returned in the previous response's meta.next_cursor. Omit for the first page.
Filter by application ID
Filter by grantee user ID
Comma-separated list of related objects to embed inline alongside their ID fields. Allowed values: grantee_user, application, resource, target_permissions. Embedded objects carry their own top-level fields only (no further nesting). An unknown value returns 400.
Was this page helpful?
⌘I
List access states
curl --request GET \
--url https://api.accessowl.com/api/v1/access_states \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.accessowl.com/api/v1/access_states"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.accessowl.com/api/v1/access_states', 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.accessowl.com/api/v1/access_states",
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.accessowl.com/api/v1/access_states"
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.accessowl.com/api/v1/access_states")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.accessowl.com/api/v1/access_states")
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{
"data": [
{
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"effective_start": "2023-11-07T05:31:56Z",
"grantee_user_account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application": {
"description": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provisioning_type": "<string>",
"risk_level": "<string>",
"status": "<string>",
"title": "<string>",
"url": "<string>"
},
"effective_end": "2023-11-07T05:31:56Z",
"grantee_user": {
"deactivated_at": null,
"departments": [
"Engineering"
],
"email": "john@example.com",
"employment_type": "full_time",
"first_name": "John",
"full_name": "John Doe",
"id": "7488a646-e31f-11e4-aace-600308960662",
"inserted_at": "2023-01-01T00:00:00Z",
"job_title": "Software Engineer",
"last_name": "Doe",
"location_city": "San Francisco",
"manager_user_id": null,
"status": "active",
"teams": [
"Engineering",
"Backend"
],
"updated_at": "2023-01-01T00:00:00Z"
},
"grantee_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource": {
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"multiple_permissions_selectable": true,
"parent_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requestable": true,
"title": "<string>",
"type": "<string>"
},
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_permission_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"target_permissions": [
{
"description": "<string>",
"elevated": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requestable": true,
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
]
}
],
"meta": {
"page": 1,
"page_size": 20,
"total_count": 100,
"total_pages": 5
}
}{
"error": "not_found",
"message": "Resource not found"
}{
"error": "not_found",
"message": "Resource not found"
}
