Inventory Device Name Diags
Retrieve and create diagnostic information for inventory device names.
Base URL: https://control.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Endpoints
GET /inventory_device_name_diags/
Retrieves diagnostic information for inventory device names. Optionally updates device status before returning data.
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | string | query | No | ID of the scheduled transaction |
| update_status | boolean | query | No | Use configured helpers to update device status before returning the information |
Example Request:
GET /api/v1/inventory_device_name_diags/?id=12345&update_status=true
Example Response:
{
"count": 2,
"results": [
{
"id": "12345",
"device_name": "switch-01",
"diagnostic_status": "healthy",
"last_updated": "2023-12-01T10:30:00Z",
"scheduled_transaction_id": "txn-456",
"network_connectivity": true,
"hardware_status": "operational",
"error_count": 0
},
{
"id": "12346",
"device_name": "router-02",
"diagnostic_status": "warning",
"last_updated": "2023-12-01T10:25:00Z",
"scheduled_transaction_id": "txn-457",
"network_connectivity": true,
"hardware_status": "operational",
"error_count": 3
}
]
}
| Status | Description |
|---|---|
| 200 | Success - diagnostic data retrieved |
| 401 | Unauthorized - invalid or missing token |
| 500 | Internal server error |
POST /inventory_device_name_diags/
Creates new diagnostic information for inventory device names.
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| data | string | body | Yes | Diagnostic data for the device |
Example Request:
POST /api/v1/inventory_device_name_diags/
Content-Type: application/json
{
"device_name": "firewall-03",
"scheduled_transaction_id": "txn-789",
"diagnostic_tests": [
"connectivity_check",
"hardware_status",
"configuration_validation"
],
"priority": "high"
}
Example Response:
{
"id": "12347",
"device_name": "firewall-03",
"scheduled_transaction_id": "txn-789",
"status": "pending",
"created_at": "2023-12-01T11:00:00Z",
"estimated_completion": "2023-12-01T11:15:00Z"
}
| Status | Description |
|---|---|
| 201 | Created - diagnostic request successfully created |
| 400 | Bad Request - invalid data format |
| 401 | Unauthorized - invalid or missing token |
| 500 | Internal server error |
Best Practices
- Use the
update_statusparameter sparingly as it may increase response time by actively polling devices - Filter results using the
idparameter when looking for specific scheduled transactions - Monitor diagnostic results regularly to maintain network health
- Batch diagnostic requests during maintenance windows to minimize network impact
- Include proper error handling for devices that may be offline during diagnostic runs
- Set appropriate timeouts when creating diagnostic requests for multiple devices