Make REST API method names more consistent #111
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



In entity collections such as application links, where each entity itself is a complex construct already, we use the following naming scheme together with the following HTTP methods.
Single entity:
GET: getEntityPOST: createEntityPUT: updateEntityDELETE: deleteEntityMultiple entities:
GET: getEntitiesPUT: setEntitiesDELETE: deleteEntitiesWhereas
PUTsetEntities will be replaced byPATCHin a future release to better explain that these methods may create OR update entities, but only the ones that are sent in the request.For collections that kind of form a single entity themselves, the methods work a bit different. E.g. the trusted proxies in Crowd are one single entity in the form of a list of entries (the trusted proxies). Here, and in similar cases, we would use:
GET: getEntriesPUT: setEntriesPOST: addEntryDELETE: removeEntryHowever, here we would stick to
PUTfor setEntries since it makes more sense.