DBN Data Assets 2.0

Insight APIs

API-ready endpoints for approved internal applications, analytics workflows, dashboards, reporting tools and partner integrations.

Secure data access

Designed for controlled internal and partner use.

Controlled Access

Endpoints are available only to approved users and registered applications.

Analytics Ready

Return structured data for dashboards, reporting pipelines and BI tools.

Partner Integration

Support secure integration with approved DBN data partners.

Available Endpoints

Explore API Services

The following endpoints expose approved DBN Data Assets insight resources.

GET
Dashboard Metrics
/api/insights/metrics

Returns dashboard headline metrics filtered by tab, state, sector, MSME type and period.

GET
Dashboard Charts
/api/insights/charts

Returns chart data, labels, options and metadata for approved dashboard visualizations.

POST
Filtered Insights
/api/insights/filter

Accepts filter parameters and returns matching metrics and charts in a single response.

GET
Reference Data
/api/insights/reference

Returns states, sectors, MSME categories, tabs and other reference lists.

Integration Guide

How to Integrate with DBN Insight APIs

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.

01
Request API Access

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.

02
Register Application

Approved applications receive access credentials and permitted endpoint scopes.

03
Call Endpoints

Applications call the API using secure headers and approved query parameters.

04
Consume Insights

Responses can be used for dashboards, analytics workflows and internal reports.

05
Authentication

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.

Authentication

Bearer Token

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
                
API Endpoints

Base Url

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
Request Formats

Standard Request Format

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
                }
MSME Category Mapping
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
                }
Sample Filter Request

Example Filter Request

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
                        }
                    
                
Sample Response
{
  "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]
        }
      ]
    }
  ]
}
Error Handling

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.
Security Requirements
  • Do not expose API tokens in browser-side JavaScript.
  • Use HTTPS for all API calls.
  • Store credentials in server-side configuration or secure vaults.
  • Restrict access by approved application, user role, IP range or API scope.
  • Log request IDs and timestamps for audit purposes.
  • Do not cache sensitive responses longer than approved retention periods.
Recommended Integration Flow
  1. Request access from DBN data administrators.
  2. Receive approved credentials and endpoint scope.
  3. Call reference endpoints to load valid states, sectors and SME categories.
  4. Submit filter request to retrieve metrics and charts.
  5. Render metrics, charts or reports in the consuming application.
  6. Log response status and handle errors gracefully.