API v2 has been retired
API v2 was deprecated in EasyDCIM 1.25.0 and is retired as of EasyDCIM 1.29.0. The update deletes all API v2 keys, and API v2 requests can no longer authenticate. This cannot be re-enabled.
What to do
Move every integration that still uses API v2 to API v3:
- Create an API v3 token in EasyDCIM, preferably on a dedicated staff account with only the permissions the integration needs.
- Give the token the narrowest scope that works: read, or read + write if the integration changes data.
- Send it as
Authorization: Bearer <token>to the/api/v3/admin/...or/api/v3/client/...endpoints.
Main differences in API v3
- Resource names are plural, for example
devices,ipam/subnets,ipam/vlans,tags. - List endpoints are paginated: 10 records by default, up to 100 with
per_page; usepagefor the next pages. - Filtering and sorting use
search_term,search_fields,search_op,sort_byandsort_dir. - Request and response bodies differ from API v2. Check each endpoint in the API v3 documentation.
Examples
| API v2 | API v3 |
|---|---|
GET device/{id} | GET /api/v3/admin/devices/{id} |
GET device/{id}/port | GET /api/v3/admin/ports?search_fields=item_id&search_op=eq&search_term={id} |
GET ipam/subnet | GET /api/v3/admin/ipam/subnets |
POST ipam/vlan | POST /api/v3/admin/ipam/vlans |
POST tag/assign | POST /api/v3/admin/tags/assign |