{"api":"esign_rest","category":"reference"}

RequestLogs Resource

The RequestLogs resource provide methods that allow you to retrieve and delete the API request log files.

The log files contain the API requests associated with your integration. They can aid you in troubleshooting specific issues within an integration, or if DocuSign Support requests an API trace log.

MethodDescription
list
GET /v2/diagnostics/request_logs

Retrieves a list of log entries as a JSON or xml object or as a zip file containing the entries.

If the Accept header is set to application/zip, the response is a zip file containing individual text files, each representing an API request.

If the Accept header is set to application/json or application/xml, the response returns list of log entries in either JSON or XML. An example JSON response body is shown below.

delete
DELETE /v2/diagnostics/request_logs

Deletes the request log files.

get
GET /v2/diagnostics/request_logs/{requestLogId}

Retrieves information for a single log entry.

Request The requestLogfId property can be retrieved by getting the list of log entries. The Content-Transfer-Encoding header can be set to base64 to retrieve the API request/response as base 64 string. Otherwise the bytes of the request/response are returned.

Response If the Content-Transfer-Encoding header was set to base64, the log is returned as a base64 string.

getSettings
GET /v2/diagnostics/settings

Retrieves the current API request logging setting for the user and remaining log entries.

Response The response includes the current API request logging setting for the user, along with the maximum log entries and remaining log entries.

updateSettings
PUT /v2/diagnostics/settings

Enables or disables API request logging for troubleshooting.

When enabled (apiRequestLogging is set to true), REST API requests and responses for the user are added to a log. A log can have up to 50 requests/responses and the current number of log entries can be determined by getting the settings. Logging is automatically disabled when the log limit of 50 is reached.

You can call [ML:GetRequestLog] or [ML:GetRequestLogs] to download the log files (individually or as a zip file). Call [ML:DeleteRequestLogs] to clear the log by deleting current entries.

Private information, such as passwords and integrator key information, which is normally located in the call header is omitted from the request/response log.

Note: API request logging only captures requests from the authenticated user. Any call that does not authenticate the user and resolve a userId isn't logged. Meaning that login_information, NewAccounts, or other distributor-credential calls are not logged.