API Overview & Authentication
NexFlux provides a robust RESTful API and real-time MQTT / WebSocket interfaces to interact with projects, telemetry data, and remote lab rigs.
Base URLs
| Environment | Base URL |
|---|---|
| Production | https://api.nexflux.io/api/v1 |
| Sandbox / Staging | https://staging-api.nexflux.io/api/v1 |
| Local Development | http://localhost:8005/api/v1 |
Authentication Schemes
All private endpoints require a JSON Web Token (JWT) provided in the HTTP Authorization header:
http
Authorization: Bearer <your_jwt_token>Generating an API Token
- Go to Dashboard → Settings → API Keys.
- Click Generate New Key.
- Select permissions (e.g.
devices:read,telemetry:write,projects:manage).
Sample Request
bash
curl -X GET ,[object Object], \
-H ,[object Object], \
-H ,[object Object],Sample Response (JSON)
json
[object Object],
,[object Object],[object Object], ,[object Object],[object Object],
,[object Object],[object Object], ,[object Object],
,[object Object],
,[object Object],[object Object], ,[object Object],[object Object],
,[object Object],[object Object], ,[object Object],[object Object],
,[object Object],[object Object], ,[object Object],[object Object],
,[object Object],[object Object], ,[object Object],[object Object],
,[object Object],[object Object], ,[object Object],
,[object Object],
,[object Object],
,[object Object],Standard HTTP Status Codes
200 OK— Request completed successfully.201 Created— Resource successfully created.400 Bad Request— Invalid JSON body or missing required fields.401 Unauthorized— Missing or expired Bearer token.403 Forbidden— Insufficient role permissions.404 Not Found— Resource does not exist.429 Too Many Requests— Rate limit threshold reached.