In my application, a client can create resources for which we compute our ID and assign it to the resource.
However a client can also reference, for every resource, a specific ID it wants to use (we call it external ID) so that we do not force the client to only use our IDs.
We then have the following endpoints:
- POST /resources/ to create a resource with an optional external_id in the payload
- PUT /resources/:id to update a resource
We would like to allow a client to update a resource with its external ID. We thought about
- PUT /resources/create_or_update/:external_id but we are not very satisfied with the name of the endpoint to say the least
Would you have an idea for a better name in lines with REST best practices?