Chilkat Online Tools

Python / DocuSign eSignature REST API / Gets a list of Connect log entries.

Back to Collection Items

import sys
import chilkat2

# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

http = chilkat2.Http()

# Use this online tool to generate code from sample JSON: Generate Code to Create JSON

# The following JSON is sent in the request body.

# {}

json = chilkat2.JsonObject()

# Adds the "Authorization: Bearer {{accessToken}}" header.
http.AuthToken = "{{accessToken}}"
http.SetRequestHeader("Accept","application/json")

sbRequestBody = chilkat2.StringBuilder()
json.EmitSb(sbRequestBody)

# resp is a CkHttpResponse
resp = http.PTextSb("DELETE","https://domain.com/v2.1/accounts/{{accountId}}/connect/logs",sbRequestBody,"utf-8","application/json",False,False)
if (http.LastMethodSuccess == False):
    print(http.LastErrorText)
    sys.exit()

print(str(resp.StatusCode))
print(resp.BodyStr)

Curl Command

curl -X DELETE
	-H "Accept: application/json"
	-H "Authorization: Bearer {{accessToken}}"
	-d '{}'
https://domain.com/v2.1/accounts/{{accountId}}/connect/logs

Postman Collection Item JSON

{
  "name": "Gets a list of Connect log entries.",
  "request": {
    "method": "DELETE",
    "header": [
      {
        "key": "Accept",
        "value": "application/json"
      },
      {
        "key": "Authorization",
        "value": "Bearer {{accessToken}}"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{}"
    },
    "url": {
      "raw": "{{baseUrl}}/v2.1/accounts/{{accountId}}/connect/logs",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "v2.1",
        "accounts",
        "{{accountId}}",
        "connect",
        "logs"
      ],
      "variable": [
        {
          "key": "accountId",
          "value": "{{accountId}}",
          "type": "string"
        }
      ]
    },
    "description": "Retrieves a list of connect log entries for your account.\n\n###### Note: The `enableLog` property in the Connect configuration must be set to **true** to enable logging. If logging is not enabled, then no log entries are recorded."
  },
  "response": [
  ]
}