Create Network

Verb URI Description
POST /networks Creates a network.

Normal Response Code: 201

Error Response Codes: Bad Request (400) Unauthorized (401)

This operation does not require a request body. If specified, the body might include one or more of the following attributes:

  • name: a string specifying a symbolic name for the network, which is not required to be unique;

  • admin_state_up: a bool value specifying the administrative status of the network;

  • shared: a bool value specifying whether this network should be shared across all tenants or not. Note that the default policy setting restrict usage of this attribute to administrative users only;

  • tenant_id: a uuid identifying the tenant which will own the network. Only administrative users can set the tenant identifier; this cannot be changed using authorization policies;

 

Example 4.7. Create Network: JSON Request

POST v2.0/networks.json
Content-Type: application/json
Accept: application/json
{
 "network":
  {
    "name": "sample_network", 
    "admin_state_up": true
  }
}

 

Example 4.8. Create Network: JSON Response

'status': '201'
'content-length': '194'
'content-type': 'application/json;

{
    "network": {
        "admin_state_up": true,
        "id": "850d3f2c-f0a5-4f8b-b1cf-5836fc0be940",
        "name": "sample_network",
        "shared": false,
        "status": "ACTIVE",
        "subnets": [],
        "tenant_id": "f667b69e4d6749749ef3bcba7251d9ce"
    }
}

Log a bug against this page


loading table of contents...