Skip to main content
Use this endpoint to retrieve a paginated history of user actions performed on your Shogun account. Audit logs capture who did what and when, including the originating IP address and outcome — making them essential for compliance reviews, security investigations, and internal governance.

Endpoint

POST /api/v1/security/web/fetch_audit_logs

Authentication

All requests must include a valid Dashboard Bearer token in the Authorization header.
HeaderTypeRequiredDescription
AuthorizationstringYesBearer <token> — obtain from Login
Content-TypestringYesapplication/json

Request Body

All parameters are optional. Omit the body entirely to retrieve the most recent audit log entries.
filters
object
An object of filter criteria to narrow results.
Free-text search term applied across log fields.
limit
integer
Maximum number of results to return. Defaults to 20.
cursor_created_at
string
ISO 8601 timestamp cursor for keyset pagination. Pass the created_at value of the last result from the previous page.
cursor_id
string
UUID cursor for keyset pagination. Pass the id of the last result from the previous page.

Example Request Body

{
  "filters": {
    "action": "login",
    "start_date": "2026-01-01",
    "end_date": "2026-04-30"
  },
  "limit": 20
}

Response

Returns an array of audit log entries matching your criteria.
FieldTypeDescription
actionstringThe action that was performed (e.g., login, regenerate_secret)
userstringDisplay name or identifier of the user who performed the action
ip_addressstringIP address from which the action was initiated
response_codeintegerHTTP response code returned for the action
start_datestringStart date boundary used when the log entry was filtered
end_datestringEnd date boundary used when the log entry was filtered

Success

{
  "status": true,
  "response_code": "00",
  "message": "Success",
  "data": [
    {
      "action": "login",
      "user": "admin@yourcompany.com",
      "ip_address": "197.210.55.12",
      "response_code": 200,
      "start_date": "2026-01-01",
      "end_date": "2026-04-30"
    }
  ]
}

Example

curl --request POST \
  --url https://baasapi.payrepmfb.com/api/v1/security/web/fetch_audit_logs \
  --header 'Authorization: Bearer <your_dashboard_token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "filters": {
      "action": "login",
      "start_date": "2026-01-01",
      "end_date": "2026-04-30"
    },
    "limit": 20
  }'