export const metadata = {
  title: "Audit Logs - OnlineOrNot API Documentation",
  description:
    "View audit log events for your organisation",
}

## List audit log events   {{ tag: 'GET', label: '/v1/audit_logs' }}
<Row>
<Col>

<a id="opIdlistAuditLogs"></a>

*Retrieve a paginated list of audit log events for your organisation*

### Security: Bearer Auth
Provide your bearer token in the Authorization header when making requests to protected resources.

Example: `Authorization: Bearer 123`

<ParameterTree parameters={[{"schema":{"type":"string","default":"1","example":1,"description":"Page number of paginated results."},"required":false,"description":"Page number of paginated results.","name":"page","in":"query","exampleValues":{"object":1,"json":"'1'"},"originalType":"string","safeType":"string","shortDesc":"Page number of paginated results.","style":"form"},{"schema":{"type":"string","default":"20","example":20,"description":"Number of items per page."},"required":false,"description":"Number of items per page.","name":"per_page","in":"query","exampleValues":{"object":20,"json":"'20'"},"originalType":"string","safeType":"string","shortDesc":"Number of items per page.","style":"form"},{"schema":{"type":"string","example":"example","description":"Search term to filter results."},"required":false,"description":"Search term to filter results.","name":"search","in":"query","exampleValues":{"object":"example","json":"'example'"},"originalType":"string","safeType":"string","shortDesc":"Search term to filter results.","style":"form"}]} title="Query parameters" />

<h3 id="retrieve-a-paginated-list-of-audit-log-events-for-your-organisation-responses">Responses</h3>

|Status|Meaning|Description|
|---|---|---|
|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Returns a paginated list of audit log events|
|401|[Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1)|Unauthenticated|
|500|[Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1)|Internal Server Error|

<ResponseSchemas schemas={[{"status":"200","properties":[{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"a6uatzrn2k3l"},"type":{"type":"string","example":"AuditLogEvent"},"actor_id":{"type":["string","null"],"example":"user_123"},"actor_type":{"type":"string","enum":["User","ApiToken","System"],"example":"User"},"actor_display_name":{"type":["string","null"],"example":"max@onlineornot.com"},"auditable_id":{"type":["string","null"],"example":"abc123"},"auditable_type":{"type":"string","example":"Check"},"auditable_display_name":{"type":["string","null"],"example":"My Website Check"},"target_id":{"type":["string","null"],"example":"1"},"target_type":{"type":["string","null"],"example":"Organisation"},"target_display_name":{"type":["string","null"]},"audit_action":{"type":"string","example":"check.created"},"action":{"type":"string","example":"created"},"location":{"type":["string","null"],"example":"Sydney, NSW, AU"},"remote_ip":{"type":["string","null"],"example":"91.169.182.144"},"created_at":{"type":"string","example":"2026-02-17T10:58:07.000Z"},"metadata":{"type":["object","null"],"additionalProperties":{}}},"required":["id","type","actor_id","actor_type","actor_display_name","auditable_id","auditable_type","auditable_display_name","target_id","target_type","target_display_name","audit_action","action","location","remote_ip","created_at","metadata"]}},"in":"body","name":"result","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» result"},{"schema":{"type":"string","example":"a6uatzrn2k3l"},"in":"body","name":"id","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» id"},{"schema":{"type":"string","example":"AuditLogEvent"},"in":"body","name":"type","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» type"},{"schema":{"type":["string","null"],"example":"user_123"},"in":"body","name":"actor_id","depth":2,"type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» actor_id"},{"schema":{"type":"string","enum":["User","ApiToken","System"],"example":"User"},"in":"body","name":"actor_type","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» actor_type"},{"schema":{"type":["string","null"],"example":"max@onlineornot.com"},"in":"body","name":"actor_display_name","depth":2,"type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» actor_display_name"},{"schema":{"type":["string","null"],"example":"abc123"},"in":"body","name":"auditable_id","depth":2,"type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» auditable_id"},{"schema":{"type":"string","example":"Check"},"in":"body","name":"auditable_type","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» auditable_type"},{"schema":{"type":["string","null"],"example":"My Website Check"},"in":"body","name":"auditable_display_name","depth":2,"type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» auditable_display_name"},{"schema":{"type":["string","null"],"example":"1"},"in":"body","name":"target_id","depth":2,"type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» target_id"},{"schema":{"type":["string","null"],"example":"Organisation"},"in":"body","name":"target_type","depth":2,"type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» target_type"},{"schema":{"type":["string","null"]},"in":"body","name":"target_display_name","depth":2,"type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» target_display_name"},{"schema":{"type":"string","example":"check.created"},"in":"body","name":"audit_action","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» audit_action"},{"schema":{"type":"string","example":"created"},"in":"body","name":"action","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» action"},{"schema":{"type":["string","null"],"example":"Sydney, NSW, AU"},"in":"body","name":"location","depth":2,"type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» location"},{"schema":{"type":["string","null"],"example":"91.169.182.144"},"in":"body","name":"remote_ip","depth":2,"type":["string","null"],"safeType":["string","null"],"required":true,"displayName":"»» remote_ip"},{"schema":{"type":"string","example":"2026-02-17T10:58:07.000Z"},"in":"body","name":"created_at","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» created_at"},{"schema":{"type":["object","null"],"additionalProperties":{}},"in":"body","name":"metadata","depth":2,"type":["object","null"],"safeType":["object","null"],"required":true,"displayName":"»» metadata"},{"schema":{},"in":"body","name":"**additionalProperties**","depth":3,"type":"any","safeType":"any","required":false,"displayName":"»»» **additionalProperties**"},{"schema":{"type":"object","properties":{"page":{"type":"number","default":1,"example":1,"description":"Page number of paginated results."},"per_page":{"type":"number","default":20,"example":20,"description":"Number of items per page."},"count":{"type":"number","example":1,"description":"Number of items on the current page."},"total_count":{"type":"number","example":1,"description":"Total number of items."}},"required":["count","total_count"]},"in":"body","name":"result_info","depth":1,"type":"object","safeType":"object","required":true,"displayName":"» result_info"},{"schema":{"type":"number","default":1,"example":1,"description":"Page number of paginated results."},"in":"body","name":"page","depth":2,"description":"Page number of paginated results.","type":"number","safeType":"number","required":false,"displayName":"»» page"},{"schema":{"type":"number","default":20,"example":20,"description":"Number of items per page."},"in":"body","name":"per_page","depth":2,"description":"Number of items per page.","type":"number","safeType":"number","required":false,"displayName":"»» per_page"},{"schema":{"type":"number","example":1,"description":"Number of items on the current page."},"in":"body","name":"count","depth":2,"description":"Number of items on the current page.","type":"number","safeType":"number","required":true,"displayName":"»» count"},{"schema":{"type":"number","example":1,"description":"Total number of items."},"in":"body","name":"total_count","depth":2,"description":"Total number of items.","type":"number","safeType":"number","required":true,"displayName":"»» total_count"},{"schema":{"type":"boolean","default":true,"example":true,"description":"Whether the API call was successful"},"in":"body","name":"success","depth":1,"description":"Whether the API call was successful","type":"boolean","safeType":"boolean","required":true,"displayName":"» success"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"number"},"message":{"type":"string"},"type":{"type":"string"}},"required":["code","message"]},"example":[]},"in":"body","name":"errors","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» errors"},{"schema":{"type":"number"},"in":"body","name":"code","depth":2,"type":"number","safeType":"number","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":"string"},"in":"body","name":"type","depth":2,"type":"string","safeType":"string","required":false,"displayName":"»» type"},{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"number"},"message":{"type":"string"},"type":{"type":"string"}},"required":["code","message"]},"example":[]},"in":"body","name":"messages","depth":1,"type":"array","safeType":"object[]","required":true,"displayName":"» messages"},{"schema":{"type":"number"},"in":"body","name":"code","depth":2,"type":"number","safeType":"number","required":true,"displayName":"»» code"},{"schema":{"type":"string"},"in":"body","name":"message","depth":2,"type":"string","safeType":"string","required":true,"displayName":"»» message"},{"schema":{"type":"string"},"in":"body","name":"type","depth":2,"type":"string","safeType":"string","required":false,"displayName":"»» type"}]}]} />

