API Reference

Base URL: https://aic-backend-87872864140.africa-south1.run.app/api/v1

Open Interactive Docs ↗
All protected endpoints require Authorization: Bearer <token> in the request header. Obtain a token from POST /auth/login.

Authentication

POST/auth/register

Register a new user account

{ "email": "...", "password": "...", "full_name": "..." }
POST/auth/login

Obtain a JWT access token

{ "email": "...", "password": "..." }
GET/auth/profile🔒 Auth required

Return the current authenticated user's profile

Countries & Indicators

GET/countries

List all 54 African countries

GET/indicators

List all tracked economic indicators

GET/macro-data

Query time-series data by country + indicator

Datasets

GET/datasets

Paginated list of uploaded datasets

POST/datasets/upload

Upload a CSV/Excel/Parquet dataset

GET/datasets/{id}

Dataset detail with column profiles

POST/datasets/{id}/profile

Trigger column profiling job

DELETE/datasets/{id}

Delete a dataset

Data Connectors

GET/connectors

List all registered data source connectors

GET/connectors/{id}/health

Live health check for a connector

POST/connectors/{id}/sync

Trigger a manual data sync

GET/connectors/{id}/sync/history

Sync job history

Health Monitoring

GET/health/sources

Aggregate health for all data sources

GET/health/sources/{id}

Health detail for a single source

AI Research (RAG)

POST/rag/query

Ask a natural language question; returns an AI answer with source citations

{ "query": "...", "history": [] }

Semantic Search

GET/search/semantic?q=poverty+headcount&limit=10

Natural language search over all indicators and datasets

SDG Analytics

GET/sdg/goals

List all 17 SDG goals with matched indicators from the AIC database

GET/sdg/data?goal=1&country=NGA

Time-series data for a specific SDG goal, optionally filtered by country

Surveys & Schedules

GET/surveys

List household survey datasets

GET/schedules

List connector sync schedules