Logs

On this page:

THE MESSAGE OBJECT

A detailed description of the JSON object

GET[base]/messages

Get a logs list

GET[base]/messages/{messagesId}

Get log details


The Message object

This object provides the following data about a log message:

messageId string

Message identifier

processId string

The process identifier.

pid string

The process identifier in the OS.

method string

The method during invocation of which an exception has been thrown.

clientIdentifier integer

The identifier of a client by whom the process has been run.

userAgent string

The information about the user agent originating the request. A string consists of one or more product identifiers, each followed by zero or more comments.

ipAddress string

The IP address of the user.

version string

The B2Core IB version.

level string

The level of severity, comply with RFC 5424 Standard.

message string

The text of a message.

createTime string

The date and time when the object has been created.

THE MESSAGE OBJECT
{
  "messageId": "6006dda272f002519c3eb505",
  "processId": null,
  "pid": "12345",
  "method": "POST",
  "uri": "https://my.stage.org/v1/symbols/groups/6006dda272f002519c3eb508/import",
  "clientIdentifier": 1,
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Safari/605.1.15",
  "ipAddress": "185.155.96.184",
  "version": "2.18.0",
  "level": "error",
  "message": "Ap\\Services\\Payment\\Exceptions\\ImportException: Invalid csv data scheme",
  "createTime": "2021-01-01T00:00:00+00:00"
}

Get a logs list

Use this method to obtain a list of system logs.

To obtain detailed information about a specified system log, use a separate method to get log details.

Request

Header parameters:

  • Authorization: Bearer <token>

Query parameters:

This method supports pagination, sorting, and filtering. For details on applying the parameters, refer to the Query parameters section. Possible parameters for filtering and sorting are listed below. For values description, refer to the Message object.

Possible values for the filter parameter:

  • message

  • messageLevel

  • messagePid

  • process

  • createDate

Possible values for the sort_by parameter:

  • level

  • message

  • pid

  • processId

  • createTime (default)

GET[base]/messages

curl --location -g --request GET 'https://your.base-url.here/messages?limit=10&offset=0&sort_by=createTime&sort_order=desc&filter[createDate]=2021-01-01&filter[level]=error&filter[message]=Ap\Services\Payment\Exceptions\ImportException: Invalid csv data scheme&filter[pid]=12345' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, the response body contains an array of Message objects providing information about all logs that correspond to the query parameters specified in the request.


Get log details

Use this method to obtain detailed information about a specified system log.

To obtain a list of system logs, use a separate method to get a list of logs.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

messageId required

The message identifier.

GET[base]/messages/{messageId}

curl --location --request GET 'https://your.base-url.here/messages/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, the response body contains a Message object providing information about the specified system log.