# Networks

Virtual network management operations

## List networks

> Lists networks to which the project has access.

```json
{"openapi":"3.0.3","info":{"title":"Networking API","version":"2.0"},"tags":[{"name":"Networks","description":"Virtual network management operations"}],"servers":[{"url":"https://{host}/neutron","description":"PCD Network API v2.0","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"pcdAuth":[]}],"components":{"securitySchemes":{"pcdAuth":{"name":"X-Auth-Token","type":"apiKey","in":"header","description":"PCD Identity Service token authentication"}},"parameters":{"AdminStateUp":{"name":"admin_state_up","description":"Filter the list result by the administrative state of the resource.","schema":{"type":"boolean"},"in":"query"},"IdFilter":{"name":"id","description":"Filter the list result by the ID of the resource.","schema":{"type":"string"},"in":"query"},"NameFilter":{"name":"name","description":"Filter the list result by the human-readable name of the resource.","schema":{"type":"string"},"in":"query"},"ProjectIdFilter":{"name":"project_id","description":"Filter the list result by the ID of the project that owns the resource.","schema":{"type":"string"},"in":"query"},"TenantIdFilter":{"name":"tenant_id","description":"Filter the list result by the ID of the project that owns the resource.","schema":{"type":"string"},"in":"query"},"SharedFilter":{"name":"shared","description":"Filter the network list result based on if the network is shared across all tenants.","schema":{"type":"boolean"},"in":"query"},"StatusFilter":{"name":"status","description":"Filter the list result by status.","schema":{"enum":["ACTIVE","BUILD","DOWN","ERROR"],"type":"string"},"in":"query"},"RouterExternalFilter":{"name":"router:external","description":"Filter the network list result based on whether the network has an external routing facility.","schema":{"type":"boolean"},"in":"query"},"Fields":{"name":"fields","description":"The fields that you want the server to return. If no fields are specified, all fields are returned.","schema":{"type":"string"},"in":"query"},"SortDir":{"name":"sort_dir","description":"Sort direction. A valid value is asc (ascending) or desc (descending).","schema":{"enum":["asc","desc"],"type":"string"},"in":"query"},"SortKey":{"name":"sort_key","description":"Sorts by a resource attribute.","schema":{"type":"string"},"in":"query"},"Tags":{"name":"tags","description":"A list of tags to filter the list result by. Resources that match all tags in this list will be returned.","schema":{"type":"string"},"in":"query"},"TagsAny":{"name":"tags-any","description":"A list of tags to filter the list result by. Resources that match any tag in this list will be returned.","schema":{"type":"string"},"in":"query"},"NotTags":{"name":"not-tags","description":"A list of tags to filter the list result by. Resources that match all tags in this list will be excluded.","schema":{"type":"string"},"in":"query"},"NotTagsAny":{"name":"not-tags-any","description":"A list of tags to filter the list result by. Resources that match any tag in this list will be excluded.","schema":{"type":"string"},"in":"query"}},"schemas":{"NetworksResponse":{"type":"object","properties":{"networks":{"type":"array","items":{"$ref":"#/components/schemas/Network"}}}},"Network":{"type":"object","properties":{"id":{"format":"uuid","type":"string","readOnly":true},"name":{"type":"string"},"description":{"type":"string"},"admin_state_up":{"type":"boolean"},"status":{"enum":["ACTIVE","BUILD","DOWN","ERROR"],"type":"string","readOnly":true},"shared":{"type":"boolean"},"project_id":{"format":"uuid","type":"string"},"tenant_id":{"format":"uuid","type":"string"},"subnets":{"type":"array","items":{"format":"uuid","type":"string"},"readOnly":true},"router:external":{"type":"boolean"},"provider:network_type":{"enum":["flat","vlan","vxlan","gre","local"],"type":"string"},"provider:physical_network":{"type":"string"},"provider:segmentation_id":{"type":"integer"},"mtu":{"minimum":68,"type":"integer"},"port_security_enabled":{"type":"boolean"},"dns_domain":{"type":"string"},"qos_policy_id":{"format":"uuid","type":"string"},"availability_zone_hints":{"type":"array","items":{"type":"string"}},"availability_zones":{"type":"array","items":{"type":"string"},"readOnly":true},"ipv4_address_scope":{"format":"uuid","type":"string"},"ipv6_address_scope":{"format":"uuid","type":"string"},"l2_adjacency":{"type":"boolean","readOnly":true},"vlan_transparent":{"type":"boolean"},"qinq":{"type":"boolean"},"is_default":{"type":"boolean"},"segments":{"type":"array","items":{"$ref":"#/components/schemas/NetworkSegment"}},"tags":{"type":"array","items":{"type":"string"}},"revision_number":{"type":"integer","readOnly":true},"created_at":{"format":"date-time","type":"string","readOnly":true},"updated_at":{"format":"date-time","type":"string","readOnly":true}}},"NetworkSegment":{"type":"object","properties":{"provider:network_type":{"type":"string"},"provider:physical_network":{"type":"string"},"provider:segmentation_id":{"type":"integer"}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"detail":{"type":"string"}}}}}},"responses":{"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"}}},"paths":{"/v2.0/networks":{"get":{"tags":["Networks"],"parameters":[{"$ref":"#/components/parameters/AdminStateUp"},{"$ref":"#/components/parameters/IdFilter"},{"$ref":"#/components/parameters/NameFilter"},{"$ref":"#/components/parameters/ProjectIdFilter"},{"$ref":"#/components/parameters/TenantIdFilter"},{"$ref":"#/components/parameters/SharedFilter"},{"$ref":"#/components/parameters/StatusFilter"},{"$ref":"#/components/parameters/RouterExternalFilter"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/SortDir"},{"$ref":"#/components/parameters/SortKey"},{"$ref":"#/components/parameters/Tags"},{"$ref":"#/components/parameters/TagsAny"},{"$ref":"#/components/parameters/NotTags"},{"$ref":"#/components/parameters/NotTagsAny"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworksResponse"}}},"description":"Successful operation"},"401":{"$ref":"#/components/responses/Unauthorized"}},"operationId":"listNetworks","summary":"List networks","description":"Lists networks to which the project has access."}}}}
```

