# TransferzeroSdk.LogsApi All URIs are relative to *https://api-sandbox.transferzero.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**getWebhookLog**](LogsApi.md#getWebhookLog) | **GET** /logs/{Webhook Log ID} | Fetch an individual webhook log [**getWebhookLogs**](LogsApi.md#getWebhookLogs) | **GET** /logs/webhooks | Fetch a list of webhook logs # **getWebhookLog** > WebhookLogResponse getWebhookLog(webhookLogID) Fetch an individual webhook log Returns a single webhook log based on the webhook log ID. ### Example ```javascript import { LogsApi } from 'transferzero-sdk'; // Configure API key authorization const apiClient = new ApiClient(); apiClient.apiKey = ''; apiClient.apiSecret = ''; apiClient.basePath = 'https://api-sandbox.transferzero.com/v1'; let apiInstance = new LogsApi(apiClient); apiInstance.getWebhookLog(webhookLogID).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { if (error.isValidationError) { let result = error.getResponseObject(); console.log(result); console.error("WARN: Validation error occurred when calling the endpoint"); } else { console.error("Exception when calling LogsApi#getWebhookLog"); throw error; } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **webhookLogID** | [**String**](.md)| ID of the webhook log to retrieve Example: `/v1/logs/9d1ad631-f34a-4cff-9a7e-2c83e3a556df` | ### Return type [**WebhookLogResponse**](WebhookLogResponse.md) ### Authorization You can set the API Key and Secret by passing a config object when creating an ApiClient: ```js const apiClient = new ApiClient({ apiKey: '', apiSecret: '', basePath: 'https://api-sandbox.transferzero.com/v1' }); ``` Or by setting the properties on an ApiClient instance: ```js const apiClient = new ApiClient(); apiClient.apiKey = ''; apiClient.apiSecret = ''; apiClient.basePath = 'https://api-sandbox.transferzero.com/v1'; ``` ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json # **getWebhookLogs** > WebhookLogListResponse getWebhookLogs(opts) Fetch a list of webhook logs Returns a list of webhook logs. Response includes pagination. ### Example ```javascript import { LogsApi } from 'transferzero-sdk'; // Configure API key authorization const apiClient = new ApiClient(); apiClient.apiKey = ''; apiClient.apiSecret = ''; apiClient.basePath = 'https://api-sandbox.transferzero.com/v1'; let apiInstance = new LogsApi(apiClient); let opts = { 'page': 1 // Number | The page number to request (defaults to 1) 'per': 10 // Number | The number of results to load per page (defaults to 10) 'createdAtFrom': "createdAtFrom_example" // String | Start date to filter recipients by created_at range Allows filtering results by the specified `created_at` timeframe. Example: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08` 'createdAtTo': "createdAtTo_example" // String | End date to filter recipients by created_at range Allows filtering results by the specified `created_at` timeframe. Example: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08` }; apiInstance.getWebhookLogs(opts).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { if (error.isValidationError) { let result = error.getResponseObject(); console.log(result); console.error("WARN: Validation error occurred when calling the endpoint"); } else { console.error("Exception when calling LogsApi#getWebhookLogs"); throw error; } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **page** | **Number**| The page number to request (defaults to 1) | [optional] **per** | **Number**| The number of results to load per page (defaults to 10) | [optional] **createdAtFrom** | **String**| Start date to filter recipients by created_at range Allows filtering results by the specified `created_at` timeframe. Example: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08` | [optional] **createdAtTo** | **String**| End date to filter recipients by created_at range Allows filtering results by the specified `created_at` timeframe. Example: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08` | [optional] ### Return type [**WebhookLogListResponse**](WebhookLogListResponse.md) ### Authorization You can set the API Key and Secret by passing a config object when creating an ApiClient: ```js const apiClient = new ApiClient({ apiKey: '', apiSecret: '', basePath: 'https://api-sandbox.transferzero.com/v1' }); ``` Or by setting the properties on an ApiClient instance: ```js const apiClient = new ApiClient(); apiClient.apiKey = ''; apiClient.apiSecret = ''; apiClient.basePath = 'https://api-sandbox.transferzero.com/v1'; ``` ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json