286 lines
12 KiB
Markdown
286 lines
12 KiB
Markdown
|
# {{classname}}
|
||
|
|
||
|
All URIs are relative to *https://demo.firefly-iii.org/api*
|
||
|
|
||
|
Method | HTTP request | Description
|
||
|
------------- | ------------- | -------------
|
||
|
[**DeleteAttachment**](AttachmentsApi.md#DeleteAttachment) | **Delete** /v1/attachments/{id} | Delete an attachment.
|
||
|
[**DownloadAttachment**](AttachmentsApi.md#DownloadAttachment) | **Get** /v1/attachments/{id}/download | Download a single attachment.
|
||
|
[**GetAttachment**](AttachmentsApi.md#GetAttachment) | **Get** /v1/attachments/{id} | Get a single attachment.
|
||
|
[**ListAttachment**](AttachmentsApi.md#ListAttachment) | **Get** /v1/attachments | List all attachments.
|
||
|
[**StoreAttachment**](AttachmentsApi.md#StoreAttachment) | **Post** /v1/attachments | Store a new attachment.
|
||
|
[**UpdateAttachment**](AttachmentsApi.md#UpdateAttachment) | **Put** /v1/attachments/{id} | Update existing attachment.
|
||
|
[**UploadAttachment**](AttachmentsApi.md#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**](.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)
|
||
|
|
||
|
# **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**](.md)| Unique identifier associated with this request. |
|
||
|
|
||
|
### Return type
|
||
|
|
||
|
[***os.File**](*os.File.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/octet-stream, 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)
|
||
|
|
||
|
# **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**](.md)| Unique identifier associated with this request. |
|
||
|
|
||
|
### Return type
|
||
|
|
||
|
[**AttachmentSingle**](AttachmentSingle.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/json, application/vnd.api+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)
|
||
|
|
||
|
# **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**](.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
|
||
|
|
||
|
[**AttachmentArray**](AttachmentArray.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/json, application/vnd.api+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)
|
||
|
|
||
|
# **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**](AttachmentStore.md)| JSON array or key=value pairs with the necessary attachment information. See the model for the exact specifications. |
|
||
|
**filename** | **string**| |
|
||
|
**attachableType** | [**AttachableType**](.md)| |
|
||
|
**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**](.md)| Unique identifier associated with this request. |
|
||
|
|
||
|
### Return type
|
||
|
|
||
|
[**AttachmentSingle**](AttachmentSingle.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/json, application/vnd.api+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)
|
||
|
|
||
|
# **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**](AttachmentUpdate.md)| 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**](.md)| Unique identifier associated with this request. |
|
||
|
|
||
|
### Return type
|
||
|
|
||
|
[**AttachmentSingle**](AttachmentSingle.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/json, application/vnd.api+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)
|
||
|
|
||
|
# **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**](Object.md)| |
|
||
|
**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**: application/octet-stream
|
||
|
- **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)
|
||
|
|