How the class pipeline reaches this dashboard
The job chain each student builds in Control-M
Database
Query extract
File Transfer
Move the export
Transform
Shape the records
REST API
ingestData
Dashboard
Live refresh
Endpoints
POST only. Both paths answer the same way.
Load a batch
POST https://your-app-url/functions/ingestData
Alias: POST https://your-app-url/api/ingestData
Verify a batch
POST https://your-app-url/functions/ingestStatus
Alias: POST https://your-app-url/api/ingestStatus
Headers
Every call needs both
Content-Type: application/json
Required. The body must be a JSON object.
x-api-key: your ingest key
Set by the instructor in the app secrets as INGEST_API_KEY. The key is never shown in this app or in any log. If it is not set, every call is rejected.
Limits
500 records and 1 MB per call. Body fields batch_id and submitted_by: letters, numbers, underscore or hyphen, up to 40 characters.
Sample request bodies
Valid payloads for each dataset. Download one and post it with the job.
{
"dataset": "sales",
"batch_id": "QDV_SALES_001",
"submitted_by": "QDV",
"records": [
{
"sale_id": "S-100001",
"sale_date": "2026-11-20",
"country_code": "TW",
"category": "HP Servers",
"product_id": "HPE-DL380G11",
"product_name": "HPE ProLiant DL380 Gen11",
"quantity": 4,
"revenue": 5200,
"cost": 3380,
"channel": "Online",
"salesperson": "A. Tan"
},
{
"sale_id": "S-100002",
"sale_date": "2026-11-20",
"country_code": "SG",
"category": "Switches Hubs & Cabling",
"product_id": "SWC-ARU6100-48",
"product_name": "Aruba 6100 48G Switch",
"quantity": 10,
"revenue": 3100,
"cost": 2015,
"channel": "Reseller",
"salesperson": "J. Lim"
}
]
}| Field | Type | Req | Rule |
|---|---|---|---|
| sale_id | string | Yes | Unique per submitted_by. Re-sending updates the row. |
| sale_date | date | Yes | YYYY-MM-DD |
| country_code | enum | Yes | TW, ID, VN, TH, MY, PH, SG |
| category | enum | Yes | HP Servers, Dell Servers, Network Devices, Firewalls, Server Racks, Switches Hubs & Cabling, UPS & Power |
| product_id | string | Yes | Product code |
| product_name | string | No | Display name |
| quantity | number | Yes | 0 or more |
| revenue | number | Yes | USD, 0 or more |
| cost | number | Yes | USD, 0 or more |
| channel | enum | Yes | Reseller, System Integrator, Enterprise, Online |
| salesperson | string | Yes | Free text |
Windows curl job
Store the key in an environment variable, never in the job body
curl.exe --fail-with-body -X POST "https://your-app-url/functions/ingestData" ^
-H "Content-Type: application/json" ^
-H "x-api-key: %ORBIT_API_KEY%" ^
--data-binary "@C:\temp\sales.json"curl --fail-with-body -X POST "https://your-app-url/functions/ingestData" \
-H "Content-Type: application/json" \
-H "x-api-key: $ORBIT_API_KEY" \
--data-binary "@./sales.json"Set the variable once on the machine that runs the job: setx ORBIT_API_KEY "your-ingest-key" on Windows, then use %ORBIT_API_KEY% in the command. --fail-with-body makes Control-M mark the job as failed when the API returns 4xx or 5xx.
Responses
Errors are explicit so a job fails clearly
200 success
{
"success": true,
"batch_id": "QDV_SALES_001",
"dataset": "sales",
"received": 2,
"inserted": 2,
"updated": 0,
"rejected": 0
}400 validation
{
"success": false,
"error": "Validation failed. No records were saved.",
"details": [
{
"record": 2,
"field": "country_code",
"reason": "must be one of TW, ID, VN, TH, MY, PH, SG"
}
]
}- 401: missing or wrong x-api-key, or the key secret is not set.
- 400: any invalid record, or a repeated key inside the batch. Nothing is saved.
- 405: wrong HTTP method. 413: body over 1 MB. 500: the write failed, so re-send the same batch.
Verification job
Call ingestStatus after ingestData to prove the batch landed
curl.exe --fail-with-body -X POST "https://your-app-url/functions/ingestStatus" ^
-H "Content-Type: application/json" ^
-H "x-api-key: %ORBIT_API_KEY%" ^
-d "{\"batch_id\":\"QDV_SALES_001\"}"The response repeats the batch result: received, inserted, updated, rejected and status. Re-sending the same batch is safe: rows are matched on their key and updated instead of duplicated.
Ready to test from this browser?