Developer Hub

Corestream API Engine

Connect your state-wide clinical databases, asynchronous learning applications, or IoT telemetry nodes directly to the Corestream cloud infrastructure.

Authentication

The Corestream API uses Bearer Tokens to authorize all API requests. You can generate tokens inside your administrator profile dashboard. All requests must utilize HTTPS, carrying the header credentials below:

Authorization: Bearer YOUR_SECRET_API_TOKEN

POST Telemetry Event

Upload IoT sensor parameters or temperature check logs dynamically.

POST /api/v1/telemetry

Request Parameters:

  • node_id (string, required)

    Unique identifier of the sending telemetry sensor hardware.

  • reading (float, required)

    Numeric reading logs gathered at edge checkpoints (e.g. moisture level, temperature).

curl -X POST https://corestream.ng/api/v1/telemetry \
  -H "Authorization: Bearer SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "node_id": "sensor_08_plateau",
    "reading": 24.85
  }'
fetch('https://corestream.ng/api/v1/telemetry', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer SECRET_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    node_id: "sensor_08_plateau",
    reading: 24.85
  })
}).then(res => res.json());
import requests

url = "https://corestream.ng/api/v1/telemetry"
headers = {
    "Authorization": "Bearer SECRET_KEY",
    "Content-Type": "application/json"
}
data = {
    "node_id": "sensor_08_plateau",
    "reading": 24.85
}
res = requests.post(url, json=data, headers=headers)
<?php
use Illuminate\Support\Facades\Http;

$response = Http::withToken('SECRET_KEY')
    ->post('https://corestream.ng/api/v1/telemetry', [
        'node_id' => 'sensor_08_plateau',
        'reading' => 24.85
    ]);

POST Create Patient (CoreHealth)

Register clinic patients securely in the regional EHR cloud ledger.

POST /api/v1/patients

Request Parameters:

  • name (string, required)

    Full name of the clinic patient.

  • medical_id (string, required)

    State-issued health insurance code or unique medical record index.

curl -X POST https://corestream.ng/api/v1/patients \
  -H "Authorization: Bearer SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Ibrahim Adamu",
    "medical_id": "NHIS-9824-A"
  }'
fetch('https://corestream.ng/api/v1/patients', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer SECRET_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: "Ibrahim Adamu",
    medical_id: "NHIS-9824-A"
  })
}).then(res => res.json());
import requests

url = "https://corestream.ng/api/v1/patients"
headers = {
    "Authorization": "Bearer SECRET_KEY",
    "Content-Type": "application/json"
}
data = {
    "name": "Ibrahim Adamu",
    "medical_id": "NHIS-9824-A"
}
res = requests.post(url, json=data, headers=headers)
<?php
use Illuminate\Support\Facades\Http;

$response = Http::withToken('SECRET_KEY')
    ->post('https://corestream.ng/api/v1/patients', [
        'name' => 'Ibrahim Adamu',
        'medical_id' => 'NHIS-9824-A'
    ]);