Request/Response Types

The Networking API v2.0 supports the JSON data serialization format.

The format for both the request and the response can be specified by using the Content-Type header, the Accept header or adding the .json extension to the request URI.

 

Example 3.1. JSON Request with Headers

POST /v1.0/tenants/tenantX/networks HTTP/1.1
Host 127.0.0.1:9696
Content-Type application/json
Accept application/json
Content-Length 57
{
 "network": 
    {
      "name": "net-name", 
      "admin_state_up": true
    }
}

 

Example 3.2. JSON Response with Headers

HTTP/1.1 201 Created
Content-Type application/json
Content-Length 204
{
 "network": 
    {
     "status": "ACTIVE",
     "subnets": [],
     "name": "net-name",
     "admin_state_up": true,
     "tenant_id": "388a70781bae4ca895f17b7f6293eb70",
     "shared": false, "id": "2a4017ef-31ff-496a-9294-e96ecc3bc9c9"
    }
}

Log a bug against this page


loading table of contents...