go-firefly3/docs/RuleGroupsApi.md
2024-05-11 14:45:50 +03:00

14 KiB

{{classname}}

All URIs are relative to https://demo.firefly-iii.org/api

Method HTTP request Description
DeleteRuleGroup Delete /v1/rule-groups/{id} Delete a rule group.
FireRuleGroup Post /v1/rule-groups/{id}/trigger Fire the rule group on your transactions.
GetRuleGroup Get /v1/rule-groups/{id} Get a single rule group.
ListRuleByGroup Get /v1/rule-groups/{id}/rules List rules in this rule group.
ListRuleGroup Get /v1/rule-groups List all rule groups.
StoreRuleGroup Post /v1/rule-groups Store a new rule group.
TestRuleGroup Get /v1/rule-groups/{id}/test Test which transactions would be hit by the rule group. No changes will be made.
UpdateRuleGroup Put /v1/rule-groups/{id} Update existing rule group.

DeleteRuleGroup

DeleteRuleGroup(ctx, id, optional) Delete a rule group.

Delete a rule group.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string The ID of the rule group.
optional *RuleGroupsApiDeleteRuleGroupOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a RuleGroupsApiDeleteRuleGroupOpts 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]

FireRuleGroup

FireRuleGroup(ctx, id, optional) Fire the rule group on your transactions.

Fire the rule group on your transactions. Changes will be made by the rules in the rule 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 group.
optional *RuleGroupsApiFireRuleGroupOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a RuleGroupsApiFireRuleGroupOpts 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. 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. Both the start date and the end date must be present. | accounts | optional.Interface of []int64| Limit the triggering of the rule group 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]

GetRuleGroup

RuleGroupSingle GetRuleGroup(ctx, id, optional) Get a single rule group.

Get a single rule group. This does not include the rules. For that, 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 rule group.
optional *RuleGroupsApiGetRuleGroupOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a RuleGroupsApiGetRuleGroupOpts struct

Name Type Description Notes

xTraceId | optional.Interface of string| Unique identifier associated with this request. |

Return type

RuleGroupSingle

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]

ListRuleByGroup

RuleArray ListRuleByGroup(ctx, id, optional) List rules in this rule group.

List rules in this rule group.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string The ID of the rule group.
optional *RuleGroupsApiListRuleByGroupOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a RuleGroupsApiListRuleByGroupOpts 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

RuleArray

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]

ListRuleGroup

RuleGroupArray ListRuleGroup(ctx, optional) List all rule groups.

List all rule groups.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *RuleGroupsApiListRuleGroupOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a RuleGroupsApiListRuleGroupOpts 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

RuleGroupArray

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]

StoreRuleGroup

RuleGroupSingle StoreRuleGroup(ctx, body, title, description, order, active, optional) Store a new rule group.

Creates a new rule group. 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 RuleGroupStore JSON array or key=value pairs with the necessary rule group information. See the model for the exact specifications.
title string
description string
order int32
active bool
optional *RuleGroupsApiStoreRuleGroupOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a RuleGroupsApiStoreRuleGroupOpts struct

Name Type Description Notes

xTraceId | optional.Interface of string| Unique identifier associated with this request. |

Return type

RuleGroupSingle

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]

TestRuleGroup

TransactionArray TestRuleGroup(ctx, id, optional) Test which transactions would be hit by the rule group. No changes will be made.

Test which transactions would be hit by the rule group. 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 group.
optional *RuleGroupsApiTestRuleGroupOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a RuleGroupsApiTestRuleGroupOpts 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. | 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. | searchLimit | optional.Int32| Maximum number of transactions Firefly III will try. Don't set this too high, or it will take Firefly III very long to run the test. I suggest a max of 200. | triggeredLimit | optional.Int32| Maximum number of transactions the rule group can actually trigger on, before Firefly III stops. I would suggest setting this to 10 or 15. Don't go above the user's page size, because browsing to page 2 or 3 of a test result would fire the test again, making any navigation efforts very slow. | accounts | optional.Interface of []int64| Limit the testing of the rule group to these asset accounts or liabilities. Only asset accounts and liabilities will be accepted. Other types will be silently dropped. |

Return type

TransactionArray

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]

UpdateRuleGroup

RuleGroupSingle UpdateRuleGroup(ctx, body, title, description, order, active, id, optional) Update existing rule group.

Update existing rule group.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body RuleGroupUpdate JSON array with updated rule group information. See the model for the exact specifications.
title string
description string
order int32
active bool
id string The ID of the rule group.
optional *RuleGroupsApiUpdateRuleGroupOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a RuleGroupsApiUpdateRuleGroupOpts struct

Name Type Description Notes

xTraceId | optional.Interface of string| Unique identifier associated with this request. |

Return type

RuleGroupSingle

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]