Skip to main content
GET
/
api
/
v1
/
stats
/
logs
# Get all logs
curl "https://api.fileguard.io/api/v1/stats/logs" \
  -H "Authorization: Bearer fg_your_api_key"

# Filter by operation and status
curl "https://api.fileguard.io/api/v1/stats/logs?operation=upload&status=failure" \
  -H "Authorization: Bearer fg_your_api_key"
{
  "status": "SUCCESS",
  "data": {
    "data": [
      {
        "call_id": "call_a1b2c3d4e5f6",
        "api_key_id": "key_m1n2o3p4q5r6",
        "api_key_name": "Production Upload Key",
        "operation": "upload",
        "status": "failure",
        "file_id": null,
        "context_key": "patient_reports",
        "error_message": "File extension 'xlsx' is not allowed for context 'patient_reports'. Allowed: pdf",
        "ip_address": "192.168.1.1",
        "user_agent": "curl/7.68.0",
        "created_at": "2026-01-17T14:30:00Z"
      }
    ],
    "pagination": {
      "page": 1,
      "page_size": 20,
      "total_items": 150,
      "total_pages": 8,
      "has_next": true,
      "has_previous": false
    }
  },
  "timestamp": "2026-01-17T15:00:00Z"
}

Documentation Index

Fetch the complete documentation index at: https://fileguard.dev/docs/llms.txt

Use this file to discover all available pages before exploring further.

Get paginated API call logs with optional filtering.

Query Parameters

page
integer
default:"1"
Page number
page_size
integer
default:"20"
Items per page (1-100)
api_key_id
string
Filter by API key ID
operation
string
Filter by operation: upload, download, metadata, delete
status
string
Filter by status: success or failure
start_date
string
Filter from date (ISO 8601)
end_date
string
Filter to date (ISO 8601)
# Get all logs
curl "https://api.fileguard.io/api/v1/stats/logs" \
  -H "Authorization: Bearer fg_your_api_key"

# Filter by operation and status
curl "https://api.fileguard.io/api/v1/stats/logs?operation=upload&status=failure" \
  -H "Authorization: Bearer fg_your_api_key"
{
  "status": "SUCCESS",
  "data": {
    "data": [
      {
        "call_id": "call_a1b2c3d4e5f6",
        "api_key_id": "key_m1n2o3p4q5r6",
        "api_key_name": "Production Upload Key",
        "operation": "upload",
        "status": "failure",
        "file_id": null,
        "context_key": "patient_reports",
        "error_message": "File extension 'xlsx' is not allowed for context 'patient_reports'. Allowed: pdf",
        "ip_address": "192.168.1.1",
        "user_agent": "curl/7.68.0",
        "created_at": "2026-01-17T14:30:00Z"
      }
    ],
    "pagination": {
      "page": 1,
      "page_size": 20,
      "total_items": 150,
      "total_pages": 8,
      "has_next": true,
      "has_previous": false
    }
  },
  "timestamp": "2026-01-17T15:00:00Z"
}

Log Entry Fields

FieldDescription
call_idUnique call identifier
api_key_idAPI key used
api_key_nameAPI key name
operationOperation type
statussuccess or failure
file_idFile ID (if applicable)
context_keyContext key
error_messageError details (failures only)
ip_addressClient IP
user_agentClient user agent
created_atTimestamp
Error messages include specific details like which validation failed and why.