go-firefly3/docs/WebhooksApi.md
2024-05-11 14:45:50 +03:00

535 lines
22 KiB
Markdown

# {{classname}}
All URIs are relative to *https://demo.firefly-iii.org/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**DeleteWebhook**](WebhooksApi.md#DeleteWebhook) | **Delete** /v1/webhooks/{id} | Delete a webhook.
[**DeleteWebhookMessage**](WebhooksApi.md#DeleteWebhookMessage) | **Delete** /v1/webhooks/{id}/messages/{messageId} | Delete a webhook message.
[**DeleteWebhookMessageAttempt**](WebhooksApi.md#DeleteWebhookMessageAttempt) | **Delete** /v1/webhooks/{id}/messages/{messageId}/attempts/{attemptId} | Delete a webhook attempt.
[**GetSingleWebhookMessage**](WebhooksApi.md#GetSingleWebhookMessage) | **Get** /v1/webhooks/{id}/messages/{messageId} | Get a single message from a webhook.
[**GetSingleWebhookMessageAttempt**](WebhooksApi.md#GetSingleWebhookMessageAttempt) | **Get** /v1/webhooks/{id}/messages/{messageId}/attempts/{attemptId} | Get a single failed attempt from a single webhook message.
[**GetWebhook**](WebhooksApi.md#GetWebhook) | **Get** /v1/webhooks/{id} | Get a single webhook.
[**GetWebhookMessageAttempts**](WebhooksApi.md#GetWebhookMessageAttempts) | **Get** /v1/webhooks/{id}/messages/{messageId}/attempts | Get all the failed attempts of a single webhook message.
[**GetWebhookMessages**](WebhooksApi.md#GetWebhookMessages) | **Get** /v1/webhooks/{id}/messages | Get all the messages of a single webhook.
[**ListWebhook**](WebhooksApi.md#ListWebhook) | **Get** /v1/webhooks | List all webhooks.
[**StoreWebhook**](WebhooksApi.md#StoreWebhook) | **Post** /v1/webhooks | Store a new webhook
[**SubmitWebook**](WebhooksApi.md#SubmitWebook) | **Post** /v1/webhooks/{id}/submit | Submit messages for a webhook.
[**TriggerTransactionWebhook**](WebhooksApi.md#TriggerTransactionWebhook) | **Post** /v1/webhooks/{id}/trigger-transaction/{transactionId} | Trigger webhook for a given transaction.
[**UpdateWebhook**](WebhooksApi.md#UpdateWebhook) | **Put** /v1/webhooks/{id} | Update existing webhook.
# **DeleteWebhook**
> DeleteWebhook(ctx, id, optional)
Delete a webhook.
Delete a webhook.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The webhook ID. |
**optional** | ***WebhooksApiDeleteWebhookOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a WebhooksApiDeleteWebhookOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
(empty response body)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **DeleteWebhookMessage**
> DeleteWebhookMessage(ctx, id, messageId, optional)
Delete a webhook message.
Delete a webhook message. Any time a webhook is triggered the message is stored before it's sent. You can delete them before or after sending.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The webhook ID. |
**messageId** | **int32**| The webhook message ID. |
**optional** | ***WebhooksApiDeleteWebhookMessageOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a WebhooksApiDeleteWebhookMessageOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
(empty response body)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **DeleteWebhookMessageAttempt**
> DeleteWebhookMessageAttempt(ctx, id, messageId, attemptId, optional)
Delete a webhook attempt.
Delete a webhook message attempt. If you delete all attempts for a webhook message, Firefly III will (once again) assume all is well with the webhook message and will try to send it again.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The webhook ID. |
**messageId** | **int32**| The webhook message ID. |
**attemptId** | **int32**| The webhook message attempt ID. |
**optional** | ***WebhooksApiDeleteWebhookMessageAttemptOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a WebhooksApiDeleteWebhookMessageAttemptOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
(empty response body)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetSingleWebhookMessage**
> WebhookMessageSingle GetSingleWebhookMessage(ctx, id, messageId, optional)
Get a single message from a webhook.
When a webhook is triggered it will store the actual content of the webhook in a webhook message. You can view and analyse a single one using this endpoint.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The webhook ID. |
**messageId** | **int32**| The webhook message ID. |
**optional** | ***WebhooksApiGetSingleWebhookMessageOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a WebhooksApiGetSingleWebhookMessageOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**WebhookMessageSingle**](WebhookMessageSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetSingleWebhookMessageAttempt**
> WebhookAttemptSingle GetSingleWebhookMessageAttempt(ctx, id, messageId, attemptId, optional)
Get a single failed attempt from a single webhook message.
When a webhook message fails to send it will store the failure in an \"attempt\". You can view and analyse these. Webhooks messages that receive too many attempts (failures) will not be fired. You must first clear out old attempts and try again. This endpoint shows you the details of a single attempt. The ID of the attempt must match the corresponding webhook and webhook message.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The webhook ID. |
**messageId** | **int32**| The webhook message ID. |
**attemptId** | **int32**| The webhook attempt ID. |
**optional** | ***WebhooksApiGetSingleWebhookMessageAttemptOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a WebhooksApiGetSingleWebhookMessageAttemptOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**WebhookAttemptSingle**](WebhookAttemptSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetWebhook**
> WebhookSingle GetWebhook(ctx, id, optional)
Get a single webhook.
Gets all info of a single webhook.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The webhook ID. |
**optional** | ***WebhooksApiGetWebhookOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a WebhooksApiGetWebhookOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**WebhookSingle**](WebhookSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetWebhookMessageAttempts**
> WebhookAttemptArray GetWebhookMessageAttempts(ctx, id, messageId, optional)
Get all the failed attempts of a single webhook message.
When a webhook message fails to send it will store the failure in an \"attempt\". You can view and analyse these. Webhook messages that receive too many attempts (failures) will not be sent again. You must first clear out old attempts before the message can go out again.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The webhook ID. |
**messageId** | **int32**| The webhook message ID. |
**optional** | ***WebhooksApiGetWebhookMessageAttemptsOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a WebhooksApiGetWebhookMessageAttemptsOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**limit** | **optional.Int32**| Number of items per page. The default pagination is per 50 items. |
**page** | **optional.Int32**| Page number. The default pagination is per 50 items. |
### Return type
[**WebhookAttemptArray**](WebhookAttemptArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetWebhookMessages**
> WebhookMessageArray GetWebhookMessages(ctx, id, optional)
Get all the messages of a single webhook.
When a webhook is triggered the actual message that will be send is stored in a \"message\". You can view and analyse these messages.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The webhook ID. |
**optional** | ***WebhooksApiGetWebhookMessagesOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a WebhooksApiGetWebhookMessagesOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**WebhookMessageArray**](WebhookMessageArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ListWebhook**
> WebhookArray ListWebhook(ctx, optional)
List all webhooks.
List all the user's webhooks.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***WebhooksApiListWebhookOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a WebhooksApiListWebhookOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**limit** | **optional.Int32**| Number of items per page. The default pagination is per 50 items. |
**page** | **optional.Int32**| Page number. The default pagination is per 50 items. |
### Return type
[**WebhookArray**](WebhookArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **StoreWebhook**
> WebhookSingle StoreWebhook(ctx, body, active, title, trigger, response, delivery, url, optional)
Store a new webhook
Creates a new webhook. The data required can be submitted as a JSON body or as a list of parameters. The webhook will be given a random secret.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**body** | [**WebhookStore**](WebhookStore.md)| JSON array or key=value pairs with the necessary webhook information. See the model for the exact specifications. |
**active** | **bool**| |
**title** | **string**| |
**trigger** | [**WebhookTrigger**](.md)| |
**response** | [**WebhookResponse**](.md)| |
**delivery** | [**WebhookDelivery**](.md)| |
**url** | **string**| |
**optional** | ***WebhooksApiStoreWebhookOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a WebhooksApiStoreWebhookOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**WebhookSingle**](WebhookSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: application/json, application/x-www-form-urlencoded
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **SubmitWebook**
> SubmitWebook(ctx, id, optional)
Submit messages for a webhook.
This endpoint will submit any open messages for this webhook. This is an asynchronous operation, so you can't see the result. Refresh the webhook message and/or the webhook message attempts to see the results. This may take some time if the webhook receiver is slow.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The webhook ID. |
**optional** | ***WebhooksApiSubmitWebookOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a WebhooksApiSubmitWebookOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
(empty response body)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **TriggerTransactionWebhook**
> TriggerTransactionWebhook(ctx, id, transactionId, optional)
Trigger webhook for a given transaction.
This endpoint will execute this webhook for a given transaction ID. This is an asynchronous operation, so you can't see the result. Refresh the webhook message and/or the webhook message attempts to see the results. This may take some time if the webhook receiver is slow.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The webhook ID. |
**transactionId** | **string**| The transaction ID. |
**optional** | ***WebhooksApiTriggerTransactionWebhookOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a WebhooksApiTriggerTransactionWebhookOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
(empty response body)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **UpdateWebhook**
> WebhookSingle UpdateWebhook(ctx, body, active, title, secret, trigger, response, delivery, url, id, optional)
Update existing webhook.
Update an existing webhook's information. If you wish to reset the secret, submit any value as the \"secret\". Firefly III will take this as a hint and reset the secret of the webhook.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**body** | [**WebhookUpdate**](WebhookUpdate.md)| JSON array with updated webhook information. See the model for the exact specifications. |
**active** | **bool**| |
**title** | **string**| |
**secret** | **string**| |
**trigger** | [**WebhookTrigger**](.md)| |
**response** | [**WebhookResponse**](.md)| |
**delivery** | [**WebhookDelivery**](.md)| |
**url** | **string**| |
**id** | **string**| The webhook ID. |
**optional** | ***WebhooksApiUpdateWebhookOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a WebhooksApiUpdateWebhookOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**WebhookSingle**](WebhookSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: application/json, application/x-www-form-urlencoded
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)