Esta é uma API de cadastro de reservas DHCP do roteador.
Esta API é autenticada usando OAuth2, ver documentação de autenticação
router_id
/dhcp/hosts
API de listagem de reservas DHCP
GET /api/v1/cdm/routers/Az2fDNvAta9pSrr5en8Su/dhcp/hosts HTTP/1.1
Host: cdm.exemplo.com
Accept: application/json
Authorization: Bearer <Access-Token>
HTTP/1.1 200 OK
Content-Type: application/json
{
"total": 2,
"hosts": [
{
"id": "AiOfE4P3qeP7fRfyx75iA",
"name": "dhcphost01",
"mac": "01:02:03:04:05:06",
"ip": "10.5.0.127"
},
{
"id": "AwJf34P4qop7fsfSx700A",
"name": "dhcphost02",
"mac": "01:AC:03:14:05:00",
"ip": "10.5.0.10"
}
]
}
router_id
/dhcp/hosts/id
API de busca de uma reserva DHCP
GET /api/v1/cdm/routers/Az2fDNvAta9pSrr5en8Su/dhcp/hosts/Az2g33hnCce1mLEcPRhEF HTTP/1.1
Host: cdm.exemplo.com
Accept: application/json
Authorization: Bearer <Access-Token>
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "Az2g33hnCce1mLEcPRhEF",
"name": "dhcphost00",
"mac": "FF:12:04:44:AB:22",
"ip": "10.5.0.100"
}
router_id
/dhcp/hosts
API de criação de uma reserva DHCP
POST /api/v1/cdm/routers/Az2fDNvAta9pSrr5en8Su/dhcp/hosts HTTP/1.1
Host: cdm.exemplo.com
Content-Type: application/json
Accept: application/json
Authorization: Bearer <Access-Token>
{
"name": "dhcphost00",
"mac": "FF:12:04:44:AB:22",
"ip": "10.5.0.100"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "Az2g33hnCce1mLEcPRhEF",
"name": "dhcphost00",
"mac": "FF:12:04:44:AB:22",
"ip": "10.5.0.100"
}
router_id
/dhcp/hosts/id
API de atualização de uma reserva DHCP
PUT /api/v1/cdm/routers/Az2fDNvAta9pSrr5en8Su/dhcp/hosts/Az2g33hnCce1mLEcPRhEF HTTP/1.1
Host: cdm.exemplo.com
Content-Type: application/json
Accept: application/json
Authorization: Bearer <Access-Token>
{
"ip": "10.5.0.105"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "Az2g33hnCce1mLEcPRhEF",
"name": "dhcphost00",
"mac": "FF:12:04:44:AB:22",
"ip": "10.5.0.105"
}
router_id
/dhcp/hosts/id
API de remoção de uma reserva DHCP
DELETE /api/v1/cdm/routers/Az2fDNvAta9pSrr5en8Su/dhcp/hosts/Az2g33hnCce1mLEcPRhEF HTTP/1.1
Host: cdm.exemplo.com
Accept: application/json
Authorization: Bearer <Access-Token>
HTTP/1.1 200 OK
Content-Type: application/json