Skip to navigation

Check whether a saved balance query would be saved

This endpoint runs the checks the save action makes on the query in the body, and persists nothing. A query that passes is reported here. One that would be refused is reported as the refusal itself, carrying the reason, rather than as a bare negative. The name is not checked for collision with an existing query. Check failures and refusals give 400 and 403 as on create.

Permissions for nested calls. This endpoint calls other Fynapse services with your token. Depending on the request, the token also needs:

  • journal_line_definition_read, when the entity is stored in ClickHouse, which applies to most queries.
  • system_settings_read and either fiscal_calendar_read or balance_read, for a balanceMovement query with relative or fiscal dates.

Authentication

AuthorizationBearer

OAuth authentication of the form <token>.

Request

This endpoint expects an object.
balanceobjectRequired

A saved query of type balance, which reads balances as at one date.

OR
balanceMovementobjectRequired

A saved query of type balanceMovement, which reads the movement between an opening and a closing date.

Response

OK
validtrue

Always true. A query that would be refused is answered with the refusal as an error response, never with valid false.

persistedfalse
Always false. The check stores nothing.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error
5XX
Server Error