This document provides comprehensive documentation for all available factory endpoints in the Ghana Ministry of Education Performance Management and Data Visualization (PMDV) Dashboard API.
Base URL: baseURL (Development) or https://yourdomain.com:5001 (Production)
Content-Type: application/json
Retrieves teacher attendance rate data aggregated by term and week number. Data includes attendance rates, absent days per teacher, and present days.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
source |
string | No | - | Location type filter. Options: R (Region), D (District), S (School) |
sourceCode |
string | No | - | Code of the location (region_id, district_id, or school_id) |
academicYear |
string | No | 2024/2025 |
Academic year in format YYYY/YYYY |
type |
string | No | - | Additional type filter (currently unused) |
Get all attendance rates for default academic year:
curl -X GET "baseURL/api/attendance_rate"
Get attendance rates for a specific region:
curl -X GET "baseURL/api/attendance_rate?source=R&sourceCode=01"
Get attendance rates for a specific district:
curl -X GET "baseURL/api/attendance_rate?source=D&sourceCode=0101&academicYear=2024/2025"
{
"successful": true,
"data": {
"term0": [
{
"term": "0",
"week_number": 1,
"school_session_days": 5,
"teachers_present": 45,
"teachers_absent": 5,
"total_number_absent_days": 12,
"total_number_present_days": 225,
"academic_year": "2024/2025",
"average_number_of_absent_days_per_teacher": 2.4,
"attendance_rate": 94.94
}
],
"term1": [],
"term2": [],
"term3": []
}
}
Retrieves location data (regions or districts) from the database. Used to populate location dropdowns and filters.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
source |
string | Yes | - | Location type. Options: R (Regions), D (Districts) |
sourceCode |
string | No | - | Region code (required when source is D to filter districts by region) |
Get all regions:
curl -X GET "baseURL/api/locations?source=R"
Get all districts:
curl -X GET "baseURL/api/locations?source=D"
Get districts for a specific region:
curl -X GET "baseURL/api/locations?source=D&sourceCode=01"
Regions Response:
{
"successful": true,
"data": [
{
"id": 1,
"emis_region_code": "01",
"name": "Greater Accra",
"status": "A",
"type": "R"
}
]
}
Retrieves National Standardized Test (NST) scores aggregated by subject (Mathematics and English). Includes performance levels (below basic, basic, proficient, advanced) broken down by public/private and gender.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
source |
string | No | - | Location type filter. Options: R (Region), D (District), S (School) |
sourceCode |
string | No | - | Code of the location (region_code or district_code) |
academicYear |
string | No | 2024/2025 |
Academic year in format YYYY/YYYY |
type |
string | No | - | Additional type filter (currently unused) |
curl -X GET "baseURL/api/nst_scores?source=R&sourceCode=01"
{
"successful": true,
"data": {
"math": {
"math_below_basic": 1500,
"math_total_students": 7000,
...
},
"english": {
"english_below_basic": 1800,
"english_total_students": 7000,
...
}
}
}
Retrieves statistics about schools by education level and institution status (public/private). Counts schools for different levels: creche/nursery, kindergarten, primary, JHS, SHS, and TVET.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
source |
string | No | - | Location type filter. Options: R (Region), D (District) |
sourceCode |
string | No | - | Code of the location (zero-padded) |
academicYear |
string | No | 2024 |
Academic year (currently unused) |
curl -X GET "baseURL/api/emis_schools_stats?source=R&sourceCode=01"
{
"successful": true,
"data": {
"creche_nursery_private_count": 50,
"creche_nursery_public_count": 30,
"kg_private_count": 120,
"kg_public_count": 200,
...
}
}
The NASIA endpoint is used to insert data into MongoDB. GET requests are not supported and will return an error.
| Parameter | Type | Required | Description |
|---|---|---|---|
collections |
object/array | Yes | Data object or array to insert into MongoDB |
agencyCode |
string | Yes | Agency code identifier |
token |
string | No | Authentication token |
curl -X POST "baseURL/api/nasia" \
-H "Content-Type: application/json" \
-d '{
"collections": {"field1": "value1"},
"agencyCode": "AGENCY001"
}'
Retrieves a list of schools with their basic information including EMIS codes, names, and location codes.
| Parameter | Type | Required | Description |
|---|---|---|---|
source |
string | No | Location type. Options: R (Region), D (District), ESC (EMIS School Code) |
sourceCode |
string | No | Code of the location |
curl -X GET "baseURL/api/schools?source=D&sourceCode=0101"
{
"successful": true,
"data": [
{
"id": 1,
"emis_region_code": "01",
"emis_district_code": "0101",
"name": "Accra Senior High School",
"emis_school_code": "010101001",
"type": "S"
}
]
}
Retrieves comprehensive enrollment rate data including GER, NER, NAR, GAR, Completion Rate, and GPI.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
source |
string | No | - | Location type. Options: R (Region), D (District) |
sourceCode |
string | No | - | Location code (zero-padded) |
academicYear |
string | No | 2024 |
Academic year |
curl -X GET "baseURL/api/enrollment_rates?source=R&sourceCode=01&academicYear=2024"
{
"successful": true,
"data": [
{
"class": "Primary 1",
"sector": "Public",
"GER_Male": 95.5,
"GER_Female": 93.2,
"NER_Total": 87.2,
"GPI": 0.976
}
]
}
{
"successful": false,
"error": {
"code": "DB_ACCESS_ERROR_CODE",
"message": "Database access error message"
}
}
{
"message": "Unsupported HTTP method"
}
YYYY/YYYY format (e.g., "2024/2025"). For enrollment rates and schools stats: YYYY format (e.g., "2024").| Endpoint | Method | Description | Location Filter | Academic Year |
|---|---|---|---|---|
/api/attendance_rate |
GET | Teacher attendance rates | Yes (R/D) | Yes |
/api/locations |
GET | Regions and districts | Required (R/D) | No |
/api/nst_scores |
GET | NST test scores | Yes (R/D) | Yes |
/api/emis_schools_stats |
GET | School statistics by level | Yes (R/D) | No |
/api/nasia |
POST | Insert data to MongoDB | No | No |
/api/schools |
GET | List of schools | Yes (R/D/ESC) | No |
/api/enrollment_rates |
GET | Enrollment rate metrics | Yes (R/D) | Yes |
Legend: R = Region, D = District, ESC = EMIS School Code
Document Version: 1.0
Last Updated: 2024
Author: PMDV Development Team