Skip to main content

Inventory Device Ipping

Retrieve IP configuration details for specific inventory devices.

Base URL: https://control.zequenze.com/api/v1

Authentication: All endpoints require a Bearer token:

Authorization: Bearer <your-api-token>

Endpoints

GET /inventory_device_ipping/{id}/

Retrieves the IP configuration and addressing information for a specific inventory device.

Parameters:

Parameter Type In Required Description
id integer path Yes Unique identifier of the device

Example Request:

GET /api/v1/inventory_device_ipping/123/
Authorization: Bearer your-api-token-here

Example Response:

{
  "id": 123,
  "device_id": 456,
  "device_name": "web-server-01",
  "ip_addresses": [
    {
      "address": "192.168.1.100",
      "subnet_mask": "255.255.255.0",
      "network": "192.168.1.0/24",
      "interface": "eth0",
      "type": "static",
      "primary": true
    },
    {
      "address": "10.0.0.50",
      "subnet_mask": "255.255.0.0",
      "network": "10.0.0.0/16",
      "interface": "eth1",
      "type": "dhcp",
      "primary": false
    }
  ],
  "dns_servers": [
    "8.8.8.8",
    "8.8.4.4"
  ],
  "default_gateway": "192.168.1.1",
  "hostname": "web-server-01.example.com",
  "mac_addresses": [
    {
      "interface": "eth0",
      "address": "00:1B:44:11:3A:B7"
    },
    {
      "interface": "eth1",
      "address": "00:1B:44:11:3A:B8"
    }
  ],
  "last_updated": "2024-01-15T10:30:00Z"
}
Status Description
200 Successfully retrieved device IP configuration
401 Unauthorized - Invalid or missing API token
404 Device not found
500 Internal server error

Best Practices

  • Device Identification: Ensure you have the correct device ID before making requests
  • Error Handling: Always check for 404 responses when the device ID doesn't exist
  • Rate Limiting: Implement appropriate delays between requests to avoid hitting API limits
  • Data Freshness: Check the last_updated timestamp to determine if the IP configuration data is current
  • Network Planning: Use the network and subnet information for IP address management and conflict detection