</Col>

<Col sticky>

<CodeGroup title="Request" tag="GET" label="/v1/audit_logs">
```bash {{ title: 'cURL' }}
curl --request GET \
  --url https://api.onlineornot.com/v1/audit_logs \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'
```

```javascript
fetch("https://api.onlineornot.com/v1/audit_logs", {
  "method": "GET",
  "headers": {
    "Accept": "application/json",
    "Authorization": "Bearer {access-token}"
  }
})
.then(response => {
  console.log(response);
})
.catch(err => {
  console.error(err);
});
```

```java
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.onlineornot.com/v1/audit_logs")
  .get()
  .addHeader("Accept", "application/json")
  .addHeader("Authorization", "Bearer {access-token}")
  .build();

Response response = client.newCall(request).execute();
```

```php
<?php

$request = new HttpRequest();
$request->setUrl('https://api.onlineornot.com/v1/audit_logs');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
```

```ruby
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.onlineornot.com/v1/audit_logs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer {access-token}'

response = http.request(request)
puts response.read_body
```

```python
import requests

url = "https://api.onlineornot.com/v1/audit_logs"

headers = {
    "Accept": "application/json",
    "Authorization": "Bearer {access-token}"
}

response = requests.request("GET", url, headers=headers)

print(response.text)
```

</CodeGroup>

```json {{ title: 'Response' }}
{
  "result": [
    {
      "id": "a6uatzrn2k3l",
      "type": "AuditLogEvent",
      "actor_id": "user_123",
      "actor_type": "User",
      "actor_display_name": "max@onlineornot.com",
      "auditable_id": "abc123",
      "auditable_type": "Check",
      "auditable_display_name": "My Website Check",
      "target_id": "1",
      "target_type": "Organisation",
      "target_display_name": "string",
      "audit_action": "check.created",
      "action": "created",
      "location": "Sydney, NSW, AU",
      "remote_ip": "91.169.182.144",
      "created_at": "2026-02-17T10:58:07.000Z",
      "metadata": {
        "property1": null,
        "property2": null
      }
    }
  ],
  "result_info": {
    "page": 1,
    "per_page": 20,
    "count": 1,
    "total_count": 1
  },
  "success": true,
  "errors": [],
  "messages": []
}
```

</Col>
</Row>

---

