Hi folks,

While testing Polaris 1.3.0-incubating release, I saw something "weird" to
me.

In the Polaris Management API, we have several PUT operations:
- updateCatalog
- updatePrincipal
- assignPrincipalRole
- updatePrincipalRole
- assignCatalogRoleToPrincipalRole
- updateCatalogRole
- addGrantToCatalogRole

For me, assignPrincipalRole, assignCatalogRoleToPrincipalRole,
and addGrantToCatalogRole operations are confusing:
- in REST, PUT means a resource update. However, these operations return
201 Created (e.g. the request has been fulfilled, resulting in the creation
of a new resource). Imho, 201 is not accurate here, it should return 204 No
Content (the server successfully processed the request, and is not
returning any content).
- For these operations, if we consider that they should return 201 Created,
then, imho, it should not be PUT operations but POST operations
(considering creation of resource).

These "assignment" operations can be considered as updates on resources, so
PUT makes sense to me, meaning that they should return 204 (not 201).

Thoughts ?

Regards
JB

Reply via email to