The Type-One Report API (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/AllianceBioversityCIAT/onecgiar_pr/llms.txt
Use this file to discover all available pages before exploring further.
/type-one-report) is the PMU consolidated report surface in PRMS. It aggregates initiative-level fact sheets and key result stories from all submitted results per reporting phase, and provides primary impact area data for portfolio-level narrative generation. Access requires a valid PRMS JWT — this surface is not open to unauthenticated consumers.
Auth header
PRMS uses a customauth header for JWT tokens, not Authorization: Bearer. Pass the JWT as:
auth header on each response for rolling sessions. Your client should pick up and store the refreshed token from the response header.
Mount point
Type-One Report is mounted at the top level, not under/api/:
main.routes.ts — the route sits outside ModulesRoutes and has its JWT middleware binding applied separately in app.module.ts. Do not expect it to appear under /api/type-one-report.
Who uses Type-One Reports
PMU (Portfolio Management Unit) leads access Type-One Reports to get a consolidated view of all submitted results and initiative-level summaries for a given reporting phase. The API backing this requires PMU-level role (
RoleEnum.LEAD or higher on RoleTypeEnum.APPLICATION).- Initiative fact sheets — structured summaries per initiative, combining result counts, ToC alignment, and cross-cutting marker scores.
- Key result stories — curated narrative outputs per initiative for a specific phase, used in portfolio-level reporting documents.
- Primary impact area analysis — a nested sub-module at
/type-one-report/primary/that provides impact area breakdowns for PMU-level reporting views.
Endpoints
Fact sheet by initiative
initId. The fact sheet aggregates result-level data from all submitted results linked to the initiative for the current phase.
Path parameters
| Parameter | Type | Description |
|---|---|---|
initId | number | Internal initiative id in PRMS. |
ResponseInterceptor:
Key result story by initiative
| Parameter | Type | Description |
|---|---|---|
initId | number | Internal initiative id in PRMS. |
| Parameter | Type | Required | Description |
|---|---|---|---|
phase | number | Yes | Reporting phase id. Results are scoped to this phase. |
Primary impact area sub-module
primary/ sub-module (PrimaryImpactAreaModule) provides impact area breakdown data for Type-One Report views. It is mounted as a child route at /type-one-report/primary/. Consult the primary-impact-area.controller.ts for the specific endpoints within this sub-module.
Phased access
Type-One Reports are generated per reporting phase. Key behaviors:- The
phasequery parameter on/key-result-storyscopes the response to a specific reporting phase. - Results are only included in Type-One Report views once they reach
status_id = 3(Submitted). Results inEditingorQuality Assessedstatus are not reflected. - PMU leads typically access Type-One Reports after the submission window for a phase has closed.
Phase ids in PRMS are numeric. The human-readable phase year (e.g.
2025) maps to an internal phase/version id. Use the /api/versioning/* endpoints to look up phase ids if you are building an integration that needs to be phase-aware.BI integration
The Type-One Report surface integrates with theresult-dashboard-bi module at /result-dashboard-bi/*. PMU users accessing the Type-One Report section in the PRMS UI see embedded BI views (Power BI or similar) alongside the structured fact sheet and key result story data. The BI embed layer requires its own credentials and is managed separately from the Type-One Report API.
Accessing Type-One Reports in PRMS
As a PMU user, Type-One Reports are available through the PRMS web interface:- Log in to PRMS with a PMU-level account.
- Navigate to the Type-One Report section in the main navigation.
- Select the reporting phase and initiative to view the consolidated report.
- The API endpoints documented here back the data layer of these views. Direct API access requires a valid
authJWT with PMU-level role.
Response envelope
Unlike the Bilateral and Platform Report surfaces (which return raw data), Type-One Report endpoints use@UseInterceptors(ResponseInterceptor). All responses are wrapped in the PRMS standard envelope:
The actual payload — fact sheet data, key result story content, or impact area breakdown.
HTTP status code of the operation.
Human-readable status message.
ISO 8601 timestamp of the response.
The request path that produced this response.
Error handling
Errors follow the PRMSHttpExceptionFilter format — same envelope shape with a non-2xx statusCode. Common error scenarios:
| Status | Cause |
|---|---|
401 | Missing or expired auth JWT. |
403 | Valid JWT but insufficient role (PMU-level access required). |
404 | Initiative id or phase not found. |
500 | Report generation failure — check phase id validity and initiative data completeness. |