Search Audit Logs
curl --request GET \
--url https://api.harvey.ai/api/v1/logs/audit/search/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.harvey.ai/api/v1/logs/audit/search/"
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/search/', 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/search/",
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/search/"
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/search/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.harvey.ai/api/v1/logs/audit/search/")
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": {
"data": {
"ip": "0.0.0.0",
"len_added_client_matters": 1,
"site": "us",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
},
"id": "0194f5c5-2021-75ae-b202-f049fca9dce2",
"ip": "0.0.0.0",
"timestamp": "2025-02-11T16:08:44.324452",
"type": "admin:add_client_matters",
"user": "user@example.com",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
}
}Search
Search Audit Logs
Takes a timestamp as a parameter and returns the audit log at or after the timestamp. Useful to begin pagination to get more logs.
For a complete list of all audit log types and their descriptions, see the Audit Logs Guide.
GET
/
api
/
v1
/
logs
/
audit
/
search
/
Search Audit Logs
curl --request GET \
--url https://api.harvey.ai/api/v1/logs/audit/search/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.harvey.ai/api/v1/logs/audit/search/"
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/search/', 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/search/",
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/search/"
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/search/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.harvey.ai/api/v1/logs/audit/search/")
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": {
"data": {
"ip": "0.0.0.0",
"len_added_client_matters": 1,
"site": "us",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36"
},
"id": "0194f5c5-2021-75ae-b202-f049fca9dce2",
"ip": "0.0.0.0",
"timestamp": "2025-02-11T16:08:44.324452",
"type": "admin:add_client_matters",
"user": "user@example.com",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.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
UTC epoch timestamp, up to 1 year old from now
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.
Example:
"auth:login"
Response
Audit log entry at or after time
Show child attributes
Show child attributes