## Create network

> Creates a network.

```json
{"openapi":"3.0.3","info":{"title":"Networking API","version":"2.0"},"tags":[{"name":"Networks","description":"Virtual network management operations"}],"servers":[{"url":"https://{host}/neutron","description":"PCD Network API v2.0","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"pcdAuth":[]}],"components":{"securitySchemes":{"pcdAuth":{"name":"X-Auth-Token","type":"apiKey","in":"header","description":"PCD Identity Service token authentication"}},"schemas":{"NetworkCreateRequest":{"type":"object","properties":{"network":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"admin_state_up":{"default":true,"type":"boolean"},"shared":{"default":false,"type":"boolean"},"project_id":{"format":"uuid","type":"string"},"tenant_id":{"format":"uuid","type":"string"},"provider:network_type":{"type":"string"},"provider:physical_network":{"type":"string"},"provider:segmentation_id":{"type":"integer"},"mtu":{"type":"integer"},"port_security_enabled":{"type":"boolean"},"dns_domain":{"type":"string"},"qos_policy_id":{"format":"uuid","type":"string"},"router:external":{"type":"boolean"},"vlan_transparent":{"type":"boolean"},"is_default":{"type":"boolean"},"availability_zone_hints":{"type":"array","items":{"type":"string"}},"segments":{"type":"array","items":{"$ref":"#/components/schemas/NetworkSegment"}}}}}},"NetworkSegment":{"type":"object","properties":{"provider:network_type":{"type":"string"},"provider:physical_network":{"type":"string"},"provider:segmentation_id":{"type":"integer"}}},"NetworkResponse":{"type":"object","properties":{"network":{"$ref":"#/components/schemas/Network"}}},"Network":{"type":"object","properties":{"id":{"format":"uuid","type":"string","readOnly":true},"name":{"type":"string"},"description":{"type":"string"},"admin_state_up":{"type":"boolean"},"status":{"enum":["ACTIVE","BUILD","DOWN","ERROR"],"type":"string","readOnly":true},"shared":{"type":"boolean"},"project_id":{"format":"uuid","type":"string"},"tenant_id":{"format":"uuid","type":"string"},"subnets":{"type":"array","items":{"format":"uuid","type":"string"},"readOnly":true},"router:external":{"type":"boolean"},"provider:network_type":{"enum":["flat","vlan","vxlan","gre","local"],"type":"string"},"provider:physical_network":{"type":"string"},"provider:segmentation_id":{"type":"integer"},"mtu":{"minimum":68,"type":"integer"},"port_security_enabled":{"type":"boolean"},"dns_domain":{"type":"string"},"qos_policy_id":{"format":"uuid","type":"string"},"availability_zone_hints":{"type":"array","items":{"type":"string"}},"availability_zones":{"type":"array","items":{"type":"string"},"readOnly":true},"ipv4_address_scope":{"format":"uuid","type":"string"},"ipv6_address_scope":{"format":"uuid","type":"string"},"l2_adjacency":{"type":"boolean","readOnly":true},"vlan_transparent":{"type":"boolean"},"qinq":{"type":"boolean"},"is_default":{"type":"boolean"},"segments":{"type":"array","items":{"$ref":"#/components/schemas/NetworkSegment"}},"tags":{"type":"array","items":{"type":"string"}},"revision_number":{"type":"integer","readOnly":true},"created_at":{"format":"date-time","type":"string","readOnly":true},"updated_at":{"format":"date-time","type":"string","readOnly":true}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"detail":{"type":"string"}}}}}},"responses":{"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad Request"},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"}}},"paths":{"/v2.0/networks":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkCreateRequest"}}},"required":true},"tags":["Networks"],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkResponse"}}},"description":"Network created successfully"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}},"operationId":"createNetwork","summary":"Create network","description":"Creates a network."}}}}
```

