UpCloud

Audit Logs

Audit logs provide a detailed record of account activity, including server events, storage operations, database changes, and authentication events. Use audit logs for security monitoring, compliance, and troubleshooting.


GET/1.3/audit-logs

List audit logs

Returns a paginated list of audit log entries. The response includes an Upcloud-Total-Count header indicating the total number of logs matching your query.

Query parameters

  • Name
    limit
    Type
    integer
    Description

    Number of entries to return (0-200). Default: 50.

  • Name
    offset
    Type
    integer
    Description

    Offset for pagination. Default: 0.

  • Name
    actions
    Type
    string
    Description

    Filter by actions: create, read, update, delete, access-update, attach, detach, login, logout.

  • Name
    origins
    Type
    string
    Description

    Filter by origin: api, gui, upcloud_internal.

  • Name
    resource_types
    Type
    string
    Description

    Filter by resource type: account, auth, init-script, managed-database, managed-loadbalancer, server, storage, uks, etc.

  • Name
    created_after
    Type
    string
    Description

    ISO timestamp. List logs created after this time.

  • Name
    created_before
    Type
    string
    Description

    ISO timestamp. List logs created before this time.

  • Name
    q
    Type
    string
    Description

    Search by UUID, username, or IP address.

Request

GET
/1.3/audit-logs
curl -X GET "https://api.upcloud.com/1.3/audit-logs?limit=50&resource_types=server" \
  -u your_username:your_password

GET/1.3/audit-logs/filter-options

List filter options

Returns available filter options for audit log queries, including valid resource types, actions, and origins.

Request

GET
/1.3/audit-logs/filter-options
curl -X GET https://api.upcloud.com/1.3/audit-logs/filter-options \
  -u your_username:your_password

GET/1.3/audit-logs/export

Export audit logs

Exports audit logs as a CSV or JSON file. The export covers up to 180 days of logs and streams data synchronously.

Query parameters

  • Name
    format
    Type
    string
    Description

    Export format: "csv" or "json". Default: "csv".

Request

GET
/1.3/audit-logs/export
curl -X GET "https://api.upcloud.com/1.3/audit-logs/export?format=csv" \
  -u your_username:your_password \
  > audit-logs-export.csv