User Tools

Site Tools


api:networkmanagement:device:create

API : Network Device Create

Introduction

This request will create a network device on a given customer.

Request

URL https://api.telecomx.dk/network/device
Method POST
Access level MANAGER or OWNER if user belongs to the customer.
RESELLER if customer belongs to the reseller or a sub reseller.
ADMIN.
Property Type Description
Body name String Name of device
model Id Id of network device
customer Id Customer the device belongs to
macAddress String MAC address
serialNumber String Serial number
mvnoAccount Id MVNO account that it is linked to. Used when the router is uplinked through a SIM-card.
notes String Free text note field.
wifi Object WiFi settings - set to null if not used.
wifi.enabled Boolean True if wifi is enabled on 2.4GHz.
wifi.ssid String SSID of the 2.4GHz network.
wifi.password String Password of the 2.4GHz network.
wifi.enabled5G Boolean True if wifi is enabled on 5GHz.
wifi.ssid5G String SSID of the 5Hz network.
wifi.password5G String Password of the 5GHz network.
wifi.enabled6G Boolean True if wifi is enabled on 6GHz.
wifi.ssid6G String SSID of the 6GHz network.
wifi.password6G String Password of the 6GHz network.
wifi.bandsteering Boolean True to enable bandsteering (all bands have same SSID and clients will move freely between bands.
dhcp Object DHCP settings - set to null if not used.
dhcp.enable Boolean True to enable DHCP.
dhcp.ipPoolStart String First IP address to assign to DHCP clients.
dhcp.ipPoolEnd String Last IP address to assign to DHCP clients.
dhcp.leaseTime Number Number of minutes DHCP leases last.
dhcp.primaryDnsServer String IP address of DNS server clients shall use.
dhcp.reservedClients[] Array List of DHCP clients with reservations.
dhcp.reservedClients[].mac String MAC address of the client.
dhcp.reservedClients[].ip String IP address to assign to the client.
dhcp.reservedClients[].enable String True if reservation is active.
dhcp.reservedClients[].id String Optional id of the reservation, as assigned by the device.

Query examples

{
  "name": "Johns router",
  "model": "12345678901234567890AAAA",
  "customer": "12345678901234567890CCCC",
  "macAddress": "123456789012",
  "serialNumber": "484t563tyehfcu38hcnb4",
  "mvnoAccount": "12345678901234567890DDDD",
  "notes": "Note about device",
  "wifi": {
    "enabled": true,
    "ssid": "SkyNet",
    "password": "JohnConner",
    "enabled5G": true,
    "ssid5G": "Need4Speed",
    "password5G": "SarahConner",
    "enabled6G": false,
    "ssid6G": null,
    "password6G": null
    "bandsteering": false
  },
  "dhcp": {
    "enable": true,
    "ipPoolStart": "192.168.0.100",
    "ipPoolEnd": "192.168.0.200",
    "leaseTime": 10,
    "primaryDnsServer": "8.8.8.8",
    "reservedClients": [
      {
        "mac": "123456789013",
        "ip": "192.168.0.10",
        "enable": true,
        "id": "r8jf84fv"
      }
    ]
  }
}

Response

Property Type Description
_id Id Unique id of the device.
state String Which state the device is in: ACTIVE, PROVISIONING, DELETING.
name String Name of device
model Id Id of network device
modelType String Model type
modelBrand String Brand name
modelDescription String Description of model
modelPicture Id Id of picture of the device model, on the image servers.
customer Id Customer the device belongs to
macAddress String MAC address
serialNumber String Serial number
mvnoAccount Id MVNO account that it is linked to. Used when the router is uplinked through a SIM-card.
jobs Number Number of provisioning jobs currently in progress.
notes String Free text note field.
wifi Object WiFi settings - set to null if not used.
wifi.enabled Boolean True if wifi is enabled on 2.4GHz.
wifi.ssid String SSID of the 2.4GHz network.
wifi.password String Password of the 2.4GHz network.
wifi.enabled5G Boolean True if wifi is enabled on 5GHz.
wifi.ssid5G String SSID of the 5Hz network.
wifi.password5G String Password of the 5GHz network.
wifi.enabled6G Boolean True if wifi is enabled on 6GHz.
wifi.ssid6G String SSID of the 6GHz network.
wifi.password6G String Password of the 6GHz network.
wifi.bandsteering Boolean True to enable bandsteering (all bands have same SSID and clients will move freely between bands.
dhcp Object DHCP settings - set to null if not used.
dhcp.enable Boolean True to enable DHCP.
dhcp.ipPoolStart String First IP address to assign to DHCP clients.
dhcp.ipPoolEnd String Last IP address to assign to DHCP clients.
dhcp.leaseTime Number Number of minutes DHCP leases last.
dhcp.primaryDnsServer String IP address of DNS server clients shall use.
dhcp.reservedClients[] Array List of DHCP clients with reservations.
dhcp.reservedClients[].mac String MAC address of the client.
dhcp.reservedClients[].ip String IP address to assign to the client.
dhcp.reservedClients[].enable String True if reservation is active.
dhcp.reservedClients[].id String Optional id of the reservation, as assigned by the device.
status Object Status info (read only)
status.provisioned Boolean True if the device is provisioned.
status.lastComm Date Timestamp of the last time this device was communicated with, either directly or through a third-party service
status.online Boolean True if the device is online.
status.lanIp String LAN IP address.
status.subnetMask String Subnet mask.
status.gateway String Default gateway IP address.
status.wanIp String WAN IP address.
status.publicIp String Public IP address (may differ from WAN).
status.upTime Number Number of seconds the device has been running.
status.dns String IP address of primary DNS server.
status.dns2 String IP address of secondary DNS server.
status.ipv6 String IPv6 address, if available.
status.ipv6Dns String IPv6 primary DNS server.
status.ipv6Dns2 String Ipv6 secondary DNS server.
status.simStatus String SIM status (mobile router): 1 = ready, 2 = pin_verified, 3 = pin_lock, 4 = puk_lock, 5 = blocked, 6 = no_sim, 7 = unknown
status.networkType String Type of network connection (mobile router only): 1 = none, 2 = gsm, 4 = wcdma, 8 = lte, 16 = lte_plus, 32 = nr
status.signalStrength Number 4G signal strength (mobile router only) - 0-100
status.ssSingnalStrength Number 5G signal strength (mobile router only) - 0-100
status.uplinkRate Number Uplink speed in Kbps.
status.downlinkRate Number Downlink speed in Kbps.
status.connectionTime Number Number of seconds device has been connected to the mobile network (mobile router only).

Note that properties holding no value may be omitted from the object.

Example

{
  "_id": "1234567890123457890ABCD",
  "state": "ACTIVE",
  "name": "Johns router",
  "model": "12345678901234567890AAAA",
  "modelType": "ROUTER",
  "modelBrand": "TP-LINK",
  "modelDescription": "5G router with 2.4/5GHz wifi and 3 ethernet ports",
  "modelPicture": "12345678901234567890BBBB",
  "customer": "12345678901234567890CCCC",
  "macAddress": "123456789012",
  "serialNumber": "484t563tyehfcu38hcnb4",
  "mvnoAccount": "12345678901234567890DDDD",
  "jobs": 0,
  "notes": "Note about device",
  "wifi": {
    "enabled": true,
    "ssid": "SkyNet",
    "password": "JohnConner",
    "enabled5G": true,
    "ssid5G": "Need4Speed",
    "password5G": "SarahConner",
    "enabled6G": false,
    "ssid6G": null,
    "password6G": null
    "bandsteering": false
  },
  "dhcp": {
    "enable": true,
    "ipPoolStart": "192.168.0.100",
    "ipPoolEnd": "192.168.0.200",
    "leaseTime": 10,
    "primaryDnsServer": "8.8.8.8",
    "reservedClients": [
      {
        "mac": "123456789013",
        "ip": "192.168.0.10",
        "enable": true,
        "id": "r8jf84fv"
      }
    ]
  },
  "status": {
    "provisioned": true,
    "lastComm": "2025-01-01T00:00:00.000Z",
    "online": true,
    "lanIp": "192.168.0.1",
    "subnetMask": "255.255.255.0",
    "gateway": "100.64.0.1",
    "wanIp": "100.64.0.123",
    "publicIp": "62.192.163.232",
    "upTime": 123456,
    "dns": "8.8.8.8",
    "dns2": "1.1.1.1",
    "ipv6": "",
    "ipv6Dns": "",
    "ipv6Dns2": "",
    "simStatus": "1",
    "networkType": "32",
    "signalStrength": 0,
    "ssSingnalStrength": 50,
    "uplinkRate": 1234,
    "downlinkRate": 5432,
    "connectionTime": 1234567
  }
}

Errors

Error code Message Description
409 type Value is not one of the permitted values.
403 access_denied Insufficient access level
404 customer Customer not found
422 macAddress MAC address is already in use.
500 internal_error <Unspecified>
api/networkmanagement/device/create.txt · Last modified: 2025/10/16 02:45 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki