curl --request GET \
--url https://{subdomain}.logicgate.com/api/v2/audits/access \
--header 'Authorization: Bearer <token>'import requests
url = "https://{subdomain}.logicgate.com/api/v2/audits/access"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{subdomain}.logicgate.com/api/v2/audits/access', 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://{subdomain}.logicgate.com/api/v2/audits/access",
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://{subdomain}.logicgate.com/api/v2/audits/access"
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://{subdomain}.logicgate.com/api/v2/audits/access")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.logicgate.com/api/v2/audits/access")
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{
"content": [
{
"id": "a1b2c3d4",
"type": "LOGIN",
"user": {
"id": "a1b2c3d4",
"name": "Jane Doe",
"email": "jane.doe@example.com",
"object": "user"
},
"remoteAddress": "192.168.1.1",
"details": "Login succeeded",
"created": 1672552800000,
"object": "access_audit"
}
],
"links": {
"first": "/api/v2/resource?page=0&size=20",
"prev": "/api/v2/resource?page=2&size=20",
"self": "/api/v2/resource?page=3&size=20",
"next": "/api/v2/resource?page=4&size=20",
"last": "/api/v2/resource?page=6&size=20"
},
"page": {
"size": 20,
"totalElements": 50,
"totalPages": 3,
"number": 0
}
}Retrieve access audits
Permissions: Productivity Entitlement
Retrieve a page of all access audits.
curl --request GET \
--url https://{subdomain}.logicgate.com/api/v2/audits/access \
--header 'Authorization: Bearer <token>'import requests
url = "https://{subdomain}.logicgate.com/api/v2/audits/access"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{subdomain}.logicgate.com/api/v2/audits/access', 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://{subdomain}.logicgate.com/api/v2/audits/access",
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://{subdomain}.logicgate.com/api/v2/audits/access"
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://{subdomain}.logicgate.com/api/v2/audits/access")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.logicgate.com/api/v2/audits/access")
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{
"content": [
{
"id": "a1b2c3d4",
"type": "LOGIN",
"user": {
"id": "a1b2c3d4",
"name": "Jane Doe",
"email": "jane.doe@example.com",
"object": "user"
},
"remoteAddress": "192.168.1.1",
"details": "Login succeeded",
"created": 1672552800000,
"object": "access_audit"
}
],
"links": {
"first": "/api/v2/resource?page=0&size=20",
"prev": "/api/v2/resource?page=2&size=20",
"self": "/api/v2/resource?page=3&size=20",
"next": "/api/v2/resource?page=4&size=20",
"last": "/api/v2/resource?page=6&size=20"
},
"page": {
"size": 20,
"totalElements": 50,
"totalPages": 3,
"number": 0
}
}Authorizations
Bearer token issued via the Authentication endpoints.
Headers
A bearer authorization header containing a Risk Cloud API access token in the format Authorization: Bearer TOKEN — replace TOKEN with your actual access token.
To obtain a Risk Cloud API access token, refer to Obtain an API Access Token in the LogicGate Help Center.
Query Parameters
Filter by user ID associated with the access audit entry.
Filter by email address associated with the access audit entry.
Filter by type of access event (LOGIN, LOGOUT, LOGIN_FAILED, CREDENTIALS_ROLLED, TOKEN_ROLLED).
LOGIN, LOGOUT, LOGIN_FAILED, CREDENTIALS_ROLLED, TOKEN_ROLLED, OTHER Minimum created timestamp of the access audit in milliseconds since the Unix epoch (inclusive).
Maximum created timestamp of the access audit in milliseconds since the Unix epoch (inclusive).
The zero-indexed page number (must not be less than 0, defaults to 0)
x >= 0The size of the page and maximum number of items to be returned (must not be less than 1, defaults to 20)
x >= 1