Topic Grid API
The topic grid uses two server-side endpoints to load category metadata for
releases and changesets. The frontend calls them with Request.postJSON,
using absolute Catalyst URLs instead of the old plugin handler path.
Endpoints¶
POST /topic-grid/category/getReleasesCategory¶
Returns all release categories together with reduced field metadata for each
category. When the current user does not have topic creation permission for a
given category, the releaseField value is an empty object.
Response
{
"error": 0,
"data": [
{
"_id": "...",
"id": "cat-1",
"name": "Release",
"releaseField": {
"field_id": {
"id_field": "field_id",
"name_field": "Field Name",
"key": "fieldlet.system.release",
"meta_type": "...",
"mandatory": 0,
"readonly": 0,
"hidden": 0
}
}
}
]
}
POST /topic-grid/category/getChangesetsCategory¶
Returns all changeset categories keyed by category id. For each category the
releaseField value is the release_field attribute of the
fieldlet.system.release fieldlet configured in the category form.
Response
{
"error": 0,
"data": {
"cat-2": {
"_id": "...",
"id": "cat-2",
"name": "Changeset",
"releaseField": "changesets"
}
}
}
Implementation¶
The endpoints are served by the Perl Catalyst controller
Baseliner::Controller::TopicGrid with business logic in
Baseliner::Model::TopicGrid.
The frontend store calls these endpoints with a leading / so they are routed
directly to Catalyst, bypassing the ClaJS plugin dispatch.