36
Use a UID field as ID in the API
Nicolas Chesné
I like the UID field a lot, it's very convenient for slugs.
The sad thing is that, while being an ID, it doesn't represent the resource in the API, so we are stuck using /content-type/?slug=whaveter instead of /content-type/whatever.
This could improve two things :
- Cache management on browser or CDN side (because we don't rely on get parameter)
- But mostly, the very common "?slug=" request gives us a list instead of an object.
TL;DR : Can we have a way to use an UID field as the resource identifier in the API ?
Activity Feed
Sort by
Thawan Keane
+1
For endpoints that points to one entity into content-types (like findOne, update and delete) is very annoying to expose database ids.
The best scenario would be to use UIDs (as they are unique) in those operations without need to overwrite these endpoints manually