This is definitely not functional yet. Signed-off-by: Jacob Kiers <code@kiers.eu>
8.6 KiB
\AttachmentsApi
All URIs are relative to https://demo.firefly-iii.org/api
Method | HTTP request | Description |
---|---|---|
delete_attachment | DELETE /v1/attachments/{id} | Delete an attachment. |
download_attachment | GET /v1/attachments/{id}/download | Download a single attachment. |
get_attachment | GET /v1/attachments/{id} | Get a single attachment. |
list_attachment | GET /v1/attachments | List all attachments. |
store_attachment | POST /v1/attachments | Store a new attachment. |
update_attachment | PUT /v1/attachments/{id} | Update existing attachment. |
upload_attachment | POST /v1/attachments/{id}/upload | Upload an attachment. |
delete_attachment
delete_attachment(id, x_trace_id) Delete an attachment.
With this endpoint you delete an attachment, including any stored file data.
Parameters
Name | Type | Description | Required | Notes |
---|---|---|---|---|
id | String | The ID of the single attachment. | [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]
download_attachment
std::path::PathBuf download_attachment(id, x_trace_id) Download a single attachment.
This endpoint allows you to download the binary content of a transaction. It will be sent to you as a download, using the content type "application/octet-stream" and content disposition "attachment; filename=example.pdf".
Parameters
Name | Type | Description | Required | Notes |
---|---|---|---|---|
id | String | The ID of the attachment. | [required] | |
x_trace_id | Option<uuid::Uuid> | Unique identifier associated with this request. |
Return type
Authorization
firefly_iii_auth, local_bearer_auth
HTTP request headers
- Content-Type: Not defined
- Accept: application/octet-stream, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_attachment
models::AttachmentSingle get_attachment(id, x_trace_id) Get a single attachment.
Get a single attachment. This endpoint only returns the available metadata for the attachment. Actual file data is handled in two other endpoints (see below).
Parameters
Name | Type | Description | Required | Notes |
---|---|---|---|---|
id | String | The ID of the attachment. | [required] | |
x_trace_id | Option<uuid::Uuid> | Unique identifier associated with this request. |
Return type
Authorization
firefly_iii_auth, local_bearer_auth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/vnd.api+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list_attachment
models::AttachmentArray list_attachment(x_trace_id, limit, page) List all attachments.
This endpoint lists all attachments.
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
Authorization
firefly_iii_auth, local_bearer_auth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/vnd.api+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
store_attachment
models::AttachmentSingle store_attachment(attachment_store, x_trace_id) Store a new attachment.
Creates a new attachment. The data required can be submitted as a JSON body or as a list of parameters. You cannot use this endpoint to upload the actual file data (see below). This endpoint only creates the attachment object.
Parameters
Name | Type | Description | Required | Notes |
---|---|---|---|---|
attachment_store | AttachmentStore | JSON array or key=value pairs with the necessary attachment information. See the model for the exact specifications. | [required] | |
x_trace_id | Option<uuid::Uuid> | Unique identifier associated with this request. |
Return type
Authorization
firefly_iii_auth, local_bearer_auth
HTTP request headers
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/vnd.api+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_attachment
models::AttachmentSingle update_attachment(id, attachment_update, x_trace_id) Update existing attachment.
Update the meta data for an existing attachment. This endpoint does not allow you to upload or download data. For that, see below.
Parameters
Name | Type | Description | Required | Notes |
---|---|---|---|---|
id | String | The ID of the attachment. | [required] | |
attachment_update | AttachmentUpdate | JSON array with updated attachment information. See the model for the exact specifications. | [required] | |
x_trace_id | Option<uuid::Uuid> | Unique identifier associated with this request. |
Return type
Authorization
firefly_iii_auth, local_bearer_auth
HTTP request headers
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/vnd.api+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
upload_attachment
upload_attachment(id, x_trace_id, body) Upload an attachment.
Use this endpoint to upload (and possible overwrite) the file contents of an attachment. Simply put the entire file in the body as binary data.
Parameters
Name | Type | Description | Required | Notes |
---|---|---|---|---|
id | String | The ID of the attachment. | [required] | |
x_trace_id | Option<uuid::Uuid> | Unique identifier associated with this request. | ||
body | Option<std::path::PathBuf> |
Return type
(empty response body)
Authorization
firefly_iii_auth, local_bearer_auth
HTTP request headers
- Content-Type: application/octet-stream
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]