curl --request GET \
--url https://api.harvey.ai/api/v1/logs/audit \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.harvey.ai/api/v1/logs/audit"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.harvey.ai/api/v1/logs/audit', 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.harvey.ai/api/v1/logs/audit",
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.harvey.ai/api/v1/logs/audit"
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.harvey.ai/api/v1/logs/audit")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.harvey.ai/api/v1/logs/audit")
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": {
"begin_date": "2024-03-26T21:56:56.107874+00:00",
"end_date": "2024-03-26T18:44:20.612870+00:00",
"num_events": 50
},
"id": "018e99bb-0461-7880-bfbb-51ee869a0a52",
"ip": "0.0.0.0",
"timestamp": "2024-04-01T21:55:54.217050",
"type": "admin:fetch_workspace_history",
"user": "user@example.com",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
},
{
"data": {
"event_id": 100588387
},
"id": "018e99bb-0471-7c73-b214-0568d92f560a",
"ip": "0.0.0.0",
"timestamp": "2024-04-01T21:55:54.113000",
"type": "admin:client_view_workspace_history_item",
"user": "user@example.com",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
}
]Query Audit Logs
Paginates forward in time from a given audit log ID. It takes a log ID parameter to begin fetching from and a take parameter for the number of log entries to fetch.
For a complete list of all audit log types and their descriptions, see the Audit Logs Guide.
curl --request GET \
--url https://api.harvey.ai/api/v1/logs/audit \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.harvey.ai/api/v1/logs/audit"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.harvey.ai/api/v1/logs/audit', 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.harvey.ai/api/v1/logs/audit",
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.harvey.ai/api/v1/logs/audit"
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.harvey.ai/api/v1/logs/audit")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.harvey.ai/api/v1/logs/audit")
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": {
"begin_date": "2024-03-26T21:56:56.107874+00:00",
"end_date": "2024-03-26T18:44:20.612870+00:00",
"num_events": 50
},
"id": "018e99bb-0461-7880-bfbb-51ee869a0a52",
"ip": "0.0.0.0",
"timestamp": "2024-04-01T21:55:54.217050",
"type": "admin:fetch_workspace_history",
"user": "user@example.com",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
},
{
"data": {
"event_id": 100588387
},
"id": "018e99bb-0471-7c73-b214-0568d92f560a",
"ip": "0.0.0.0",
"timestamp": "2024-04-01T21:55:54.113000",
"type": "admin:client_view_workspace_history_item",
"user": "user@example.com",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
}
]Permissions
RequiresTerritory admin or Organization admin permission.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Audit log ID to begin fetching from.
Number of audit log entries to fetch, max 1000
Optional filter to return only logs of a specific type. For Microsoft add-in activity, use add-in-specific log types such as user:word_add_in_docx_drafting or user:outlook_add_in_ask. See the Audit Logs Guide for a complete list of log types.
"auth:login"
Response
List of audit log entries
Optional metadata for certain event types.
Show child attributes
Show child attributes
Unique identifier for the log entry.
"0194f5c5-2021-75ae-b202-f049fca9dce2"
IP address of the actor.
"0.0.0.0"
Date when the event occurred in ISO format.
"2025-02-11T16:08:44.324452"
Type of audit log event. Microsoft add-in activity is returned through the same Audit Log API, with event types such as user:word_add_in_docx_drafting and user:outlook_add_in_ask. We may add more types at any time, so in developing and maintaining your code, you should not assume that only these types exist. For a complete list of all audit log types and their descriptions, see the Audit Logs Guide.
"admin:fetch_workspace_history"
Email of the user who triggered the event.
"user@example.com"
User agent of the actor who triggered the event.
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"