API-ready endpoints for approved internal applications, analytics workflows, dashboards, reporting tools and partner integrations.
Designed for controlled internal and partner use.
Endpoints are available only to approved users and registered applications.
Return structured data for dashboards, reporting pipelines and BI tools.
Support secure integration with approved DBN data partners.
The following endpoints expose approved DBN Data Assets insight resources.
/api/insights/metrics
Returns dashboard headline metrics filtered by tab, state, sector, MSME type and period.
/api/insights/charts
Returns chart data, labels, options and metadata for approved dashboard visualizations.
/api/insights/filter
Accepts filter parameters and returns matching metrics and charts in a single response.
/api/insights/reference
Returns states, sectors, MSME categories, tabs and other reference lists.
This guide describes the recommended process for approved internal applications, analytics workflows, BI dashboards and partner systems to connect securely to the DBN Data Assets 2.0 Insight APIs.
Internal teams or partners submit access requirements and intended use case. Access to the Insight APIs is restricted to approved applications and authorized users. Each consuming system must submit its use case, expected data scope, contact person and environment details before credentials are issued.
Approved applications receive access credentials and permitted endpoint scopes.
Applications call the API using secure headers and approved query parameters.
Responses can be used for dashboards, analytics workflows and internal reports.
Each request must include a valid bearer token or approved API key issued by DBN. Tokens should be stored securely and must never be exposed in client-side code.
Each request must include a valid bearer token or approved API key issued by DBN. Tokens should be stored securely and must never be exposed in client-side code.
Authorization: Bearer {access_token}
Content-Type: application/json
Accept: application/json
Use the production base URL for approved integrations. Test environments should use a separate staging URL where available.
Production:
https://devbankng.com
Sample endpoint:
GET /api/insights/metrics
Filtered endpoints accept state, sector, MSME category, year, period and quarter parameters. Empty arrays mean no filtering should be applied for that dimension.
{
"tabKey": "msmes",
"subTabKey": "states",
"stateIds": [25],
"sectorIds": [],
"smeId": 1,
"year": 2017,
"period": "Y",
"quarter": 0
}
| SME ID | Category | Description |
|---|---|---|
| 0 | All MSMEs | Returns aggregated Micro, Small and Medium enterprise data. |
| 1 | Micro | Returns Micro SME metrics and charts only. |
| 2 | Small | Returns Small SME metrics and charts only. |
| 3 | Medium | Returns Medium SME metrics and charts only. |
{
"tabKey": "msmes",
"subTabKey": "states",
"stateIds": [25],
"sectorIds": [],
"smeId": 1,
"year": 2017,
"period": "Y",
"quarter": 0
}
Applications may request filtered insights by state, sector, MSME category and reporting period.
POST /api/insights/filter
Content-Type: application/json
Authorization: Bearer {token}
Content-Type: application/json
{
"tabKey": "msmes",
"subTabKey": "states",
"stateIds": [25],
"sectorIds": [1],
"smeId": 1,
"year": 2017,
"period": "Y",
"quarter": 0
}
{
"success": true,
"message": "Insight data returned successfully.",
"metrics": [
{
"id": 5,
"title": "Total Micro Enterprises",
"value": "8.4M",
"subTitle": "Filtered by selected state",
"iconClass": "bi bi-shop",
"bgClass": "bg-navy"
}
],
"charts": [
{
"id": 18,
"chartNumber": 18,
"chartDomId": "msme_state_micro_distribution",
"title": "Distribution of Micro SME in Lagos State",
"chartType": "bar",
"source": "DBN Data Assets",
"labels": ["Lagos"],
"data": [
{
"name": "Micro SME Distribution",
"data": [8400000]
}
]
}
]
}
API consumers should handle validation errors, authentication failures, empty results and server-side errors gracefully.
| Status Code | Meaning | Recommended Action |
|---|---|---|
| 200 | Success | Process the returned metrics and charts. |
| 400 | Invalid request | Check request body, filter values and required fields. |
| 401 | Unauthorized | Refresh token or request valid API credentials. |
| 403 | Forbidden | Confirm that the application is approved for the endpoint. |
| 404 | Resource not found | Confirm the endpoint path and requested resource. |
| 500 | Server error | Retry later and contact DBN support if the issue persists. |