The IntelliNet Orchestrator API is a RESTful API built with FastAPI that provides comprehensive network service orchestration capabilities for telecommunication infrastructure.
Base URL: http://localhost:8000
API Documentation: http://localhost:8000/api/docs (Swagger UI)
Alternative Documentation: http://localhost:8000/api/redoc (ReDoc)
OpenAPI Schema: http://localhost:8000/api/openapi.json
The API uses JWT (JSON Web Token) based authentication. Include the token in the Authorization header for protected endpoints.
Endpoint: POST /api/auth/login
Request Body:
{
"username": "admin",
"password": "admin123"
}Response:
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "bearer",
"user": {
"username": "admin",
"role": "admin"
}
}Usage:
curl -X POST http://localhost:8000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"admin","password":"admin123"}'Include the token in subsequent requests:
curl -X GET http://localhost:8000/api/topology \
-H "Authorization: Bearer YOUR_TOKEN_HERE"Check if the API is running.
Authentication: Not required
Response:
{
"status": "healthy",
"service": "IntelliNet Orchestrator",
"version": "1.0.0"
}Create a new network device in the topology.
Authentication: Admin role required
Request Body:
{
"id": "DEVICE001",
"name": "Core Router 1",
"type": "MPLS",
"capacity": 100.0,
"location": "Data Center A",
"wavelengths": 80,
"is_olt": true
}Field Descriptions:
id(string, required): Unique device identifiername(string, required): Human-readable device nametype(string, required): Device type - one of:DWDM,OTN,SONET,MPLS,GPON_OLT,GPON_ONT,FTTHcapacity(number, required): Device capacity in Gbpslocation(string, optional): Physical locationwavelengths(integer, optional): Number of wavelengths (DWDM devices only)is_olt(boolean, optional): Whether device is OLT or ONT (GPON devices only)
Response (201 Created):
{
"success": true,
"message": "Device created successfully",
"data": {
"id": "DEVICE001",
"name": "Core Router 1",
"type": "MPLS"
}
}Error Response (409 Conflict):
{
"error": {
"code": "DEVICE_EXISTS",
"message": "Device with ID DEVICE001 already exists",
"details": {
"device_id": "DEVICE001"
}
}
}Example:
curl -X POST http://localhost:8000/api/topology/device \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "ROUTER01",
"name": "Core Router 1",
"type": "MPLS",
"capacity": 100.0,
"location": "NYC-DC1"
}'Create a link between two devices.
Authentication: Admin role required
Request Body:
{
"id": "LINK001",
"source_device_id": "DEVICE001",
"target_device_id": "DEVICE002",
"bandwidth": 10.0,
"type": "fiber",
"latency": 5.0
}Field Descriptions:
id(string, required): Unique link identifiersource_device_id(string, required): Source device IDtarget_device_id(string, required): Target device IDbandwidth(number, required): Link bandwidth in Gbpstype(string, required): Link type - one of:fiber,ethernet,wirelesslatency(number, optional): Link latency in milliseconds (default: 0.0)
Response (201 Created):
{
"success": true,
"message": "Link created successfully",
"data": {
"id": "LINK001",
"source": "DEVICE001",
"target": "DEVICE002"
}
}Example:
curl -X POST http://localhost:8000/api/topology/link \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "LINK01",
"source_device_id": "ROUTER01",
"target_device_id": "ROUTER02",
"bandwidth": 10.0,
"type": "fiber",
"latency": 2.5
}'Retrieve the complete network topology including all devices and links.
Authentication: User or Admin role required
Response (200 OK):
{
"devices": [
{
"id": "DEVICE001",
"name": "Core Router 1",
"type": "MPLS",
"capacity": 100.0,
"location": "Data Center A",
"status": "active",
"utilization": 0.0
}
],
"links": [
{
"id": "LINK001",
"source": "DEVICE001",
"target": "DEVICE002",
"bandwidth": 10.0,
"type": "fiber",
"latency": 5.0,
"utilization": 0.0,
"status": "active"
}
]
}Example:
curl -X GET http://localhost:8000/api/topology \
-H "Authorization: Bearer YOUR_TOKEN"Retrieve a specific device by ID.
Authentication: User or Admin role required
Path Parameters:
device_id(string): Device identifier
Response (200 OK):
{
"id": "DEVICE001",
"name": "Core Router 1",
"type": "MPLS",
"capacity": 100.0,
"location": "Data Center A",
"status": "active",
"utilization": 0.0
}Example:
curl -X GET http://localhost:8000/api/topology/device/ROUTER01 \
-H "Authorization: Bearer YOUR_TOKEN"Delete a device and all its associated links.
Authentication: Admin role required
Path Parameters:
device_id(string): Device identifier
Response (200 OK):
{
"success": true,
"message": "Device deleted successfully",
"data": {
"id": "DEVICE001"
}
}Example:
curl -X DELETE http://localhost:8000/api/topology/device/ROUTER01 \
-H "Authorization: Bearer YOUR_TOKEN"Provision a new network service.
Authentication: User or Admin role required
Request Body:
{
"id": "SERVICE001",
"service_type": "MPLS_VPN",
"source_device_id": "DEVICE001",
"target_device_id": "DEVICE002",
"bandwidth": 5.0,
"latency_requirement": 10.0
}Field Descriptions:
id(string, required): Unique service identifierservice_type(string, required): Service type - one of:MPLS_VPN,OTN_CIRCUIT,GPON_ACCESS,FTTH_SERVICEsource_device_id(string, required): Source device IDtarget_device_id(string, required): Target device IDbandwidth(number, required): Required bandwidth in Gbpslatency_requirement(number, optional): Maximum acceptable latency in milliseconds
Response (200 OK):
{
"success": true,
"message": "Service SERVICE001 provisioned successfully",
"data": {
"service_id": "SERVICE001",
"status": "active",
"path": ["DEVICE001", "DEVICE002"]
}
}Error Response (400 Bad Request):
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed: BW001: Bandwidth Capacity Check",
"details": {
"violations": ["BW001: Bandwidth Capacity Check"],
"requested_bandwidth": 50.0,
"available_capacity": 30.0
}
}
}Example:
curl -X POST http://localhost:8000/api/service/provision \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "VPN001",
"service_type": "MPLS_VPN",
"source_device_id": "ROUTER01",
"target_device_id": "ROUTER02",
"bandwidth": 5.0,
"latency_requirement": 10.0
}'Retrieve a specific service by ID.
Authentication: User or Admin role required
Path Parameters:
service_id(string): Service identifier
Response (200 OK):
{
"id": "SERVICE001",
"service_type": "MPLS_VPN",
"source": "DEVICE001",
"target": "DEVICE002",
"bandwidth": 5.0,
"latency_requirement": 10.0,
"status": "active",
"path": ["DEVICE001", "DEVICE002"]
}Example:
curl -X GET http://localhost:8000/api/service/VPN001 \
-H "Authorization: Bearer YOUR_TOKEN"Decommission an active service.
Authentication: User or Admin role required
Path Parameters:
service_id(string): Service identifier
Response (200 OK):
{
"success": true,
"message": "Service decommissioned successfully",
"data": {
"service_id": "SERVICE001"
}
}Example:
curl -X DELETE http://localhost:8000/api/service/VPN001 \
-H "Authorization: Bearer YOUR_TOKEN"Get aggregated network status and metrics.
Authentication: User or Admin role required
Response (200 OK):
{
"total_devices": 10,
"active_devices": 9,
"total_links": 15,
"active_services": 5,
"average_utilization": 45.5,
"network_health": "healthy"
}Example:
curl -X GET http://localhost:8000/api/analytics/status \
-H "Authorization: Bearer YOUR_TOKEN"Get historical metrics for a specific device.
Authentication: User or Admin role required
Path Parameters:
device_id(string): Device identifier
Query Parameters:
limit(integer, optional): Maximum number of records to return (default: 100)
Response (200 OK):
{
"device_id": "DEVICE001",
"metrics": [
{
"timestamp": "2025-11-12T10:30:00Z",
"utilization": 45.5,
"status": "active"
}
]
}Example:
curl -X GET "http://localhost:8000/api/analytics/device/ROUTER01/metrics?limit=50" \
-H "Authorization: Bearer YOUR_TOKEN"Find the optimal path between two devices considering utilization and latency.
Authentication: User or Admin role required
Path Parameters:
source(string): Source device IDtarget(string): Target device ID
Response (200 OK):
{
"source": "DEVICE001",
"target": "DEVICE002",
"path": ["DEVICE001", "DEVICE003", "DEVICE002"],
"total_latency": 15.5,
"average_utilization": 35.2,
"path_quality": "optimal"
}Example:
curl -X GET http://localhost:8000/api/optimization/path/ROUTER01/ROUTER05 \
-H "Authorization: Bearer YOUR_TOKEN"All error responses follow a consistent format:
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": {
"additional": "context"
}
}
}| Code | HTTP Status | Description |
|---|---|---|
VALIDATION_ERROR |
400 | Request validation failed |
INVALID_DEVICE_TYPE |
400 | Invalid device type specified |
INVALID_LINK_TYPE |
400 | Invalid link type specified |
UNAUTHORIZED |
401 | Authentication required |
FORBIDDEN |
403 | Insufficient permissions |
DEVICE_NOT_FOUND |
404 | Device not found |
SERVICE_NOT_FOUND |
404 | Service not found |
PATH_NOT_FOUND |
404 | No path found between devices |
DEVICE_EXISTS |
409 | Device already exists |
DATABASE_ERROR |
500 | Database operation failed |
INTERNAL_ERROR |
500 | Unexpected server error |
Currently, no rate limiting is implemented. This may be added in future versions.
The API is currently at version 1.0.0. Future versions will maintain backward compatibility or provide migration paths.
For issues or questions:
- Check the interactive API documentation at
/api/docs - Review the developer guide in the repository
- Open an issue on the project repository