Logs

Log Endpoints #

Log Retrieval #

GET /logs/{id}

Retrieves a log by its ID.

Authentication required: yes

Permissions: logs-read

Query parameters: none

Request body: none

Response body:

{
	"id": "9bsv0s78ajk0036f3m60",
	"created_at": "2020-09-10T21:01:20Z",
	"level": "info",
	"message": "execution error",
	"metadata": {
		"critical": false,
		"symbol": "BTC_ETH",
		"symbol_count": 300
	}
}
  • id - string
    The ID of the log.

  • created_at - string (RFC 3339)
    The exact time when the log was created.

  • level - string (enum)
    The level of the log. Possible values:

    • debug
    • info
    • warn
    • error
  • message - string
    The message of the log.

  • metadata - object
    Additional information about the log. The properties and types of this object are not fixed and might vary. If the log has no metadata, this object is not included at all.

Multiple Logs Retrieval #

GET /logs

Retrieves multiple logs.

Authentication required: yes

Permissions: logs-read

Query parameters:

  • limit - unsigned int
    The number of logs per page.

  • page - unsigned int
    The log batch index.

  • filter-message-includes - string (optional; default: unused)
    If specified, only logs whose messages include this value are returned. The filtering process is case-insensitive.

    filter-message-includes should be used as the default search bar filter.

  • filter-level-eq - string (enum; optional; default: unused)
    If specified, only logs whose level is equal to this value are returned. Possible values:

    • debug
    • info
    • warn
    • error
  • sort-{index}-created-at - string (enum; optional; default: unused)
    If specified, logs are sorted by their creation timestamps. The value determines whether ascending (asc) or descending (desc) order is used.

  • sort-{index}-message - string (enum; optional; default: unused)
    If specified, logs are sorted by their messages. The value determines whether ascending (asc) or descending (desc) order is used.

Many different filter- and sort- keys may be used at the same time, however, to ensure predictable sorting, sort- keys must include an index denoting their precendence. For example, if ?sort-1-message=asc&sort-2-created-at=desc query is being used, logs are first sorted by their messages and only then by their creation timestamps.

Request body: none

Response body:

{
	"page_count": 300,
	"logs": [
		{
			"id": "9bsv0s78ajk0036f3m60",
			"created_at": "2020-09-10T21:01:20Z",
			"level": "error",
			"message": "execution error",
			"metadata": {
				"critical": false,
				"symbol": "BTC_ETH",
				"symbol_count": 300
			}
		},
		{
			"id": "1bsv0s78ajk0036f3m60",
			"created_at": "2020-09-10T21:01:20Z",
			"level": "warn",
			"message": "execution error",
			"metadata": {
				"symbol_count": 300
			}
		}
	]
}
  • page_count - unsigned int
    The number of available pages that may be retrieved with the same filtering options.

  • logs - array of objects
    The array of logs.

    Log properties are described in detail here.

Log Count Retrieval #

GET /logs/count

Retrieves the total number of logs.

Authentication required: yes

Permissions: logs-read

Query parameters: none

Request body: none

Response body:

{
	"count": 300
}
  • count - unsigned int
    The total number of logs.