300-435 · Question #5
Which URI removes an administrator from a Meraki network using an API call?
The correct answer is A. DELETE https://api.meraki.com/api/v0/organizations/<org_id>/admins/<admin_id>. To remove an administrator from a Cisco Meraki organization via the API, a DELETE request is sent to the specific administrator's URI, which includes the organization ID and the admin's ID.
Question
Options
- ADELETE https://api.meraki.com/api/v0/organizations/<org_id>/admins/<admin_id>
- BDELETE https://api.meraki.com/api/v0/admins/<admin_id>
- CPUT https://api.meraki.com/api/v0/organizations/<org_id>/admins/?delete=<admin_id>
- DDELETE https://api.meraki.com/api/v0/organizations/<org_id>/admins/<user>
How the community answered
(30 responses)- A87% (26)
- B3% (1)
- C7% (2)
- D3% (1)
Why each option
To remove an administrator from a Cisco Meraki organization via the API, a DELETE request is sent to the specific administrator's URI, which includes the organization ID and the admin's ID.
RESTful API design dictates that to delete a specific resource, a DELETE HTTP method is used against the resource's unique URI. The URI `https://api.meraki.com/api/v0/organizations/<org_id>/admins/<admin_id>` correctly identifies the organization and the specific administrator to be removed by their unique `<admin_id>`, adhering to this standard for resource deletion.
This URI is incomplete because Meraki administrators are tied to an organization, so the organization ID must be included in the path to uniquely identify the scope of the admin.
PUT is used for updating or replacing resources, not for deletion. Additionally, using a query parameter `?delete=<admin_id>` for a delete operation is not standard RESTful practice when the resource can be identified by its path.
Using `<user>` (presumably a username or email) instead of `<admin_id>` (a specific, usually numerical ID assigned by the system) is often not the correct identifier for deletion in REST APIs, as APIs typically use unique system-generated IDs for resource manipulation to avoid ambiguity.
Concept tested: Cisco Meraki API administrator deletion
Source: https://developer.cisco.com/meraki/api-v1/#!delete-organization-admin
Topics
Community Discussion
No community discussion yet for this question.