Skip to navigation

Export log lines

Use this method to export logs in JSON format from a logging instance.

Authentication

Authorizationstring

This key is used for all apis with the exception of ingest. You can obtain it following these instructions and placing the key in the header of your call in the format of Authorization: Token {accesstoken} For example:

curl -H 'Authorization: Token <ACCESS TOKEN>'
OR
servicekeystring

(Deprecated) This key is used for v1 and v2 apis with the exception of ingest. Service keys can be used by placing your service key in the Authorization header of your api call. NOTE Usage of the service key auth mechanism has been deprecated in favor of IAM Access Tokens. Service keys can no longer be created, but can still be used for v1 and v2 apis while the transition takes place

Query parameters

fromstringRequired

Start time (inclusive). Set as UNIX timestamp in seconds or milliseconds.

tostringRequired

End time (inclusive). Set as UNIX timestamp in seconds or milliseconds.

sizestringOptional
Number of log lines to include in the export.
hostsstringOptional

Comma-separated list of hosts.

appsstringOptional

Comma-separated list of applications.

levelsstringOptional

Comma-separated list of log levels.

querystringOptional
Search query.
preferstringOptional
Defines the log lines that you want to export. Valid values are head, first log lines, and tail, last log lines. If not specified, defaults to tail.
pagination_idstringOptional
ID that indicates which page of results to be retrieved. Leave empty for the initial export request.

Response

OK