Skip to main content
GET
/
audit-logs
Export audit logs
curl --request GET \
  --url https://api.select.dev/v2/audit-logs \
  --header 'Authorization: Bearer <token>' \
  --header 'x-tenant-id: <x-tenant-id>'
import requests

url = "https://api.select.dev/v2/audit-logs"

headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {
method: 'GET',
headers: {'x-tenant-id': '<x-tenant-id>', Authorization: 'Bearer <token>'}
};

fetch('https://api.select.dev/v2/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://api.select.dev/v2/audit-logs",
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>",
"x-tenant-id: <x-tenant-id>"
],
]);

$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.select.dev/v2/audit-logs"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-tenant-id", "<x-tenant-id>")
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.select.dev/v2/audit-logs")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.select.dev/v2/audit-logs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "items": [
    {
      "id": "<string>",
      "record_id": "<string>",
      "changed_by": "<string>",
      "changed_at": "<string>",
      "updates": [
        {
          "field": "<string>",
          "old_value": "<unknown>",
          "new_value": "<unknown>"
        }
      ],
      "table_name": "<string>",
      "event_type": "<string>"
    }
  ],
  "page_token": "<string>",
  "row_count": 123
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

Authorization
string
header
required

Organization API key (sl_…).

Headers

x-tenant-id
string
required

The organization ID the request is scoped to.

Query Parameters

max_results
integer
default:50

Maximum number of records to return (1–500).

changed_at__gte
string<date-time> | null

Only return records changed at or after this RFC 3339 timestamp. Use it to resume polling from the last changed_at you ingested (dedupe by id, since the bound is inclusive).

page_token
string | null

Opaque cursor from a previous response. Omit on the first call.

Response

Successful Response

items
ExportAuditLog · object[]
required
page_token
string | null

Opaque cursor for the next page; empty/absent on the last page.

row_count
integer | null

Best-effort total for the filtered result set; may be null when expensive.