Chilkat Online Tools

phpAx / DocuSign eSignature REST API / Gets the Connect log.

Back to Collection Items

<?php

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

$http = new COM("Chilkat_9_5_0.Http");

$queryParams = new COM("Chilkat_9_5_0.JsonObject");
$queryParams->UpdateString('from_date','{{from_date}}');
$queryParams->UpdateString('to_date','{{to_date}}');

// Adds the "Authorization: Bearer {{accessToken}}" header.
$http->AuthToken = '{{accessToken}}';
$http->SetRequestHeader('Accept','application/json');

// resp is a Chilkat_9_5_0.HttpResponse
$resp = $http->QuickRequestParams('GET','https://domain.com/v2.1/accounts/{{accountId}}/connect/logs',$queryParams);
if ($http->LastMethodSuccess == 0) {
    print $http->LastErrorText . "\n";
    exit;
}

print $resp->StatusCode . "\n";
print $resp->BodyStr . "\n";


?>

Curl Command

curl -G -d "from_date=%7B%7Bfrom_date%7D%7D"
	-d "to_date=%7B%7Bto_date%7D%7D"
	-H "Accept: application/json"
	-H "Authorization: Bearer {{accessToken}}"
https://domain.com/v2.1/accounts/{{accountId}}/connect/logs

Postman Collection Item JSON

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