| Verb | URI | Description | |||
| POST | /tenants/tenant-id/networks |
Creates a new logical
layer-2 network for the tenant
identified by
tenant-id. |
|||
Normal Response Code(s): 200
Error Response Code(s): BadRequest (400) Unauthorized (401), Forbidden (403)
This operation creates a Layer-2 network in Quantum based on the information provided in the request body.
Quantum validates the request, and dispatches it to the plugin, and then returns the unique identifier of the network to the caller. Although the network API entity can be immediately used for other operations, this does not guarantee that the network will be available when the API call returns, as this depends on the particular plugin implementation.
If the validation phase fails, the network object is not created at all, and a 400 error is returned to the caller.
![]() | Note |
|---|---|
The Quantum API v1.0 does not provide an interface for checking the progress of asynchronous operations performed by plugins. This will be addressed in future releases of the Quantum API. |
The body for this request must contain a Network object specifying a symbolic name for the network.
Example 4.9. Create Network Request/Response (XML)
Request:
POST /tenants/XYZ/networks.xml
<network
name="test_create_network"/>
Response:
<network
id="158233b0-ca9a-40b4-8614-54a4a99d47d1"/>
Example 4.10. Create Network Request/Response (JSON)
Request:
POST /tenants/XYZ/networks.json
{
"network":
{
"name": "test_create_network"
}
}
Response:
{
"network":
{
"id": "158233b0-ca9a-40b4-8614-54a4a99d47d1",
}
}

![[Note]](../common/images/admon/note.png)
