From 216306c216c2453bbd4ee36067f0cf01f8f5561f Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 1 Aug 2023 11:02:22 +0200 Subject: [PATCH] Add balance chart --- firefly-iii-2.0.5-v1.yaml | 2 +- firefly-iii-2.0.5-v2.yaml | 93 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 93 insertions(+), 2 deletions(-) diff --git a/firefly-iii-2.0.5-v1.yaml b/firefly-iii-2.0.5-v1.yaml index 4d8b8d0..4799544 100644 --- a/firefly-iii-2.0.5-v1.yaml +++ b/firefly-iii-2.0.5-v1.yaml @@ -5,7 +5,7 @@ servers: info: title: Firefly III API v2.0.5 description: | - This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the "Authorize" button to try the API below. This file was last generated on 2023-08-01T08:45:46+00:00 + This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the "Authorize" button to try the API below. This file was last generated on 2023-08-01T09:00:38+00:00 version: "2.0.5" contact: name: James Cole diff --git a/firefly-iii-2.0.5-v2.yaml b/firefly-iii-2.0.5-v2.yaml index 830e0f6..1b223c9 100644 --- a/firefly-iii-2.0.5-v2.yaml +++ b/firefly-iii-2.0.5-v2.yaml @@ -5,7 +5,7 @@ servers: info: title: Firefly III API v2.0.5 description: | - This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the "Authorize" button to try the API below. This file was last generated on 2023-08-01T08:45:46+00:00 + This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the "Authorize" button to try the API below. This file was last generated on 2023-08-01T09:00:38+00:00 version: "2.0.5" contact: name: James Cole @@ -96,6 +96,88 @@ paths: application/json: schema: $ref: '#/components/schemas/ChartLineV2' + /v2/chart/balance/balance: + get: + tags: + - charts + summary: A chart that contains spent/earned amounts + description: | + The chart contains spent/earned amounts for the given date range, grouped by the given period, and collected for the given accounts. + operationId: getChartAccountOverview + parameters: + - name: X-Trace-Id + in: header + description: Unique identifier associated with this request. + required: false + schema: + type: string + format: uuid + - in: query + name: start + description: | + A date formatted YYYY-MM-DD. + required: true + schema: + type: string + format: date + - in: query + name: end + description: | + A date formatted YYYY-MM-DD. + required: true + schema: + type: string + format: date + - in: query + name: accounts + description: | + An array of accounts that should be included. Example: accounts[]=1&accounts[]=2 + required: true + style: form + explode: true + useBrackets: true # new attribute, default false + schema: + type: array + items: + type: integer + format: int32 + - in: query + name: period + description: The period by which the results must be grouped. + required: true + schema: + $ref: '#/components/schemas/PeriodProperty' + responses: + 401: + description: Unauthenticated + content: + application/json: + schema: + $ref: '#/components/schemas/Unauthenticated' + 404: + description: Page not found + content: + application/json: + schema: + $ref: '#/components/schemas/NotFound' + 400: + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequest' + 500: + description: Internal exception + content: + application/json: + schema: + $ref: '#/components/schemas/InternalException' + 200: + description: Chart information. Check out the model for more details. Each main entry is a set of data. + content: + application/json: + schema: + $ref: '#/components/schemas/ChartLineV2' /v2/accounts/{id}/transactions: get: tags: @@ -1282,6 +1364,15 @@ components: properties: data: $ref: '#/components/schemas/PreferenceRead' + PeriodProperty: + type: string + enum: + - 1D + - 1W + - 1M + - 3M + - 6M + - 1Y PolymorphicProperty: oneOf: - type: boolean