Appearance
User - OLT/ONU
Base URL:
https://your-domain.com
Admin endpoints for managing OLT devices and ONU information. All endpoints require admin/staff authentication.
Fetch All OLTs
Retrieve all OLT devices configured in the system.
| Property | Value |
|---|---|
| Endpoint | Fetch All OLTs |
| Method | GET |
| URL | /api/v1/olts |
| Authentication | Bearer Token |
Request Headers:
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer your-auth-token | Yes |
Request Body: None
Success Response (200 OK):
json
{
"success": true,
"data": [
{
"id": 1,
"name": "OLT-Main",
"ip_address": "192.168.1.1",
"type": "huawei",
"status": "online",
"onu_count": 150,
"last_sync": "2024-01-15 10:30:00"
}
]
}Error Response (401 Unauthorized):
json
{
"success": false,
"message": "Unauthenticated"
}Get OLT By Id
Retrieve details of a specific OLT device.
| Property | Value |
|---|---|
| Endpoint | Get OLT By Id |
| Method | GET |
| URL | /api/v1/olts/{id} |
| Authentication | Bearer Token |
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | OLT ID |
Success Response (200 OK):
json
{
"success": true,
"data": {
"id": 1,
"name": "OLT-Main",
"ip_address": "192.168.1.1",
"port": 23,
"username": "admin",
"type": "huawei",
"status": "online",
"onu_count": 150,
"created_at": "2024-01-01 00:00:00"
}
}Error Response (404 Not Found):
json
{
"success": false,
"message": "OLT not found"
}Test OLT Connection
Test connectivity to an OLT device.
| Property | Value |
|---|---|
| Endpoint | Test OLT Connection |
| Method | POST |
| URL | /api/v1/olts/{id}/test-connection |
| Authentication | Bearer Token |
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | OLT ID |
Request Body: None
Success Response (200 OK):
json
{
"success": true,
"message": "Connection successful",
"data": {
"latency_ms": 25,
"status": "online"
}
}Error Response (500 Server Error):
json
{
"success": false,
"message": "Connection failed: Timeout"
}Discover ONUs On OLT
Discover and sync ONUs connected to an OLT.
| Property | Value |
|---|---|
| Endpoint | Discover ONUs |
| Method | POST |
| URL | /api/v1/olts/{id}/discover-onus |
| Authentication | Bearer Token |
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | OLT ID |
Success Response (200 OK):
json
{
"success": true,
"message": "Discovery completed",
"data": {
"total_onus": 150,
"new_onus": 5,
"updated_onus": 145
}
}Fetch All ONUs
Retrieve all ONUs with optional pagination.
| Property | Value |
|---|---|
| Endpoint | Fetch All ONUs |
| Method | GET |
| URL | /api/v1/onus |
| Authentication | Bearer Token |
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
per_page | integer | No | Results per page (default: 50) |
olt_id | integer | No | Filter by OLT |
status | string | No | Filter by status (online, offline, critical) |
Success Response (200 OK):
json
{
"success": true,
"data": {
"onus": [
{
"id": 1,
"serial_number": "HWTC12345678",
"olt_id": 1,
"subscriber_id": 1,
"subscriber_name": "John Doe",
"rx_power": -18.5,
"tx_power": 2.1,
"status": "online",
"last_seen": "2024-01-15 10:30:00"
}
],
"total": 150
}
}Fetch Critical ONUs
Retrieve ONUs with critical signal levels or issues.
| Property | Value |
|---|---|
| Endpoint | Fetch Critical ONUs |
| Method | GET |
| URL | /api/v1/onus/critical |
| Authentication | Bearer Token |
Success Response (200 OK):
json
{
"success": true,
"data": [
{
"id": 5,
"serial_number": "HWTC87654321",
"subscriber_name": "Jane Doe",
"rx_power": -28.5,
"issue": "Low RX Power",
"status": "critical"
}
]
}Get ONU By Id
Retrieve details of a specific ONU.
| Property | Value |
|---|---|
| Endpoint | Get ONU By Id |
| Method | GET |
| URL | /api/v1/onus/{id} |
| Authentication | Bearer Token |
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | ONU ID |
Success Response (200 OK):
json
{
"success": true,
"data": {
"id": 1,
"serial_number": "HWTC12345678",
"olt_id": 1,
"olt_name": "OLT-Main",
"subscriber_id": 1,
"subscriber_name": "John Doe",
"rx_power": -18.5,
"tx_power": 2.1,
"temperature": 45,
"voltage": 3.3,
"status": "online",
"uptime": "15 days",
"last_seen": "2024-01-15 10:30:00"
}
}Get ONU Signal History
Retrieve signal history for an ONU over a specified time period.
| Property | Value |
|---|---|
| Endpoint | Get ONU Signal History |
| Method | GET |
| URL | /api/v1/onus/{id}/signal-history |
| Authentication | Bearer Token |
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | ONU ID |
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
hours | integer | No | Hours of history (default: 24) |
Success Response (200 OK):
json
{
"success": true,
"data": [
{
"timestamp": "2024-01-15 10:00:00",
"rx_power": -18.5,
"tx_power": 2.1
},
{
"timestamp": "2024-01-15 09:00:00",
"rx_power": -18.3,
"tx_power": 2.0
}
]
}Refresh ONU Metrics
Refresh metrics for a single ONU.
| Property | Value |
|---|---|
| Endpoint | Refresh ONU Metrics |
| Method | POST |
| URL | /api/v1/onus/{id}/refresh-metrics |
| Authentication | Bearer Token |
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | ONU ID |
Success Response (200 OK):
json
{
"success": true,
"message": "Metrics refreshed",
"data": {
"rx_power": -18.5,
"tx_power": 2.1,
"status": "online"
}
}Bulk Refresh ONU Metrics
Refresh metrics for multiple ONUs at once.
| Property | Value |
|---|---|
| Endpoint | Bulk Refresh ONU Metrics |
| Method | POST |
| URL | /api/v1/onus/bulk-refresh |
| Authentication | Bearer Token |
Request Headers:
| Header | Value | Required |
|---|---|---|
Content-Type | application/json | Yes |
Accept | application/json | Yes |
Authorization | Bearer your-auth-token | Yes |
Request Body:
json
{
"onu_ids": [1, 2, 3]
}| Parameter | Type | Required | Description |
|---|---|---|---|
onu_ids | array | Yes | Array of ONU IDs to refresh |
Success Response (200 OK):
json
{
"success": true,
"message": "Bulk refresh completed",
"data": {
"refreshed": 3,
"failed": 0
}
}