10.7. 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#delete-router

10.7.1. Request

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<...>' \

10.7.2. 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.