POST

Creating list of IPv4 objects

URL:

/api/v4/ipv4/

Request body:

{
    "ips": [{
        "oct1": <integer>,
        "oct2": <integer>,
        "oct3": <integer>,
        "oct4": <integer>,
        "networkipv4": <integer>,
        "description": <string>,
        "equipments": [
            {
                "equipment": {
                    "id": <integer>
                },
                "virtual_interface": {
                    "id": <integer>
                }
            }, ...
        ]
    },..]
}

Request Example with only required fields:

{
    "ips": [{
        "networkipv4": 10
    }]
}

Request Example with some more fields:

{
    "ips": [{
        "oct1": 10,
        "oct2": 10,
        "oct3": 0,
        "oct4": 20,
        "networkipv4": 2,
        "equipments": [
            {
                "equipment": {
                    "id": 1
                },
                "virtual_interface": {
                    "id": 1
                }
            },
            {
                "equipment": {
                    "id": 2
                }
            }
        ]
    }]
}

Through IPv4 POST route you can create one or more IPv4 objects. Only “networkipv4” field are required. You can specify other fields such as:

  • oct1, oct2, oct3, oct4 - Are the octets of IPv4. Given a network, API can provide to you an IPv4 Address automatically, but you can assign a IPv4 Address in a manually way. If you specify some octet, you need to specify all the others.
  • description - Description of new IPv4.
  • networkipv4 - This parameter is mandatory. It is the network to which new IP address will belong.
  • equipments - You can associate new IPv4 address to one or more equipments and with Virtual Interfaces together. In the association to Equipment it’s not mandatory to specify Virtual Interface.

At the end of POST request, it will be returned the identifiers of new IPv4 objects created.

Response Body:

[
    {
        "id": <integer>
    },...
]

Response Example for two IPv4 objects created:

[
    {
        "id": 10
    },
    {
        "id": 11
    }
]

URL Example:

/api/v4/ipv4/