oCoreoCore Docs
API Reference

Audit

List admin audit logs

Returns a paginated list of admin audit log entries with optional action and search filters.

GET
/admin/audit-logs

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Query Parameters

pageinteger

Page number

limitinteger

Page size (max 100)

actionstring

Filter by action

searchstring

Search in details and action

curl -X GET "//api.ocore.dev/api/admin/audit-logs?page=0&limit=0&action=%3Cstring%3E&search=%3Cstring%3E" \
  -H "Authorization: <token>"

OK

{
  "logs": [
    {}
  ],
  "total": 0
}

List audit logs

Returns paginated and filtered audit logs for the organization.

GET
/audit-logs

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Query Parameters

pageinteger

Page number

per_pageinteger

Items per page

resource_typestring

Filter by resource type

resource_idstring

Filter by resource ID

actionstring

Filter by action

user_idstring

Filter by user ID

start_datestring

Filter start date (RFC3339)

end_datestring

Filter end date (RFC3339)

curl -X GET "//api.ocore.dev/api/audit-logs?page=0&per_page=0&resource_type=%3Cstring%3E&resource_id=%3Cstring%3E&action=%3Cstring%3E&user_id=%3Cstring%3E&start_date=%3Cstring%3E&end_date=%3Cstring%3E" \
  -H "Authorization: <token>"

OK

{
  "items": [
    {
      "action": "string",
      "afterState": {},
      "beforeState": {},
      "createdAt": "string",
      "id": "string",
      "ipAddress": "string",
      "resourceId": "string",
      "resourceName": "string",
      "resourceType": "string",
      "userAgent": "string",
      "userId": "string",
      "userName": "string"
    }
  ],
  "page": 0,
  "perPage": 0,
  "total": 0
}

Export audit logs

Exports audit logs in JSON or CSV format. Maximum 10000 records.

GET
/audit-logs/export

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Query Parameters

formatstring

Export format (json or csv)

Default: "json"
resource_typestring

Filter by resource type

actionstring

Filter by action

start_datestring

Filter start date (RFC3339)

end_datestring

Filter end date (RFC3339)

curl -X GET "//api.ocore.dev/api/audit-logs/export?format=json&resource_type=%3Cstring%3E&action=%3Cstring%3E&start_date=%3Cstring%3E&end_date=%3Cstring%3E" \
  -H "Authorization: <token>"

OK

{
  "items": [
    {
      "action": "string",
      "afterState": {},
      "beforeState": {},
      "createdAt": "string",
      "id": "string",
      "ipAddress": "string",
      "resourceId": "string",
      "resourceName": "string",
      "resourceType": "string",
      "userAgent": "string",
      "userId": "string",
      "userName": "string"
    }
  ],
  "total": 0
}

Get resource audit logs

Returns audit logs for a specific resource by type and ID.

GET
/audit-logs/resource/{type}/{id}

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

typeRequiredstring

Resource type

idRequiredstring

Resource ID

Query Parameters

pageinteger

Page number

per_pageinteger

Items per page

curl -X GET "//api.ocore.dev/api/audit-logs/resource/<string>/<string>?page=0&per_page=0" \
  -H "Authorization: <token>"

OK

{
  "items": [
    {
      "action": "string",
      "afterState": {},
      "beforeState": {},
      "createdAt": "string",
      "id": "string",
      "ipAddress": "string",
      "resourceId": "string",
      "resourceName": "string",
      "resourceType": "string",
      "userAgent": "string",
      "userId": "string",
      "userName": "string"
    }
  ],
  "page": 0,
  "perPage": 0,
  "total": 0
}

Was this page helpful?