/api/v2/ipv4networks/

Networks handler allows to perform the following operations:

  • get
  • create
  • update
  • delete

Action is defined by HTTP method used for request.

Gettings objects

Example:

Request:

GET /api/v2/ipv4networks/

Response:

[
  {
    "id": 2,
    "address": "192.168.1.0",
    "netmask": "255.255.255.0",
    "gateway": ""
  },
  {
    "id": 1,
    "address": "10.0.0.0",
    "netmask": "255.255.0.0",
    "gateway": "10.0.254.254"
  }
]

Create objects

Example:

Request:

POST /api/v2/ipv4networks/

{
  "address": "10.0.0.0",
  "netmask": "255.255.0.0",
  "gateway": "10.254.254.254"
}

Response:

HTTP/1.1 200 OK

{
  "id": 1,
  "address": "10.0.0.0",
  "netmask": "255.255.0.0",
  "gateway": "10.254.254.254"
}

Update objects

Example:

Request:

PUT /api/v2/ipv4networks/

{
  "id": 1,
  "address": "10.0.0.0",
  "netmask": "255.255.0.0",
  "gateway": "10.254.254.254"
}

Response:

HTTP/1.1 200 OK

{
  "address": "10.0.0.0",
  "netmask": "255.255.0.0",
  "gateway": "10.254.254.254"
}

Delete objects

Example:

Request:

DELETE /api/v2/ipv4networks/

{
  "id": 1
}

Response:

HTTP/1.1 200 OK

Table Of Contents

Previous topic

/api/v2/objects/

Next topic

Configuration

This Page