> For the complete documentation index, see [llms.txt](https://docs.nected.ai/nected-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nected.ai/nected-docs/management-api/audit-log-api/get-all-audit-logs.md).

# Get All Audit Logs

**GET** `/dev/v1/audit/{module}/search`

Returns a **paginated list** of audit log entries for the given **`module`**, filtered by entity **`type`**, with optional filters and sort.

### Headers

| Header           | Required | Description                  |
| ---------------- | -------- | ---------------------------- |
| `Nected-API-Key` | Yes      | API key.                     |
| `Nected-Branch`  | No       | Workspace branch (optional). |

## Search audit logs

> Paginated list of audit logs. The \`module\` is always \`audit\`, and you must specify the \*\*\`type\`\*\* of entity to search. Optional filters: \`status\`, \`environment\`, \`user\`, date range, and \*\*\`sort\`\*\* (default \`date:-1\`).\
> \
> \*\*200\*\* body: \`code\`, \`message\`, \`pageNo\`, \`pageSize\`, \`totalCount\`, \`totalPages\`, and \*\*\`data\`\*\* as an array of \*\*\`AuditLogEntry\`\*\*.

```json
{"openapi":"3.0.3","info":{"title":"Nected Audit Log API (Dev V1)","version":"1.0"},"tags":[{"name":"Audit","description":"Search audit logs and fetch a single log with parent/child context."}],"servers":[{"url":"https://api.nected.ai","description":"Production"}],"security":[{"DevAuth":[]}],"components":{"securitySchemes":{"DevAuth":{"type":"apiKey","in":"header","name":"Nected-API-Key","description":"Dev API key (`Nected-API-Key` header)"}},"schemas":{"AuditSearchResponse":{"type":"object","description":"Search result; data is an array of audit log entries","properties":{"code":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogEntry"}},"message":{"type":"string"},"pageNo":{"type":"integer"},"pageSize":{"type":"integer"},"totalCount":{"type":"integer"},"totalPages":{"type":"integer"}}},"AuditLogEntry":{"type":"object","description":"Single audit log entry","properties":{"branchName":{"type":"string"},"date":{"type":"string"},"entityId":{"type":"string"},"environment":{"type":"string"},"event":{"type":"string"},"executionId":{"type":"string"},"executionTime":{"type":"string"},"input":{"type":"object","additionalProperties":true},"ip":{"type":"string"},"logId":{"type":"string"},"message":{"type":"string"},"name":{"type":"string"},"output":{"type":"object","additionalProperties":true},"path":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogPathNode"}},"rootNode":{"$ref":"#/components/schemas/RootNode"},"signed":{"type":"boolean"},"status":{"type":"string"},"traceId":{"type":"string"},"type":{"type":"string"},"user":{"type":"string"},"version":{"type":"string"},"workspaceId":{"type":"string"}}},"AuditLogPathNode":{"type":"object","description":"Path node in audit hierarchy","properties":{"entity":{"type":"string"},"entityId":{"type":"string"},"entityType":{"type":"string"},"executionId":{"type":"string"},"name":{"type":"string"},"version":{"type":"string"}}},"RootNode":{"type":"object","properties":{"id":{"type":"string"},"logId":{"type":"string"},"name":{"type":"string"}}},"Response":{"type":"object","description":"Standard API response wrapper","properties":{"code":{"type":"string"},"data":{"type":"object","description":"Response payload","additionalProperties":true},"message":{"type":"string"},"pageNo":{"type":"integer"},"pageSize":{"type":"integer"},"totalCount":{"type":"integer"},"totalPages":{"type":"integer"}}}}},"paths":{"/dev/v1/audit/{module}/search":{"get":{"operationId":"getAuditLogSearchResult","tags":["Audit"],"summary":"Search audit logs","description":"Paginated list of audit logs. The `module` is always `audit`, and you must specify the **`type`** of entity to search. Optional filters: `status`, `environment`, `user`, date range, and **`sort`** (default `date:-1`).\n\n**200** body: `code`, `message`, `pageNo`, `pageSize`, `totalCount`, `totalPages`, and **`data`** as an array of **`AuditLogEntry`**.","parameters":[{"name":"Nected-Branch","in":"header","required":false,"description":"Branch name (optional).","schema":{"type":"string"}},{"name":"module","in":"path","required":true,"description":"Module name. For audit logs this is always `audit`.","schema":{"type":"string","enum":["audit"]}},{"name":"type","in":"query","required":true,"description":"Type of entity to return audit logs for. Required — specify one value.","schema":{"type":"string","enum":["simpleRule","connector","dataSet","bulkRule","testsuit","workflow","decisionTable","ruleSet","cron"]}},{"name":"status","in":"query","description":"Status filter (optional).","schema":{"type":"string"}},{"name":"sort","in":"query","description":"Sort order (optional, default `date:-1`).","schema":{"type":"string","default":"date:-1"}},{"name":"environment","in":"query","description":"Environment filter (optional).","schema":{"type":"string"}},{"name":"user","in":"query","description":"User who performed the action (optional).","schema":{"type":"string"}},{"name":"startDate","in":"query","description":"Start of date range (ISO format, optional).","schema":{"type":"string"}},{"name":"endDate","in":"query","description":"End of date range (ISO format, optional).","schema":{"type":"string"}},{"name":"pageNo","in":"query","description":"Page number (optional, default 1).","schema":{"type":"integer","default":1}},{"name":"pageSize","in":"query","description":"Page size (optional, default 10, max 10).","schema":{"type":"integer","default":10,"maximum":10}}],"responses":{"200":{"description":"OK — paginated audit entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditSearchResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}}}
```

### Example Usage

```bash
curl 'https://api.nected.ai/dev/v1/audit/audit/search?type=workflow&sort=date%3A-1&pageNo=1&pageSize=10' \
  --header 'Accept: application/json' \
  --header 'Nected-Branch: <BRANCH_NAME>' \
  --header 'Nected-API-Key: <YOUR_NECTED_API_KEY>'
```

* Replace `<BRANCH_NAME>` with the Nected branch whose audit logs you want to search, such as `main` or `staging`.
* Replace `<YOUR_NECTED_API_KEY>` with your actual Nected API key.
