banks2ff/firefly-iii-api/docs/WebhooksApi.md
Jacob Kiers f0b8df90b9 Initial commit
This is definitely not functional yet.

Signed-off-by: Jacob Kiers <code@kiers.eu>
2024-10-04 20:31:39 +02:00

17 KiB

\WebhooksApi

All URIs are relative to https://demo.firefly-iii.org/api

Method HTTP request Description
delete_webhook DELETE /v1/webhooks/{id} Delete a webhook.
delete_webhook_message DELETE /v1/webhooks/{id}/messages/{messageId} Delete a webhook message.
delete_webhook_message_attempt DELETE /v1/webhooks/{id}/messages/{messageId}/attempts/{attemptId} Delete a webhook attempt.
get_single_webhook_message GET /v1/webhooks/{id}/messages/{messageId} Get a single message from a webhook.
get_single_webhook_message_attempt GET /v1/webhooks/{id}/messages/{messageId}/attempts/{attemptId} Get a single failed attempt from a single webhook message.
get_webhook GET /v1/webhooks/{id} Get a single webhook.
get_webhook_message_attempts GET /v1/webhooks/{id}/messages/{messageId}/attempts Get all the failed attempts of a single webhook message.
get_webhook_messages GET /v1/webhooks/{id}/messages Get all the messages of a single webhook.
list_webhook GET /v1/webhooks List all webhooks.
store_webhook POST /v1/webhooks Store a new webhook
submit_webook POST /v1/webhooks/{id}/submit Submit messages for a webhook.
trigger_transaction_webhook POST /v1/webhooks/{id}/trigger-transaction/{transactionId} Trigger webhook for a given transaction.
update_webhook PUT /v1/webhooks/{id} Update existing webhook.

delete_webhook

delete_webhook(id, x_trace_id) Delete a webhook.

Delete a webhook.

Parameters

Name Type Description Required Notes
id String The webhook ID. [required]
x_trace_id Option<uuid::Uuid> Unique identifier associated with this request.

Return type

(empty response body)

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_webhook_message

delete_webhook_message(id, message_id, x_trace_id) 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.

Parameters

Name Type Description Required Notes
id String The webhook ID. [required]
message_id i32 The webhook message ID. [required]
x_trace_id Option<uuid::Uuid> Unique identifier associated with this request.

Return type

(empty response body)

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_webhook_message_attempt

delete_webhook_message_attempt(id, message_id, attempt_id, x_trace_id) 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.

Parameters

Name Type Description Required Notes
id String The webhook ID. [required]
message_id i32 The webhook message ID. [required]
attempt_id i32 The webhook message attempt ID. [required]
x_trace_id Option<uuid::Uuid> Unique identifier associated with this request.

Return type

(empty response body)

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_single_webhook_message

models::WebhookMessageSingle get_single_webhook_message(id, message_id, x_trace_id) 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.

Parameters

Name Type Description Required Notes
id String The webhook ID. [required]
message_id i32 The webhook message ID. [required]
x_trace_id Option<uuid::Uuid> Unique identifier associated with this request.

Return type

models::WebhookMessageSingle

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.api+json, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_single_webhook_message_attempt

models::WebhookAttemptSingle get_single_webhook_message_attempt(id, message_id, attempt_id, x_trace_id) 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.

Parameters

Name Type Description Required Notes
id String The webhook ID. [required]
message_id i32 The webhook message ID. [required]
attempt_id i32 The webhook attempt ID. [required]
x_trace_id Option<uuid::Uuid> Unique identifier associated with this request.

Return type

models::WebhookAttemptSingle

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.api+json, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_webhook

models::WebhookSingle get_webhook(id, x_trace_id) Get a single webhook.

Gets all info of a single webhook.

Parameters

Name Type Description Required Notes
id String The webhook ID. [required]
x_trace_id Option<uuid::Uuid> Unique identifier associated with this request.

Return type

models::WebhookSingle

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.api+json, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_webhook_message_attempts

models::WebhookAttemptArray get_webhook_message_attempts(id, message_id, x_trace_id, limit, page) 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.

Parameters

Name Type Description Required Notes
id String The webhook ID. [required]
message_id i32 The webhook message ID. [required]
x_trace_id Option<uuid::Uuid> Unique identifier associated with this request.
limit Option<i32> Number of items per page. The default pagination is per 50 items.
page Option<i32> Page number. The default pagination is per 50 items.

Return type

models::WebhookAttemptArray

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.api+json, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_webhook_messages

models::WebhookMessageArray get_webhook_messages(id, x_trace_id) 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.

Parameters

Name Type Description Required Notes
id String The webhook ID. [required]
x_trace_id Option<uuid::Uuid> Unique identifier associated with this request.

Return type

models::WebhookMessageArray

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.api+json, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_webhook

models::WebhookArray list_webhook(x_trace_id, limit, page) List all webhooks.

List all the user's webhooks.

Parameters

Name Type Description Required Notes
x_trace_id Option<uuid::Uuid> Unique identifier associated with this request.
limit Option<i32> Number of items per page. The default pagination is per 50 items.
page Option<i32> Page number. The default pagination is per 50 items.

Return type

models::WebhookArray

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.api+json, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

store_webhook

models::WebhookSingle store_webhook(webhook_store, x_trace_id) 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.

Parameters

Name Type Description Required Notes
webhook_store WebhookStore JSON array or key=value pairs with the necessary webhook information. See the model for the exact specifications. [required]
x_trace_id Option<uuid::Uuid> Unique identifier associated with this request.

Return type

models::WebhookSingle

Authorization

firefly_iii_auth, 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] [Back to Model list] [Back to README]

submit_webook

submit_webook(id, x_trace_id) 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.

Parameters

Name Type Description Required Notes
id String The webhook ID. [required]
x_trace_id Option<uuid::Uuid> Unique identifier associated with this request.

Return type

(empty response body)

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

trigger_transaction_webhook

trigger_transaction_webhook(id, transaction_id, x_trace_id) 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.

Parameters

Name Type Description Required Notes
id String The webhook ID. [required]
transaction_id String The transaction ID. [required]
x_trace_id Option<uuid::Uuid> Unique identifier associated with this request.

Return type

(empty response body)

Authorization

firefly_iii_auth, local_bearer_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_webhook

models::WebhookSingle update_webhook(id, webhook_update, x_trace_id) 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.

Parameters

Name Type Description Required Notes
id String The webhook ID. [required]
webhook_update WebhookUpdate JSON array with updated webhook information. See the model for the exact specifications. [required]
x_trace_id Option<uuid::Uuid> Unique identifier associated with this request.

Return type

models::WebhookSingle

Authorization

firefly_iii_auth, 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] [Back to Model list] [Back to README]