RequestLogs: updateSettings

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.

Request

HTTP request

PUT /v2/diagnostics/settings

Request Body

Responses

Code Description Reference
200 OK Successful response.
400 Bad Request Error encountered.

SDK Method

Diagnostics::updateRequestLogSettings

Definitions Expand All | Collapse All

RequestLogs

Request logs

apiRequestLogging string

When set to true, enables API request logging for the user.

apiRequestLogMaxEntries string

Specifies the maximum number of API requests to log.

apiRequestLogRemainingEntries string

Indicates the remaining number of API requests that can be logged.

errorDetails

This object describes errors that occur. It is only valid for responses, and ignored in requests.

errorCode string

An error code associated with the error.

message string

A short error message.

Examples

Generic JSON Request/Response

Request

{
"apiRequestLogging": "sample string 1",
"apiRequestLogMaxEntries": "sample string 2",
"apiRequestLogRemainingEntries": "sample string 3"
}

Response

{
"apiRequestLogging": "sample string 1",
"apiRequestLogMaxEntries": "sample string 2",
"apiRequestLogRemainingEntries": "sample string 3"
}

Generic XML Request/Response

Request

<diagnosticsSettingsInformation 
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.docusign.com/restapi">

<apiRequestLogMaxEntries>sample string 2</apiRequestLogMaxEntries>
<apiRequestLogRemainingEntries>sample string 3</apiRequestLogRemainingEntries>
<apiRequestLogging>sample string 1</apiRequestLogging>
</diagnosticsSettingsInformation>

Response

<diagnosticsSettingsInformation 
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.docusign.com/restapi">

<apiRequestLogMaxEntries>sample string 2</apiRequestLogMaxEntries>
<apiRequestLogRemainingEntries>sample string 3</apiRequestLogRemainingEntries>
<apiRequestLogging>sample string 1</apiRequestLogging>
</diagnosticsSettingsInformation>