## Show network details

> Shows details for a network.

```json
{"openapi":"3.0.3","info":{"title":"Networking API","version":"2.0"},"tags":[{"name":"Networks","description":"Virtual network management operations"}],"servers":[{"url":"https://{host}/neutron","description":"PCD Network API v2.0","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"pcdAuth":[]}],"components":{"securitySchemes":{"pcdAuth":{"name":"X-Auth-Token","type":"apiKey","in":"header","description":"PCD Identity Service token authentication"}},"parameters":{"NetworkId":{"name":"network_id","description":"The ID of the network.","schema":{"format":"uuid","type":"string"},"in":"path","required":true},"Fields":{"name":"fields","description":"The fields that you want the server to return. If no fields are specified, all fields are returned.","schema":{"type":"string"},"in":"query"}},"schemas":{"NetworkResponse":{"type":"object","properties":{"network":{"$ref":"#/components/schemas/Network"}}},"Network":{"type":"object","properties":{"id":{"format":"uuid","type":"string","readOnly":true},"name":{"type":"string"},"description":{"type":"string"},"admin_state_up":{"type":"boolean"},"status":{"enum":["ACTIVE","BUILD","DOWN","ERROR"],"type":"string","readOnly":true},"shared":{"type":"boolean"},"project_id":{"format":"uuid","type":"string"},"tenant_id":{"format":"uuid","type":"string"},"subnets":{"type":"array","items":{"format":"uuid","type":"string"},"readOnly":true},"router:external":{"type":"boolean"},"provider:network_type":{"enum":["flat","vlan","vxlan","gre","local"],"type":"string"},"provider:physical_network":{"type":"string"},"provider:segmentation_id":{"type":"integer"},"mtu":{"minimum":68,"type":"integer"},"port_security_enabled":{"type":"boolean"},"dns_domain":{"type":"string"},"qos_policy_id":{"format":"uuid","type":"string"},"availability_zone_hints":{"type":"array","items":{"type":"string"}},"availability_zones":{"type":"array","items":{"type":"string"},"readOnly":true},"ipv4_address_scope":{"format":"uuid","type":"string"},"ipv6_address_scope":{"format":"uuid","type":"string"},"l2_adjacency":{"type":"boolean","readOnly":true},"vlan_transparent":{"type":"boolean"},"qinq":{"type":"boolean"},"is_default":{"type":"boolean"},"segments":{"type":"array","items":{"$ref":"#/components/schemas/NetworkSegment"}},"tags":{"type":"array","items":{"type":"string"}},"revision_number":{"type":"integer","readOnly":true},"created_at":{"format":"date-time","type":"string","readOnly":true},"updated_at":{"format":"date-time","type":"string","readOnly":true}}},"NetworkSegment":{"type":"object","properties":{"provider:network_type":{"type":"string"},"provider:physical_network":{"type":"string"},"provider:segmentation_id":{"type":"integer"}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"detail":{"type":"string"}}}}}},"responses":{"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not Found"}}},"paths":{"/v2.0/networks/{network_id}":{"get":{"tags":["Networks"],"parameters":[{"$ref":"#/components/parameters/NetworkId"},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkResponse"}}},"description":"Successful operation"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}},"operationId":"showNetwork","summary":"Show network details","description":"Shows details for a network."}}}}
```

## Update network

> Updates a network.

