Exporting API Method Logs

Requirements

  • An API method with the "Export—Export Webhook Logs" step.

To access the export file, you need the "Integration Logs Export permission", which is granted to "Owners" by default.

General contract for export jobs

Please refer to this article for more detail on the general contract for export jobs.

Operations log export contract

Sample request

https://api.maestra.io/v3/operations/sync?endpointId={endpointId}&operation={operation}

Accept: application/json
Content-Type: application/json
Authorization: SecretKey {Secret Key}

{
  "exportId": "<Export ID>",
  "sinceDateTimeUtc": "<Start date&time for API request (UTC, YYYY-MM-DD hh:mm)>",
  "tillDateTimeUtc": "End date&time for API request, exclusively (UTC, YYYY-MM-DD hh:mm)>",
  "resultState": "<Result of calling the API method>",
  "hasErrors": "<Were there any errors?>",
  "endpoint": {
    "ids": {
      "externalId": "<External ID for the integration endpoint>"
    }
  },
  "operations": [
    {
      "ids": {
        "systemName": "<API method system name>"
      }
    },
    {
      "ids": {
        "systemName": "<API method system name>"
      }
    }
  ]
}

The input parameters can specify:

  • "From" date in UTC format. The export log will only include requests registered after this date.
  • "To" date in UTC format. The export log will only include requests registered before this date.
  • Operation Status (completed | failed | processing).
  • Were there any errors during the request (true | false).
  • System names of required API methods and integration endpoints.

Descriptions of basic fields in the operation log:OperationLogTransactionId:

  • Unique request identifier.
  • OperationLogStartDateTimeUtc: Call start time in UTC.
  • OperationLogEndDateTimeUtc: Call end time in UTC.
  • OperationLogOperationSystemName: API method system name.
  • OperationLogOperationName: API method name.
  • OperationLogEndpointExternalId: Integration endpoint system name.
  • OperationLogIntegrationName: Integration endpoint name.
  • OperationLogHasErrors: Indicates if there were any errors in the request or when carrying out the API method (true|false). Failed requests are always marked as true while successful requests may only be marked as true if validation errors occur during the method request that do not impede the flow.
  • OperationLogErrorMessages: Error text.
  • OperationLogDevice: DeviceUUID from the operation request (this is optional).
  • OperationLogStatus: Method performance status (completed | failed | processing)
  • OperationLogHttpMethod: HTTP method of the request.
  • OperationLogUrl: Request URL address.
  • OperationLogRequestHeaders: Request headers.
  • OperationLogRequestBody: Request body.
  • OperationLogHTTPStatusCode: Response code.
  • OperationLogResponseHeaders: Response headers.
  • OperationLogResponseBody: Response body.