Get All Logs
(Last Updated On: July 20, 2017)

GET /api/v2/{orgId}/logs

This endpoint retrieves all logs for the widget specified by the users, or all logs for all widgets the user has access to, if no widget is specified.

HTTP Request


Query Parameters

The ID of your organization. (Required)
The list of all IDs of the widget to return logs for. If not specified, all widgets the user has access to will be returned.
The timezone requested. If not specified, “Etc/UTC” will be used as the default.
The ISO8601 date to start returning logs from. (Required)
The ISO8601 date to stop returning logs from. (Required)
If more than 100 results are returned, a value for linkToNextSetOfResults will be returned that can be used to access the next set of results. Otherwise, this parameter is not specified.

**Note that this capability only works when specifying a single widgetId, multiple widgetIds are not currently supported**

Example Usage

The above command returns JSON structured like this:

Special Notes about Return Data

Most of the returned data is pretty self-explanatory. However some of the data may need some additional explanation, which is below.

survey_score and survey_comments  You will see a survey score for a chat case if a widget has the survey enabled, and if the visitor has chosen to rate the agent at the end of the chat. When a chat ends, we wait 5 minutes before storing the survey data, and the survey actually may stay open on the visitor’s browser for any extended amount of time, which means that the survey score and comments may be stored to the case long after the end time of the chat. This is important because if you are querying the Logs API to return survey data for your chat agents, you should wait a minimum of 5 minutes after the close of a chat before expecting to see survey data for that chat.