```json
{"openapi":"3.0.3","info":{"title":"Networking API","version":"2.0"},"tags":[{"name":"Networks","description":"Virtual network management operations"}],"servers":[{"url":"https://{host}/neutron","description":"PCD Network API v2.0","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"pcdAuth":[]}],"components":{"securitySchemes":{"pcdAuth":{"name":"X-Auth-Token","type":"apiKey","in":"header","description":"PCD Identity Service token authentication"}},"schemas":{"NetworkUpdateRequest":{"type":"object","properties":{"network":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"admin_state_up":{"type":"boolean"},"shared":{"type":"boolean"},"provider:network_type":{"type":"string"},"provider:physical_network":{"type":"string"},"provider:segmentation_id":{"type":"integer"},"mtu":{"type":"integer"},"port_security_enabled":{"type":"boolean"},"dns_domain":{"type":"string"},"qos_policy_id":{"format":"uuid","type":"string"},"router:external":{"type":"boolean"},"segments":{"type":"array","items":{"$ref":"#/components/schemas/NetworkSegment"}}}}}},"NetworkSegment":{"type":"object","properties":{"provider:network_type":{"type":"string"},"provider:physical_network":{"type":"string"},"provider:segmentation_id":{"type":"integer"}}},"NetworkResponse":{"type":"object","properties":{"network":{"$ref":"#/components/schemas/Network"}}},"Network":{"type":"object","properties":{"id":{"format":"uuid","type":"string","readOnly":true},"name":{"type":"string"},"description":{"type":"string"},"admin_state_up":{"type":"boolean"},"status":{"enum":["ACTIVE","BUILD","DOWN","ERROR"],"type":"string","readOnly":true},"shared":{"type":"boolean"},"project_id":{"format":"uuid","type":"string"},"tenant_id":{"format":"uuid","type":"string"},"subnets":{"type":"array","items":{"format":"uuid","type":"string"},"readOnly":true},"router:external":{"type":"boolean"},"provider:network_type":{"enum":["flat","vlan","vxlan","gre","local"],"type":"string"},"provider:physical_network":{"type":"string"},"provider:segmentation_id":{"type":"integer"},"mtu":{"minimum":68,"type":"integer"},"port_security_enabled":{"type":"boolean"},"dns_domain":{"type":"string"},"qos_policy_id":{"format":"uuid","type":"string"},"availability_zone_hints":{"type":"array","items":{"type":"string"}},"availability_zones":{"type":"array","items":{"type":"string"},"readOnly":true},"ipv4_address_scope":{"format":"uuid","type":"string"},"ipv6_address_scope":{"format":"uuid","type":"string"},"l2_adjacency":{"type":"boolean","readOnly":true},"vlan_transparent":{"type":"boolean"},"qinq":{"type":"boolean"},"is_default":{"type":"boolean"},"segments":{"type":"array","items":{"$ref":"#/components/schemas/NetworkSegment"}},"tags":{"type":"array","items":{"type":"string"}},"revision_number":{"type":"integer","readOnly":true},"created_at":{"format":"date-time","type":"string","readOnly":true},"updated_at":{"format":"date-time","type":"string","readOnly":true}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"detail":{"type":"string"}}}}}},"parameters":{"NetworkId":{"name":"network_id","description":"The ID of the network.","schema":{"format":"uuid","type":"string"},"in":"path","required":true}},"responses":{"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad Request"},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden"},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not Found"},"PreconditionFailed":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Precondition Failed"}}},"paths":{"/v2.0/networks/{network_id}":{"put":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkUpdateRequest"}}},"required":true},"tags":["Networks"],"parameters":[{"$ref":"#/components/parameters/NetworkId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkResponse"}}},"description":"Network updated successfully"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"412":{"$ref":"#/components/responses/PreconditionFailed"}},"operationId":"updateNetwork","summary":"Update network","description":"Updates a network."}}}}
```

## Delete network

> Deletes a network and its associated resources.

```json
{"openapi":"3.0.3","info":{"title":"Networking API","version":"2.0"},"tags":[{"name":"Networks","description":"Virtual network management operations"}],"servers":[{"url":"https://{host}/neutron","description":"PCD Network API v2.0","variables":{"host":{"default":"example.platform9.com","description":"The PCD controlplane hostname"}}}],"security":[{"pcdAuth":[]}],"components":{"securitySchemes":{"pcdAuth":{"name":"X-Auth-Token","type":"apiKey","in":"header","description":"PCD Identity Service token authentication"}},"parameters":{"NetworkId":{"name":"network_id","description":"The ID of the network.","schema":{"format":"uuid","type":"string"},"in":"path","required":true}},"responses":{"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not Found"},"Conflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"PreconditionFailed":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Precondition Failed"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"detail":{"type":"string"}}}}}}},"paths":{"/v2.0/networks/{network_id}":{"delete":{"tags":["Networks"],"parameters":[{"$ref":"#/components/parameters/NetworkId"}],"responses":{"204":{"description":"Network deleted successfully"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"412":{"$ref":"#/components/responses/PreconditionFailed"}},"operationId":"deleteNetwork","summary":"Delete network","description":"Deletes a network and its associated resources."}}}}
```
