Trailonix API (1.0.0)

Download OpenAPI specification:

Authentication

All API requests must include an API key in the Authorization header.

Example:

Authorization: trail_api_key_k2h63aeo5nh5jj5123

API keys can be created and managed in your Trailonix dashboard. Unauthorized requests will return 401 Unauthorized. Please be sure that your API key has correct permissions for the API you are accessing.

/api/v1/logevent

Gets log events (read permission)

Authorizations:
ApiKeyAuth
query Parameters
eventType
string
Default: null
Example: eventType=login_failed

The type of log event. This is user defined.

searchTerm
string
Default: null
Example: searchTerm=61

A search term to filter log events by.

startDate
date
Example: startDate=2025-01-01T00:00:00Z

Start of the date range. (defaults to 90 days ago)

endDate
date
Example: endDate=2025-03-01T00:00:00Z

end of the date range. (defaults to now)

isAscending
boolean
Default: false
Example: isAscending=false

If true, the results will be sorted in ascending order. If false, the results will be sorted in descending order.

orderBy
string
Default: "createdDate"
Enum: "createdDate" "eventTypeName" "userId" "resource" "ipAddress" "userAgent"
Example: orderBy=createdDate

The field to order the results by.

Responses

Response samples

Content type
application/json
{
  • "events": [
    ]
}

/api/v1/logevent

Submit a log single event (write permissions).

If the log event is invalid, you will receive a 400. A successful response always returns an empty unprocessed array.

Please do not submit sensitive data in the metadata such as passwords or credit card numbers. These are automatically scrubbed.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
eventType
required
string

The type of log event. This is user defined.

userId
string

The ID of the user who performed the action.

resource
string
Default: null

The resource affected by an action.

metadata
object
Default: null

User defined metadata complex object.

ipAddress
string
Default: null

The IP address of the request.

userAgent
string
Default: null

The user agent of the request.

createdDate
string <date-time>
Default: "UTC NOW"

The date and time the log event was created in UTC.

Responses

Request samples

Content type
application/json
{
  • "eventType": "user_updated",
  • "userId": "123",
  • "resource": "user:321",
  • "metadata": {
    },
  • "ipAddress": null,
  • "userAgent": null,
  • "createdDate": "UTC NOW"
}

Response samples

Content type
application/json
{
  • "unprocessed": [ ]
}

/api/v1/logevent/bulk

Submit an array of log events and returns unprocessed log events (write permission).

If the log event is invalid, you will receive an array of unprocessed log events including a failReason.

Please do not submit sensitive data in the metadata such as passwords or credit card numbers. These are automatically scrubbed.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
Array
eventType
required
string

The type of log event. This is user defined.

userId
string

The ID of the user who performed the action.

resource
string
Default: null

The resource affected by an action.

metadata
object
Default: null

User defined metadata complex object.

ipAddress
string
Default: null

The IP address of the request.

userAgent
string
Default: null

The user agent of the request.

createdDate
string <date-time>
Default: "UTC NOW"

The date and time the log event was created in UTC.

Responses

Request samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Response samples

Content type
application/json
{
  • "unprocessed": [ ]
}