|
| 1 | +# pandadoc_client.WebhookEventsApi |
| 2 | + |
| 3 | +All URIs are relative to *https://api.pandadoc.com* |
| 4 | + |
| 5 | +Method | HTTP request | Description |
| 6 | +------------- | ------------- | ------------- |
| 7 | +[**details_webhook_event**](WebhookEventsApi.md#details_webhook_event) | **GET** /public/v1/webhook-events/{id} | Get webhook event by uuid |
| 8 | +[**list_webhook_event**](WebhookEventsApi.md#list_webhook_event) | **GET** /public/v1/webhook-events | Get webhook event page |
| 9 | + |
| 10 | + |
| 11 | +# **details_webhook_event** |
| 12 | +> WebhookEventDetailsResponse details_webhook_event(id) |
| 13 | +
|
| 14 | +Get webhook event by uuid |
| 15 | + |
| 16 | +### Example |
| 17 | + |
| 18 | +* Api Key Authentication (apiKey): |
| 19 | +* OAuth Authentication (oauth2): |
| 20 | + |
| 21 | +```python |
| 22 | +import pandadoc_client |
| 23 | +from pandadoc_client.api import webhook_events_api |
| 24 | +from pandadoc_client.model.webhook_event_details_response import WebhookEventDetailsResponse |
| 25 | +from pprint import pprint |
| 26 | + |
| 27 | +# Defining the host is optional and defaults to https://api.pandadoc.com |
| 28 | +# See configuration.py for a list of all supported configuration parameters. |
| 29 | +configuration = pandadoc_client.Configuration( |
| 30 | + host="https://api.pandadoc.com", |
| 31 | +) |
| 32 | + |
| 33 | +# The client must configure the authentication and authorization parameters |
| 34 | +# in accordance with the API server security policy. |
| 35 | +# Examples for each auth method are provided below, use the example that |
| 36 | +# satisfies your auth use case. |
| 37 | + |
| 38 | +# Configure API key authorization: apiKey |
| 39 | +configuration.api_key['apiKey'] = 'YOUR_API_KEY' |
| 40 | +configuration.api_key_prefix['apiKey'] = 'API-Key' |
| 41 | + |
| 42 | +# Configure OAuth2 access token for authorization: oauth2 |
| 43 | +# configuration = pandadoc_client.Configuration( |
| 44 | +# host="https://api.pandadoc.com", |
| 45 | +# ) |
| 46 | +# configuration.access_token = 'YOUR_ACCESS_TOKEN' |
| 47 | + |
| 48 | +# Enter a context with an instance of the API client |
| 49 | +with pandadoc_client.ApiClient(configuration) as api_client: |
| 50 | + # Create an instance of the API class |
| 51 | + api_instance = webhook_events_api.WebhookEventsApi(api_client) |
| 52 | + id = "id_example" # str | Webhook event uuid |
| 53 | + |
| 54 | + # example passing only required values which don't have defaults set |
| 55 | + try: |
| 56 | + # Get webhook event by uuid |
| 57 | + api_response = api_instance.details_webhook_event(id) |
| 58 | + pprint(api_response) |
| 59 | + except pandadoc_client.ApiException as e: |
| 60 | + print("Exception when calling WebhookEventsApi->details_webhook_event: %s\n" % e) |
| 61 | +``` |
| 62 | + |
| 63 | +### Parameters |
| 64 | + |
| 65 | +Name | Type | Description | Notes |
| 66 | +------------- | ------------- | ------------- | ------------- |
| 67 | + **id** | **str**| Webhook event uuid | |
| 68 | + |
| 69 | +### Return type |
| 70 | + |
| 71 | +[**WebhookEventDetailsResponse**](WebhookEventDetailsResponse.md) |
| 72 | + |
| 73 | +### Authorization |
| 74 | + |
| 75 | +[apiKey](../README.md#apiKey), [oauth2](../README.md#oauth2) |
| 76 | + |
| 77 | +### HTTP request headers |
| 78 | + |
| 79 | + - **Content-Type**: Not defined |
| 80 | + - **Accept**: application/json |
| 81 | + |
| 82 | + |
| 83 | +### HTTP response details |
| 84 | + |
| 85 | +| Status code | Description | Response headers | |
| 86 | +|-------------|-------------|------------------| |
| 87 | +**200** | Get webhook event by uuid | - | |
| 88 | +**401** | Authentication error | - | |
| 89 | +**429** | Too Many Requests | - | |
| 90 | + |
| 91 | +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) |
| 92 | + |
| 93 | +# **list_webhook_event** |
| 94 | +> WebhookEventPageResponse list_webhook_event(count, page) |
| 95 | +
|
| 96 | +Get webhook event page |
| 97 | + |
| 98 | +### Example |
| 99 | + |
| 100 | +* Api Key Authentication (apiKey): |
| 101 | +* OAuth Authentication (oauth2): |
| 102 | + |
| 103 | +```python |
| 104 | +import pandadoc_client |
| 105 | +from pandadoc_client.api import webhook_events_api |
| 106 | +from pandadoc_client.model.webhook_event_trigger_enum import WebhookEventTriggerEnum |
| 107 | +from pandadoc_client.model.webhook_event_page_response import WebhookEventPageResponse |
| 108 | +from pandadoc_client.model.webhook_event_http_status_code_group_enum import WebhookEventHttpStatusCodeGroupEnum |
| 109 | +from pandadoc_client.model.webhook_event_error_enum import WebhookEventErrorEnum |
| 110 | +from pprint import pprint |
| 111 | + |
| 112 | +# Defining the host is optional and defaults to https://api.pandadoc.com |
| 113 | +# See configuration.py for a list of all supported configuration parameters. |
| 114 | +configuration = pandadoc_client.Configuration( |
| 115 | + host="https://api.pandadoc.com", |
| 116 | +) |
| 117 | + |
| 118 | +# The client must configure the authentication and authorization parameters |
| 119 | +# in accordance with the API server security policy. |
| 120 | +# Examples for each auth method are provided below, use the example that |
| 121 | +# satisfies your auth use case. |
| 122 | + |
| 123 | +# Configure API key authorization: apiKey |
| 124 | +configuration.api_key['apiKey'] = 'YOUR_API_KEY' |
| 125 | +configuration.api_key_prefix['apiKey'] = 'API-Key' |
| 126 | + |
| 127 | +# Configure OAuth2 access token for authorization: oauth2 |
| 128 | +# configuration = pandadoc_client.Configuration( |
| 129 | +# host="https://api.pandadoc.com", |
| 130 | +# ) |
| 131 | +# configuration.access_token = 'YOUR_ACCESS_TOKEN' |
| 132 | + |
| 133 | +# Enter a context with an instance of the API client |
| 134 | +with pandadoc_client.ApiClient(configuration) as api_client: |
| 135 | + # Create an instance of the API class |
| 136 | + api_instance = webhook_events_api.WebhookEventsApi(api_client) |
| 137 | + count = 0 # int | Number of element in page |
| 138 | + page = 0 # int | Page number |
| 139 | + since = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Filter option: all events from specified timestamp (optional) |
| 140 | + to = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Filter option: all events up to specified timestamp (optional) |
| 141 | + type = [ |
| 142 | + WebhookEventTriggerEnum("document_state_changed"), |
| 143 | + ] # [WebhookEventTriggerEnum] | Filter option: all events of type (optional) |
| 144 | + http_status_code = [ |
| 145 | + WebhookEventHttpStatusCodeGroupEnum(400), |
| 146 | + ] # [WebhookEventHttpStatusCodeGroupEnum] | Filter option: all events of http status code (optional) |
| 147 | + error = [ |
| 148 | + WebhookEventErrorEnum("TIMEOUT_ERROR"), |
| 149 | + ] # [WebhookEventErrorEnum] | Filter option: all events with following error (optional) |
| 150 | + |
| 151 | + # example passing only required values which don't have defaults set |
| 152 | + try: |
| 153 | + # Get webhook event page |
| 154 | + api_response = api_instance.list_webhook_event(count, page) |
| 155 | + pprint(api_response) |
| 156 | + except pandadoc_client.ApiException as e: |
| 157 | + print("Exception when calling WebhookEventsApi->list_webhook_event: %s\n" % e) |
| 158 | + |
| 159 | + # example passing only required values which don't have defaults set |
| 160 | + # and optional values |
| 161 | + try: |
| 162 | + # Get webhook event page |
| 163 | + api_response = api_instance.list_webhook_event( |
| 164 | + count, |
| 165 | + page, |
| 166 | + since=since, |
| 167 | + to=to, |
| 168 | + type=type, |
| 169 | + http_status_code=http_status_code, |
| 170 | + error=error, |
| 171 | + ) |
| 172 | + pprint(api_response) |
| 173 | + except pandadoc_client.ApiException as e: |
| 174 | + print("Exception when calling WebhookEventsApi->list_webhook_event: %s\n" % e) |
| 175 | +``` |
| 176 | + |
| 177 | +### Parameters |
| 178 | + |
| 179 | +Name | Type | Description | Notes |
| 180 | +------------- | ------------- | ------------- | ------------- |
| 181 | + **count** | **int**| Number of element in page | |
| 182 | + **page** | **int**| Page number | |
| 183 | + **since** | **datetime**| Filter option: all events from specified timestamp | [optional] |
| 184 | + **to** | **datetime**| Filter option: all events up to specified timestamp | [optional] |
| 185 | + **type** | [**[WebhookEventTriggerEnum]**](WebhookEventTriggerEnum.md)| Filter option: all events of type | [optional] |
| 186 | + **http_status_code** | [**[WebhookEventHttpStatusCodeGroupEnum]**](WebhookEventHttpStatusCodeGroupEnum.md)| Filter option: all events of http status code | [optional] |
| 187 | + **error** | [**[WebhookEventErrorEnum]**](WebhookEventErrorEnum.md)| Filter option: all events with following error | [optional] |
| 188 | + |
| 189 | +### Return type |
| 190 | + |
| 191 | +[**WebhookEventPageResponse**](WebhookEventPageResponse.md) |
| 192 | + |
| 193 | +### Authorization |
| 194 | + |
| 195 | +[apiKey](../README.md#apiKey), [oauth2](../README.md#oauth2) |
| 196 | + |
| 197 | +### HTTP request headers |
| 198 | + |
| 199 | + - **Content-Type**: Not defined |
| 200 | + - **Accept**: application/json |
| 201 | + |
| 202 | + |
| 203 | +### HTTP response details |
| 204 | + |
| 205 | +| Status code | Description | Response headers | |
| 206 | +|-------------|-------------|------------------| |
| 207 | +**200** | Page of webhook events | - | |
| 208 | +**401** | Authentication error | - | |
| 209 | +**429** | Too Many Requests | - | |
| 210 | + |
| 211 | +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) |
| 212 | + |
0 commit comments