Deleting virtual routers
DELETE /v2.0/routers/{router_id}
Delete a logical router and, if present, its external gateway interface.
This operation fails if the router has attached internal interfaces. Find their IDs, as explained in Listing virtual router interfaces, and delete them, according to Deleting virtual router interfaces. After deleting all of router’s internal interfaces, delete the router itself.
Source: https://docs.openstack.org/api-ref/network/v2/index.html?expanded=delete-router-detail#delete-router
Request
Parameters
Name | In | Type | Description |
---|---|---|---|
router_id
|
path | string | The ID of the router. |
Example
# curl -ks -X DELETE -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \ https://<node_IP_addr>:9696/v2.0/routers/ce996632-45a2-4c6b-a951-a624eba74621
Response
Status codes
Success
Code | Reason |
---|---|
204 - No Content
|
The server has fulfilled the request. |
Error
Code | Reason |
---|---|
401 - Unauthorized
|
User must authenticate before making a request. |
404 - Not Found
|
The requested resource could not be found. |
409 - Conflict
|
This operation conflicted with another operation on this resource. |
412 - Precondition Failed
|
The server does not meet one of the preconditions that the requester put on the request header fields. |