Feature Request: Add DELETE Endpoint for Device Removal

Solved
zbuchheit
Comes here often

Feature Request: Add DELETE Endpoint for Device Removal

Current Behavior: The current Meraki API uses a POST request to /networks/{networkId}/devices/remove to remove a device, with the device serial included in the request body.

Expected Behavior: To align with RESTful API design principles, it would be beneficial to have a DELETE endpoint for removing devices. A proposed endpoint might be: DELETE /networks/{networkId}/devices/{serial}


In this design, the serial would be included in the URL path, making it more intuitive and in line with common RESTful practices.

This also would allow for terraform-provider-meraki to implement Delete easily on the resource.

1 Accepted Solution
PhilipDAth
Kind of a big deal
Kind of a big deal

That makes complete sense - but changing it now would be a breaking change.

View solution in original post

3 Replies 3
PhilipDAth
Kind of a big deal
Kind of a big deal

That makes complete sense - but changing it now would be a breaking change.

I was afraid that would be the answer, but understand. Thanks for the quick reply! 😊

John_on_API
Meraki Employee
Meraki Employee

Thanks for this rec! I'd like to explain why this is not the case, and why similarly, there's no CREATE action for a device.

 

Devices in this sense refer to the physical hardware, so the concept of CREATING or DELETING a device is awkward. This is unlike a Docker cluster, an EC2 instance, a virtual device of some kind, etc. which could be CREATED or DELETED on a whim, which is where I imagine the expectation arises. 

 

getDevice & updateDevice (or even better, getOrganizationDevices & updateDevice) manage the attributes of the device, but the resource itself is never created or deleted. Although, that would be a pretty powerful operation if it could CREATE an MS355 out of thin air. Sign me up!

 

Dashboard claim and release operations are represented in API as functional resources, rather than CRUD operations, which is an accurate depiction of what's happening. Forcing functional operations into the format of a CRUD suite can be awkward at best and confusing at worst.

 

In short, not every REST operation is part of a CRUD suite! I hope this helps.

Get notified when there are additional replies to this discussion.