Get an audit log entry
curl --request GET \
--url https://{notifuseDomain}/api/auditLogs.get \
--header 'Authorization: Bearer <token>'import requests
url = "https://{notifuseDomain}/api/auditLogs.get"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{notifuseDomain}/api/auditLogs.get', 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://{notifuseDomain}/api/auditLogs.get",
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://{notifuseDomain}/api/auditLogs.get"
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://{notifuseDomain}/api/auditLogs.get")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{notifuseDomain}/api/auditLogs.get")
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{
"log": {
"id": "8b8dd285f6874c17b5edcb39ef3e0b8b",
"occurred_at": "2023-11-07T05:31:56Z",
"workspace_id": "ws_1234567890",
"action": "workspaces.inviteMember",
"category": "members",
"outcome": "success",
"status_code": 200,
"actor_type": "user",
"actor_id": "<string>",
"actor_email": "<string>",
"actor_name": "<string>",
"actor_role": "owner",
"auth_method": "session",
"target_type": "invitation",
"target_id": "<string>",
"target_name": "bob@example.com",
"ip_address": "203.0.113.9",
"user_agent": "<string>",
"request_id": "<string>",
"changes": {},
"metadata": {}
}
}{
"error": "<string>"
}{
"error": "<string>"
}Audit logs
Get an audit log entry
Returns one entry by id. In workspace scope an entry of another workspace is a 404, never a leak.
GET
/
api
/
auditLogs.get
Get an audit log entry
curl --request GET \
--url https://{notifuseDomain}/api/auditLogs.get \
--header 'Authorization: Bearer <token>'import requests
url = "https://{notifuseDomain}/api/auditLogs.get"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{notifuseDomain}/api/auditLogs.get', 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://{notifuseDomain}/api/auditLogs.get",
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://{notifuseDomain}/api/auditLogs.get"
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://{notifuseDomain}/api/auditLogs.get")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{notifuseDomain}/api/auditLogs.get")
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{
"log": {
"id": "8b8dd285f6874c17b5edcb39ef3e0b8b",
"occurred_at": "2023-11-07T05:31:56Z",
"workspace_id": "ws_1234567890",
"action": "workspaces.inviteMember",
"category": "members",
"outcome": "success",
"status_code": 200,
"actor_type": "user",
"actor_id": "<string>",
"actor_email": "<string>",
"actor_name": "<string>",
"actor_role": "owner",
"auth_method": "session",
"target_type": "invitation",
"target_id": "<string>",
"target_name": "bob@example.com",
"ip_address": "203.0.113.9",
"user_agent": "<string>",
"request_id": "<string>",
"changes": {},
"metadata": {}
}
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
API token for authentication
Query Parameters
Available options:
workspace, deployment Required in workspace scope.
Response
The entry
One recorded control-plane action. workspace_id is absent for deployment-level entries (sign-ins, the licence, the system settings).
Show child attributes
Show child attributes
