Developer API Reference

Welcome to the CubeSat.gr Developer Hub. This API lets researchers, students, and ground operators access and integrate digital-twin satellite models into external applications.

List your CubeSat designs, fetch their full subsystem structures, and stream real-time simulated telemetry - altitude, velocity, thermal status, and battery cycles - calculated dynamically by our physics simulator.

Sandbox Environment

All endpoints return JSON and require an active API key. Telemetry is simulated based on your satellite's weight, battery capacity, solar arrays, and orbital parameters.

Authentication

Generate your key inside your dashboard under API Settings. Pass it as a query parameter or HTTP header:

Option 1: Query Parameter

https://cubesat.gr/api/missions.php?api_key=YOUR_API_KEY

Option 2: HTTP Header (Recommended)

HTTP Request Headers
GET /api/missions.php HTTP/1.1
Host: cubesat.gr
X-API-Key: YOUR_API_KEY

Rate Limits

All API keys have a daily request quota. Limits reset at midnight (server time).

TierDaily LimitNotes
Developer (Default) 100 / day Full access to all simulator endpoints.
Academic / Upgraded Custom (500 – 10,000 / day) Higher throughput for continuous polling.

Exceeding your quota returns HTTP 429 Too Many Requests:

HTTP 429 Payload
{
  "success": false,
  "error": "API rate limit exceeded. Your current daily quota is 100 requests."
}
API Endpoints
GET /api/missions.php List all your saved CubeSat missions
GET https://cubesat.gr/api/missions.php?api_key=YOUR_API_KEY

Retrieve a complete index of all CubeSat designs and missions saved under your developer account.

Parameters

ParameterTypeStatusDescription
api_key string Required Your developer key (omit if using X-API-Key header).

Response Example

200 OK
{
  "success": true,
  "missions": [
    {
      "id": 15,
      "name": "Helios-1 LEO Mission",
      "created_at": "2026-05-18 14:20:11",
      "updated_at": "2026-05-19 18:05:00"
    }
  ]
}
GET /api/mission.php Fetch full subsystem layout for one mission
GET https://cubesat.gr/api/mission.php?id=<id>&api_key=YOUR_API_KEY

Retrieve the full configuration and subsystem layout for a mission by its numeric ID. Only returns missions owned by your API key.

Parameters

ParameterTypeStatusDescription
id integer Required Unique numeric ID of the mission.
api_key string Required Your developer token.

Response Example

200 OK
{
  "success": true,
  "id": 15,
  "name": "Helios-1 LEO Mission",
  "configuration": {
    "subsystems": {
      "structure": { "type": "3U", "material": "Aluminum-6061" },
      "power": { "battery_capacity_wh": 40, "solar_panels": "Deployable GaAs" },
      "obc": { "processor": "ARM Cortex-M7", "rtos": "FreeRTOS" }
    },
    "orbit": { "altitude": 550, "inclination": 97.6 }
  }
}
GET /api/telemetry.php Stream simulated real-time orbital telemetry
GET https://cubesat.gr/api/telemetry.php?mission_id=<mission_id>&api_key=YOUR_API_KEY

Returns dynamic telemetry computed from your satellite's specs - updated on every request relative to the current epoch. Returns orbital coordinates, velocity, battery state, temperature, and comms link margin.

Parameters

ParameterTypeStatusDescription
mission_id integer Required Numeric ID of the target mission.
api_key string Required Your developer token.

Response Example

200 OK
{
  "success": true,
  "mission_id": 15,
  "mission_name": "Helios-1 LEO Mission",
  "status": "sunlight",
  "telemetry": {
    "latitude": 34.052234,
    "longitude": -118.243684,
    "altitude_km": 542.45,
    "velocity_kms": 7.5912,
    "battery_charge_percent": 92.4,
    "temperature_celsius": 22.8
  }
}

Integration Examples

Ready-to-run code samples to connect your application to the CubeSat.gr API.

Polls the telemetry endpoint every 3 seconds and prints a live ground-station readout.

telemetry_poller.py
# pip install requests
import requests, time, os

API_KEY = "YOUR_API_KEY"
MISSION_ID = 15  # Replace with your mission ID
API_URL = "https://cubesat.gr/api/telemetry.php"

while True:
    try:
        res = requests.get(API_URL, params={"api_key": API_KEY, "mission_id": MISSION_ID})
        if res.status_code == 200 and res.json()["success"]:
            d, tel = res.json(), res.json()["telemetry"]
            os.system('cls' if os.name == 'nt' else 'clear')
            print(f"Mission: {d['mission_name']} | {d['status'].upper()}")
            print(f"Pos:  {tel['latitude']}° lat  {tel['longitude']}° lon")
            print(f"Alt:  {tel['altitude_km']} km   Vel: {tel['velocity_kms']} km/s")
            print(f"Bat:  {tel['battery_charge_percent']}%   Temp: {tel['temperature_celsius']} C")
        elif res.status_code == 429: print("Rate limit exceeded.")
    except Exception as e: print(f"Error: {e}")
    time.sleep(3)

Quick shell commands to test your key and retrieve data.

List Missions
# Using HTTP header
curl -H "X-API-Key: YOUR_API_KEY" https://cubesat.gr/api/missions.php
Fetch Telemetry
# Replace 15 with your mission ID
curl "https://cubesat.gr/api/telemetry.php?mission_id=15&api_key=YOUR_API_KEY"