List security audit logs
curl --request GET \
--url https://use.hoop.dev/api/audit/logsimport requests
url = "https://use.hoop.dev/api/audit/logs"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://use.hoop.dev/api/audit/logs', 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://use.hoop.dev/api/audit/logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://use.hoop.dev/api/audit/logs"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://use.hoop.dev/api/audit/logs")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/audit/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"action": "create",
"actor_email": "admin@example.com",
"actor_name": "Admin User",
"actor_subject": "auth0|abc123",
"client_ip": "192.168.1.100",
"created_at": "2023-08-15T14:30:45Z",
"error_message": "",
"http_method": "POST",
"http_path": "/api/connections",
"http_status": 201,
"id": "5364ec99-653b-41ba-8165-67236e894990",
"org_id": "0CD7F941-2BB8-4F9F-93B0-11620D4652AB",
"outcome": true,
"request_payload_redacted": {},
"resource_type": "connections"
}
],
"pages": {
"page": 123,
"size": 123,
"total": 123
}
}{
"message": "the error description"
}{
"message": "the error description"
}{
"message": "the error description"
}Audit Logs
List security audit logs
Lists security audit log entries for the organization. Only admins can access this API. Supports filtering by actor, resource type, action, HTTP method, HTTP status, client IP, path, outcome, and date range. Results are ordered by created_at descending.
GET
/
audit
/
logs
List security audit logs
curl --request GET \
--url https://use.hoop.dev/api/audit/logsimport requests
url = "https://use.hoop.dev/api/audit/logs"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://use.hoop.dev/api/audit/logs', 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://use.hoop.dev/api/audit/logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://use.hoop.dev/api/audit/logs"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://use.hoop.dev/api/audit/logs")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/audit/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"action": "create",
"actor_email": "admin@example.com",
"actor_name": "Admin User",
"actor_subject": "auth0|abc123",
"client_ip": "192.168.1.100",
"created_at": "2023-08-15T14:30:45Z",
"error_message": "",
"http_method": "POST",
"http_path": "/api/connections",
"http_status": 201,
"id": "5364ec99-653b-41ba-8165-67236e894990",
"org_id": "0CD7F941-2BB8-4F9F-93B0-11620D4652AB",
"outcome": true,
"request_payload_redacted": {},
"resource_type": "connections"
}
],
"pages": {
"page": 123,
"size": 123,
"total": 123
}
}{
"message": "the error description"
}{
"message": "the error description"
}{
"message": "the error description"
}Query Parameters
Was this page helpful?