12 KiB
{{classname}}
All URIs are relative to https://demo.firefly-iii.org/api
Method | HTTP request | Description |
---|---|---|
DeleteAttachment | Delete /v1/attachments/{id} | Delete an attachment. |
DownloadAttachment | Get /v1/attachments/{id}/download | Download a single attachment. |
GetAttachment | Get /v1/attachments/{id} | Get a single attachment. |
ListAttachment | Get /v1/attachments | List all attachments. |
StoreAttachment | Post /v1/attachments | Store a new attachment. |
UpdateAttachment | Put /v1/attachments/{id} | Update existing attachment. |
UploadAttachment | Post /v1/attachments/{id}/upload | Upload an attachment. |
DeleteAttachment
DeleteAttachment(ctx, id, optional) Delete an attachment.
With this endpoint you delete an attachment, including any stored file data.
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The ID of the single attachment. | |
optional | *AttachmentsApiDeleteAttachmentOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a AttachmentsApiDeleteAttachmentOpts struct
Name | Type | Description | Notes |
---|
xTraceId | optional.Interface of string| 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]
DownloadAttachment
*os.File DownloadAttachment(ctx, id, optional) 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".
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The ID of the attachment. | |
optional | *AttachmentsApiDownloadAttachmentOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a AttachmentsApiDownloadAttachmentOpts struct
Name | Type | Description | Notes |
---|
xTraceId | optional.Interface of string| 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]
GetAttachment
AttachmentSingle GetAttachment(ctx, id, optional) 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).
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The ID of the attachment. | |
optional | *AttachmentsApiGetAttachmentOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a AttachmentsApiGetAttachmentOpts struct
Name | Type | Description | Notes |
---|
xTraceId | optional.Interface of string| 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]
ListAttachment
AttachmentArray ListAttachment(ctx, optional) List all attachments.
This endpoint lists all attachments.
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *AttachmentsApiListAttachmentOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a AttachmentsApiListAttachmentOpts struct
Name | Type | Description | Notes |
---|---|---|---|
xTraceId | optional.Interface of string | 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
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]
StoreAttachment
AttachmentSingle StoreAttachment(ctx, body, filename, attachableType, attachableId, title, notes, optional) 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.
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
body | AttachmentStore | JSON array or key=value pairs with the necessary attachment information. See the model for the exact specifications. | |
filename | string | ||
attachableType | AttachableType | ||
attachableId | string | ||
title | string | ||
notes | string | ||
optional | *AttachmentsApiStoreAttachmentOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a AttachmentsApiStoreAttachmentOpts struct
Name | Type | Description | Notes |
---|
xTraceId | optional.Interface of string| 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]
UpdateAttachment
AttachmentSingle UpdateAttachment(ctx, body, filename, title, notes, id, optional) 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.
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
body | AttachmentUpdate | JSON array with updated attachment information. See the model for the exact specifications. | |
filename | string | ||
title | string | ||
notes | string | ||
id | string | The ID of the attachment. | |
optional | *AttachmentsApiUpdateAttachmentOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a AttachmentsApiUpdateAttachmentOpts struct
Name | Type | Description | Notes |
---|
xTraceId | optional.Interface of string| 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]
UploadAttachment
UploadAttachment(ctx, id, optional) 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.
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The ID of the attachment. | |
optional | *AttachmentsApiUploadAttachmentOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a AttachmentsApiUploadAttachmentOpts struct
Name | Type | Description | Notes |
---|
body | optional.Interface of Object| | xTraceId | optional.Interface of string| Unique identifier associated with this request. |
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]