Skip to main content

GET allocation_history

List allocation run history with optional filters. Returns all runs (Active + Reversed) for audit trail purposes.

Endpoint

GET /api/method/konsol.api.allocation_history

Authentication: Required (Frappe session cookie)

Parameters

ParameterTypeRequiredDescription
fiscal_yearintegerNoFilter by fiscal year
fiscal_periodintegerNoFilter by fiscal period

Response

{
"message": {
"runs": [
{
"name": "ARUN-2025-P6-0002",
"allocation_run_id": "ARUN-2025-P6-0002",
"fiscal_year": 2025,
"fiscal_period": 6,
"status": "Active",
"run_by": "admin@example.com",
"run_at": "2025-06-09 15:00:00",
"reversal_of": "ARUN-2025-P6-0001"
},
{
"name": "ARUN-2025-P6-0001",
"allocation_run_id": "ARUN-2025-P6-0001",
"fiscal_year": 2025,
"fiscal_period": 6,
"status": "Reversed",
"run_by": "admin@example.com",
"run_at": "2025-06-09 14:30:00",
"reversal_of": null
}
]
}
}

Run Object

FieldTypeDescription
namestringFrappe document name
allocation_run_idstringRun identifier (set on submit)
fiscal_yearintegerFiscal year
fiscal_periodintegerFiscal period
statusstringDraft, Running, Active, or Reversed
run_bystringUser who executed the run
run_atstringExecution timestamp
reversal_ofstring/nullOriginal run name (if this is a reversal)

Examples

All runs

curl "http://localhost:8069/api/method/konsol.api.allocation_history" \
-b "cookies.txt"

Filtered by period

curl "http://localhost:8069/api/method/konsol.api.allocation_history?\
fiscal_year=2025&fiscal_period=6" \
-b "cookies.txt"

Runs are ordered by run_at descending (most recent first).

See also: run_allocation, reverse_allocation