Hello. I am building a REST API that will potentiality service various applications. My inclination is to allow the client to maintain its own (user defined but unique) names for resources in the API DB. The idea is that a client wants to maintain its own (unique) names for objects, not ones generated by the DB.
I see two ways to do this. Require the client to make the mapping between internal naming conventions that humans would understand to the DB keys, or have a mapping on the API that resolved the client names to the proper resources. Then each “POST” would include the client’s name, and a “GET” could contain a json object that includes the client’s name for the object. Seems like the second approach might make building and maintaining client apps easier.
Since I am new to REST APIs, I was wondering if there is an accepted approach to implementing this?
To clarify a bit, the API maintains essentially a set of tree structures, and each new client application would talk to a new root node in the tree. Names of the objects in the tree could be some concatenation of the path down the tree structure, which would essentially bake in a name spacing convention that would ensure uniqueness of client names, even if two apps had similar names for objects in the tree.