mod-finance-storage version v1
https://github.com/folio-org/mod-finance-storage
mod-finance-storage (Ledger Rollover Logs)
CRUD APIs used to manage ledger rollover logs.
/finance-storage/ledger-rollovers-logs
Entity representing a ledger-rollovers-log
Get list of rollovers logs
get /finance-storage/ledger-rollovers-logs
Get list of rollovers logs
Query Parameters
- query: (string)
A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
with valid searchable fields: for example 'ledgerRolloverType'
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode ["ledgerRolloverType", "Commit", "="]
- totalRecords: (string - default: auto - pattern: exact|estimated|none|auto)
How to calculate the totalRecords property. "exact" for the correct number, "estimated" for an estimation, "auto" to automatically select "exact" or "estimated", "none" for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
none
- offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)
Skip over a number of elements by specifying an offset value for the query
Example:
0
- limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)
Limit the number of elements returned in the response
Example:
10
HTTP status code 200
Returns item with a given ID
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Contains a list of rollover runs",
"type": "object",
"properties": {
"ledgerFiscalYearRolloverLogs": {
"description": "The list of rollover runs",
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Rollover log",
"type": "object",
"properties": {
"ledgerRolloverId": {
"description": "Ledger fiscal year rollover UUID",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"ledgerId": {
"description": "Ledger UUID",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"startDate": {
"description": "This is \"createdDate\" from rollover metadata. ",
"type": "string",
"format": "date-time",
"readonly": true
},
"endDate": {
"description": "This is \"updatedDate\" from rollover metadata. Should be provided only when \"status\" is \"Success\" or \"Error\". ",
"type": "string",
"format": "date-time",
"readonly": true
},
"rolloverStatus": {
"description": "Final status of the rollover",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.RolloverStatus",
"enum": [
"Not Started",
"In Progress",
"Error",
"Success"
],
"default": "Not Started"
},
"ledgerRolloverType": {
"description": "Type of rollover. Action Commit means run real rollover",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"javaName": "RolloverType",
"enum": [
"Preview",
"Commit",
"Rollback"
],
"javaEnums": [
{
"name": "PREVIEW",
"title": "Preview",
"description": "Run only budget and encumbrance rollover. Result will be not saved in real tables."
},
{
"name": "COMMIT",
"title": "Commit",
"description": "Run real for budgets, encumbrances and orders rollover. Result will be saved in real tables."
},
{
"name": "ROLLBACK",
"title": "Rollback",
"description": "Rollback budgets, encumbrances and orders rollover."
}
],
"default": "Commit"
}
},
"additionalProperties": false,
"required": [
"ledgerRolloverId",
"startDate",
"rolloverStatus",
"ledgerRolloverType"
]
}
},
"totalRecords": {
"description": "The number of records contained in this collection",
"type": "integer",
"minimum": 0
}
},
"additionalProperties": false,
"required": [
"logs",
"totalRecords"
]
}
Example:
{
"logs": [
{
"ledgerRolloverId": "56ac60b4-122d-1e1c-9acb-8293df12d16d",
"ledgerId": "33ac60b4-122d-1e1c-9acb-8293df12d133",
"startDate": "2022-01-01T00:00:00Z",
"endDate": "2022-01-01T00:10:12Z",
"rolloverStatus": "Success",
"ledgerRolloverType": "Commit"
}
],
"totalRecords": 1
}
HTTP status code 400
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Body
Media type: text/plain
Type: any
Example:
"unable to list ledger-rollovers-logs -- malformed parameter 'query', syntax error at column 6"
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
"unable to list ledger-rollovers-logs -- unauthorized"
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"ledger-rollovers-log not found"
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Entity representing a ledger-rollovers-log
Retrieve ledger-rollovers-log item with given {ledger-rollovers-logId}
get /finance-storage/ledger-rollovers-logs/{id}
Retrieve ledger-rollovers-log item with given {ledger-rollovers-logId}
URI Parameters
- id: required(string - pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$)
The UUID of a ledger rollover id
HTTP status code 200
Returns item with a given ID
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Rollover log",
"type": "object",
"properties": {
"ledgerRolloverId": {
"description": "Ledger fiscal year rollover UUID",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"ledgerId": {
"description": "Ledger UUID",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"startDate": {
"description": "This is \"createdDate\" from rollover metadata. ",
"type": "string",
"format": "date-time",
"readonly": true
},
"endDate": {
"description": "This is \"updatedDate\" from rollover metadata. Should be provided only when \"status\" is \"Success\" or \"Error\". ",
"type": "string",
"format": "date-time",
"readonly": true
},
"rolloverStatus": {
"description": "Final status of the rollover",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"javaType": "org.folio.rest.jaxrs.model.RolloverStatus",
"enum": [
"Not Started",
"In Progress",
"Error",
"Success"
],
"default": "Not Started"
},
"ledgerRolloverType": {
"description": "Type of rollover. Action Commit means run real rollover",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"javaName": "RolloverType",
"enum": [
"Preview",
"Commit",
"Rollback"
],
"javaEnums": [
{
"name": "PREVIEW",
"title": "Preview",
"description": "Run only budget and encumbrance rollover. Result will be not saved in real tables."
},
{
"name": "COMMIT",
"title": "Commit",
"description": "Run real for budgets, encumbrances and orders rollover. Result will be saved in real tables."
},
{
"name": "ROLLBACK",
"title": "Rollback",
"description": "Rollback budgets, encumbrances and orders rollover."
}
],
"default": "Commit"
}
},
"additionalProperties": false,
"required": [
"ledgerRolloverId",
"startDate",
"rolloverStatus",
"ledgerRolloverType"
]
}
Example:
{
"ledgerRolloverId": "56ac60b4-122d-1e1c-9acb-8293df12d16d",
"ledgerId": "12ac60b4-122d-1e1c-9acb-8293df12d161",
"startDate": "2022-01-01T00:00:00Z",
"endDate": "2022-01-01T00:10:12Z",
"rolloverStatus": "Success",
"ledgerRolloverType": "Commit"
}
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to get retrieve ledger-rollovers-log -- unauthorized
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
"ledger-rollovers-log not found"
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator