API — Grant¶
The HTTP surface of projects, budgets, allocations and exchange rates. ProjectController owns
the project record that every other module reads; MasterBudgetController and
BudgetLinesController own the planned-versus-actual budget; AllocationsController spreads a
salary across budget lines for a month.
See Grant module.
84 actions across 5 controllers
Routing, the permission model, response kinds and error behaviour are described
once in the API Overview. Unless a row says otherwise the route is
/{Controller}/{Action}, id is a GUID string, and a Details page is a
full View while Manage* / Create fragments are PartialViews loaded into a modal.
ProjectController¶
Donor-funded projects: the project record, places, donors, programmes, extensions, month details and per-project access.
Source: NKO.Main/NKO.Main/Controllers/ProjectController.cs · route prefix: /Project · 22 actions
| Route | Verb | Parameters | Permission | Returns |
|---|---|---|---|---|
/ |
GET | string id |
Project |
PartialView |
/ |
POST | Project |
Project |
PartialView / JSON |
/ |
GET | string id |
Project |
View |
/ |
GET | — | Project |
View |
/ |
POST | Project model, List<, List<, List<, List< |
Project |
View / Redirect |
/ |
GET | string id, int? file |
Purchase |
PartialView |
/ |
POST | string id, string Description, int File |
Purchase |
PartialView / JSON |
/ |
GET | string id, int? Redir |
Project |
PartialView / Redirect |
/ |
POST | Project model, int? Redir |
Project |
PartialView / JSON |
/ |
GET | string id |
Human |
PartialView / Redirect |
/ |
POST | Archive |
Human |
JSON |
/ |
GET | string id, int? ext |
Project |
View / Redirect |
/ |
GET | string id, int? ext |
Project |
View / Redirect |
/ |
POST | Project model, List<, List<, List<, List< |
Project |
View / Redirect |
/ |
GET | int? id |
Project |
PartialView / Redirect |
/ |
POST | Project |
Project |
PartialView / JSON |
/ |
GET | string id |
Project |
PartialView |
/ |
POST | Project |
Project |
PartialView / JSON |
/ |
GET | — | Project |
View |
/ |
POST | int month, int year |
Project |
Redirect |
/ |
GET | int? Status, int? Year, int? page, string project, int? donor, int? program, string sort, int? status, int? year |
Project |
View |
/ |
POST | int id |
Purchase |
JSON |
MasterBudgetController¶
The Master Budget, its detail lines and the generated monthly breakdown, plus the allocation-cost forecast.
Source: NKO.Main/NKO.Main/Controllers/MasterBudgetController.cs · route prefix: /MasterBudget · 23 actions · 1 ungated
| Route | Verb | Parameters | Permission | Returns |
|---|---|---|---|---|
/ |
GET | string sort, string current, string hidden, int? page |
Master |
View |
/ |
GET | string id, int? project, bool? export |
Master |
View |
/ |
GET | — | Master |
View |
/ |
POST | Master |
Master |
View / Redirect |
/ |
GET | string id |
Master |
PartialView |
/ |
POST | Master |
Master |
PartialView / JSON |
/ |
GET | string id |
Master |
PartialView |
/ |
POST | Master |
Master |
PartialView / JSON |
/ |
GET | string id, int? page |
Master |
View |
/ |
GET | — | — open | File |
/ |
GET | string id |
Master |
PartialView |
/ |
POST | Master |
Master |
PartialView / JSON |
/ |
GET | string id |
Master |
PartialView |
/ |
POST | Master |
Master |
PartialView / JSON |
/ |
GET | string id |
Master |
PartialView |
/ |
POST | Master |
Master |
PartialView / JSON |
/ |
GET | string id |
Master |
Redirect |
/ |
GET | string sort, string current, string hidden, int? page |
Master |
View |
/ |
GET | string search |
General |
JSON |
/ |
GET | string id |
Master |
PartialView |
/ |
POST | IForm, string master |
Master |
JSON |
/ |
GET | int? type, int? page |
Master |
View |
/ |
GET | string id, int? page |
Master |
View |
BudgetLinesController¶
Actual budget lines, procurement budget lines, employee coverage and the budget consumption report.
Source: NKO.Main/NKO.Main/Controllers/BudgetLinesController.cs · route prefix: /BudgetLines · 18 actions · 1 ungated
| Route | Verb | Parameters | Permission | Returns |
|---|---|---|---|---|
/ |
GET | string id |
Budget |
View |
/ |
POST | Proc |
Budget |
View / Redirect |
/ |
GET | string id |
Budget |
PartialView / Redirect |
/ |
POST | Proc |
Budget |
PartialView / JSON |
/ |
GET | string id, int? ext |
Budget |
View |
/ |
GET | — | — open | File |
/ |
GET | string id |
Budget |
View / Redirect |
/ |
POST | Proc |
Budget |
View / Redirect |
/ |
GET | int? month, int? year, int? page, int? country, int? department, int? employee, string sort, int? min, int? max, int? level |
Budget |
View |
/ |
GET | int? project, int? category, string code, string page |
Budget |
Redirect |
/ |
GET | int? month, int? year, int? page, int? country, int? department, int? employee, string sort, int? min, int? max, int? level |
Budget |
View |
/ |
GET | int id |
General |
JSON |
/ |
GET | string search, int id |
General |
JSON |
/ |
GET | string search, int id |
General |
JSON |
/ |
GET | int? project |
Budget |
PartialView |
/ |
POST | Import, IForm |
Budget |
JSON |
/ |
GET | int? type, int? Project, string sort, int? Cat, string code, int? page |
Budget |
View |
/ |
GET | string id, string sort, string code, int? page |
Budget |
View |
AllocationsController¶
Salary allocation of an employee across project budget lines for a given month.
Source: NKO.Main/NKO.Main/Controllers/AllocationsController.cs · route prefix: /Allocations · 13 actions
| Route | Verb | Parameters | Permission | Returns |
|---|---|---|---|---|
/ |
GET | string id, string msg |
Allocations |
View |
/ |
POST | Employee, int year, int month, int user |
Allocations |
Redirect |
/ |
GET | — | Allocations |
View |
/ |
POST | Allocations |
Allocations |
View / Redirect |
/ |
GET | int id |
Allocations |
PartialView / Redirect |
/ |
POST | Allocations |
Allocations |
PartialView / Redirect |
/ |
GET | int id, int? ext |
Allocations |
View |
/ |
GET | int id |
Allocations |
View |
/ |
POST | Allocations |
Allocations |
View / Redirect |
/ |
GET | string search, int id |
Allocations |
JSON |
/ |
GET | int? page |
Allocations |
View |
/ |
GET | — | Allocations |
View |
/ |
POST | Salary |
Allocations |
View |
ExchangeRateController¶
The global exchange-rate row and the per-donor rate tables.
Source: NKO.Main/NKO.Main/Controllers/ExchangeRateController.cs · route prefix: /ExchangeRate · 8 actions
| Route | Verb | Parameters | Permission | Returns |
|---|---|---|---|---|
/ |
GET | int donor |
Exchange |
View |
/ |
POST | Donor |
Exchange |
View / JSON |
/ |
GET | int id |
Exchange |
View |
/ |
POST | Donor |
Exchange |
View / JSON |
/ |
GET | int id |
Exchange |
View |
/ |
POST | Donor |
Exchange |
View / JSON |
/ |
GET | string id, int? page |
Exchange |
View |
/ |
GET | int? type, int? page |
Exchange |
View |
Related¶
- Grant module
- Finance database
- API Overview — routing, auth, responses and error behaviour.