Website Reports Server

API Documentation & Interactive Examples

POST /api/report/

Create Report

Create a new report generation job

📤 Sample Request:
{ "data_to_include": [ "attendance", "behavior" ], "dataset": "bq_dataset_name", "meta": { "creator_name": "Test Testerson", "date_created": "2024-01-15" }, "org_id": 123, "student_primary_identifier": "STU001", "year": 2024 }
📥 Sample Response:
{ "job_id": "uuid-here", "message": "Report generation started", "status": "Pending" }
POST /api/multi-student-report/

Create Multi-Student Report

Create a new multi-student report generation job for multiple students at once

📤 Sample Request:
{ "payload": { "data_to_include": [ "attendance", "behavior" ], "dataset": "bq_dataset_name", "meta": { "creator_name": "Test Testerson", "date_created": "2024-01-15" }, "org_id": 123, "students": [ { "attendance": { "absences": 3, "absences_by_month": [ { "absences": 0, "month": "Jun" } ], "absences_last_3_years": [ { "absences": 3, "grade_level": "K", "grade_level_average": 13.7, "school_year": "24-25" } ], "attendance_rate": 98.28, "display": true }, "basic_information": { "first_name": "Ryan", "full_name": "Allen, Ryan", "grade_level": "K", "school_name": "Aborn Elem.", "school_year": 2025, "state_student_id": "1029358348" }, "behavior": { "display": true, "incidents": 3, "incidents_by_category": [ { "category": "(2497) Other obscene behavior^", "incidents": 1 } ], "incidents_last_3_years": [ { "grade_level": "12th Grade", "grade_level_average": 1.4, "incidents": 2, "school_year": "24-25" } ], "suspensions": 3 } }, { "attendance": { "absences": 1, "absences_by_month": [ { "absences": 1, "month": "Feb" } ], "absences_last_3_years": [ { "absences": 1, "grade_level": "1st", "grade_level_average": 13.7, "school_year": "24-25" } ], "attendance_rate": 99.5, "display": true }, "basic_information": { "first_name": "Sarah", "full_name": "Johnson, Sarah", "grade_level": "1st", "school_name": "Aborn Elem.", "school_year": 2025, "state_student_id": "1029358349" }, "behavior": { "display": true, "incidents": 1, "incidents_by_category": [ { "category": "(3340) Possession of tobacco^", "incidents": 1 } ], "incidents_last_3_years": [ { "grade_level": "11th Grade", "grade_level_average": 1.4, "incidents": 1, "school_year": "23-24" } ], "suspensions": 1 } } ], "year": 2024 } }
📥 Sample Response:
{ "job_id": "uuid-here", "message": "Multi-Student Report generation started", "status": "Pending" }
GET /api/job/{job_id}

Get Job Status

Get the status of a report generation job

📤 Sample Request:
No request body required
📥 Sample Response:
{ "created_at": "2024-01-15T10:30:00.000Z", "creator_name": "Test Testerson", "data_to_include": [ "attendance", "behavior" ], "dataset": "bq_dataset_name", "date_created": "2024-01-15", "file_name": "orgid||student_psid||pdf-file-uuid-here.pdf", "job_id": "uuid-here", "org_id": 123, "payload": { "payload": "data here" }, "status": "Completed", "student_primary_identifier": "STU001", "updated_at": "2024-01-15T10:30:00.000Z", "year": 2024 }
GET /api/reports/{org_id}/{student_primary_identifier}

List Student Reports

Get all reports for a specific student

📤 Sample Request:
No request body required
📥 Sample Response:
{ "count": 1, "reports": [ { "created_at": "2024-01-15T10:30:00.000Z", "creator_name": "Test Testerson", "data_to_include": [ "attendance", "behavior" ], "dataset": "bq_dataset_name", "date_created": "2024-01-15", "file_name": "orgid||student_psid||pdf-file-uuid-here.pdf", "job_id": "uuid-here", "org_id": 123, "payload": { "payload": "data here" }, "status": "Completed", "student_primary_identifier": "STU001", "updated_at": "2024-01-15T10:30:00.000Z", "year": 2024 } ] }
POST /api/job/delete

Delete Job

Delete a job by its parameters

📤 Sample Request:
{ "date_created": "2024-01-15T10:30:00Z", "job_id": "uuid-here", "org_id": 1, "primary_student_identifier": "student123", "school_year": 2024 }
📥 Sample Response:
{ "deleted_job_id": "uuid-here", "message": "Job deleted successfully", "success": true }
POST /upload-template

Upload Template

Upload a template to Carbone and return the template ID

📤 Sample Request:
No request body required
📥 Sample Response:
{ "message": "Template uploaded successfully", "success": true, "template_id": "template-id-here" }
GET /health

Health Check

Health check endpoint for cloud deployment

📤 Sample Request:
No request body required
📥 Sample Response:
{ "checks": { "carbone": "template ok (1234 bytes)", "mongodb": "connected", "redis": "connected", "spaces": "connected" }, "status": "healthy" }