6.9 KiB
{{classname}}
All URIs are relative to https://demo.firefly-iii.org/api
Method | HTTP request | Description |
---|---|---|
GetPreference | Get /v1/preferences/{name} | Return a single preference. |
ListPreference | Get /v1/preferences | List all users preferences. |
StorePreference | Post /v1/preferences | Store a new preference for this user. |
UpdatePreference | Put /v1/preferences/{name} | Update preference |
GetPreference
PreferenceSingle GetPreference(ctx, name, optional) Return a single preference.
Return a single preference and the value.
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
name | string | The name of the preference. | |
optional | *PreferencesApiGetPreferenceOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a PreferencesApiGetPreferenceOpts 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/vnd.api+json, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListPreference
PreferenceArray ListPreference(ctx, optional) List all users preferences.
List all of the preferences of the user.
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *PreferencesApiListPreferenceOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a PreferencesApiListPreferenceOpts 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/vnd.api+json, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StorePreference
PreferenceSingle StorePreference(ctx, body, createdAt, updatedAt, name, data, optional) Store a new preference for this user.
This endpoint creates a new preference. The name and data are free-format, and entirely up to you. If the preference is not used in Firefly III itself it may not be configurable through the user interface, but you can use this endpoint to persist custom data for your own app.
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
body | Preference | JSON array with the necessary preference information or key=value pairs. See the model for the exact specifications. | |
createdAt | time.Time | ||
updatedAt | time.Time | ||
name | string | ||
data | PolymorphicProperty | ||
optional | *PreferencesApiStorePreferenceOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a PreferencesApiStorePreferenceOpts 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/vnd.api+json, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdatePreference
PreferenceSingle UpdatePreference(ctx, body, data, name, optional) Update preference
Update a user's preference.
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
body | PreferenceUpdate | JSON array or key=value pairs with the necessary preference information. See the model for the exact specifications. | |
data | PolymorphicProperty | ||
name | string | The name of the preference. Will always overwrite. Will be created if it does not exist. | |
optional | *PreferencesApiUpdatePreferenceOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a PreferencesApiUpdatePreferenceOpts 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/vnd.api+json, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]