12 KiB
{{classname}}
All URIs are relative to https://demo.firefly-iii.org/api
Method | HTTP request | Description |
---|---|---|
DeleteRule | Delete /v1/rules/{id} | Delete an rule. |
FireRule | Post /v1/rules/{id}/trigger | Fire the rule on your transactions. |
GetRule | Get /v1/rules/{id} | Get a single rule. |
ListRule | Get /v1/rules | List all rules. |
StoreRule | Post /v1/rules | Store a new rule |
TestRule | Get /v1/rules/{id}/test | Test which transactions would be hit by the rule. No changes will be made. |
UpdateRule | Put /v1/rules/{id} | Update existing rule. |
DeleteRule
DeleteRule(ctx, id, optional) Delete an rule.
Delete an rule.
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The ID of the rule. | |
optional | *RulesApiDeleteRuleOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a RulesApiDeleteRuleOpts 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]
FireRule
FireRule(ctx, id, optional) Fire the rule on your transactions.
Fire the rule group on your transactions. Changes will be made by the rules in the group! Limit the result if you want to.
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The ID of the rule. | |
optional | *RulesApiFireRuleOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a RulesApiFireRuleOpts struct
Name | Type | Description | Notes |
---|
xTraceId | optional.Interface of string| Unique identifier associated with this request. | start | optional.String| A date formatted YYYY-MM-DD, to limit the transactions the actions will be applied to. If the start date is not present, it will be set to one year ago. If you use this field, both the start date and the end date must be present. | end | optional.String| A date formatted YYYY-MM-DD, to limit the transactions the actions will be applied to. If the end date is not present, it will be set to today. If you use this field, both the start date and the end date must be present. | accounts | **optional.Interface of []int64**| Limit the triggering of the rule to these asset accounts or liabilities. Only asset accounts and liabilities will be accepted. Other types will be silently dropped. |
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]
GetRule
RuleSingle GetRule(ctx, id, optional) Get a single rule.
Get a single rule.
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The ID of the object. | |
optional | *RulesApiGetRuleOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a RulesApiGetRuleOpts 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]
ListRule
RuleArray ListRule(ctx, optional) List all rules.
List all rules.
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *RulesApiListRuleOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a RulesApiListRuleOpts 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]
StoreRule
RuleSingle StoreRule(ctx, body, title, description, ruleGroupId, ruleGroupTitle, order, trigger, active, strict, stopProcessing, triggers, actions, optional) Store a new rule
Creates a new rule. The data required can be submitted as a JSON body or as a list of parameters.
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
body | RuleStore | JSON array or key=value pairs with the necessary rule information. See the model for the exact specifications. | |
title | string | ||
description | string | ||
ruleGroupId | string | ||
ruleGroupTitle | string | ||
order | int32 | ||
trigger | RuleTriggerType | ||
active | bool | ||
strict | bool | ||
stopProcessing | bool | ||
triggers | **[]RuleTriggerStore** | ||
actions | **[]RuleActionStore** | ||
optional | *RulesApiStoreRuleOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a RulesApiStoreRuleOpts 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]
TestRule
TransactionArray TestRule(ctx, id, optional) Test which transactions would be hit by the rule. No changes will be made.
Test which transactions would be hit by the rule. No changes will be made. Limit the result if you want to.
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The ID of the rule. | |
optional | *RulesApiTestRuleOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a RulesApiTestRuleOpts struct
Name | Type | Description | Notes |
---|
xTraceId | optional.Interface of string| Unique identifier associated with this request. | start | optional.String| A date formatted YYYY-MM-DD, to limit the transactions the test will be applied to. Both the start date and the end date must be present. | end | optional.String| A date formatted YYYY-MM-DD, to limit the transactions the test will be applied to. Both the start date and the end date must be present. | accounts | **optional.Interface of []int64**| Limit the testing of the rule to these asset accounts or liabilities. Only asset accounts and liabilities will be accepted. Other types will be silently dropped. |
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]
UpdateRule
RuleSingle UpdateRule(ctx, body, title, description, ruleGroupId, order, trigger, active, strict, stopProcessing, triggers, actions, id, optional) Update existing rule.
Update existing rule.
Required Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
body | RuleUpdate | JSON array with updated rule information. See the model for the exact specifications. | |
title | string | ||
description | string | ||
ruleGroupId | string | ||
order | int32 | ||
trigger | RuleTriggerType | ||
active | bool | ||
strict | bool | ||
stopProcessing | bool | ||
triggers | **[]RuleTriggerUpdate** | ||
actions | **[]RuleActionUpdate** | ||
id | string | The ID of the object. | |
optional | *RulesApiUpdateRuleOpts | optional parameters | nil if no parameters |
Optional Parameters
Optional parameters are passed through a pointer to a RulesApiUpdateRuleOpts 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]