Bulk Create Networks

This operation enables you to create several networks in a single request.

This operation requires a request body.

This operation returns a response body.

Specify a list of networks in the request body, as shown in the following example:

 

Example 4.9. Bulk Create Networks: JSON Request

POST v2.0/networks.json
Content-Type: application/json
Accept: application/json
{
    "networks": [
        {
            "admin_state_up": true,
            "name": "sample_network_1"
        },
        {
            "admin_state_up": false,
            "name": "sample_network_2"
        }
    ]
}

 

Example 4.10. Bulk Create Networks: JSON Response

HTTP/1.1 201 OK
Content-Type: application/json; charset=UTF-8
{
    "networks": [
        {
            "admin_state_up": true,
            "id": "e6031bc2-901a-4c66-82da-f4c32ed89406",
            "name": "sample_network_1",
            "shared": false,
            "status": "ACTIVE",
            "subnets": [],
            "tenant_id": "d19231fc08ec4bc4829b668040d34512"
        },
        {
            "admin_state_up": false,
            "id": "64239a54-dcc4-4b39-920b-b37c2144effa",
            "name": "sample_network_2",
            "shared": false,
            "status": "ACTIVE",
            "subnets": [],
            "tenant_id": "d19231fc08ec4bc4829b668040d34512"
        }
    ]
}

The bulk create operation is always atomic. Either all or no networks in the request body are created.

Log a bug against this page


loading table of contents...