Creating nodes using a given uuid should use PUT not POST
Important: PUT must be idempotent
Node API
POST: Creation of new nodes
PATCH: Partial updates of nodes
PUT: Full updates of nodes, Creation of nodes with given id (idempotent) | e.g.: updateOrCreate / override
Examples:
PUT /api/v1/:project/nodes/:uuid - Ensure that node with uuid exists
PATCH /api/v1/:project/nodes/:uuid - Update parts of the node
POST /api/v1/:project/nodes/:uuid - should yield a 404
Webroot API
POST: Partial updates of nodes
PUT: Full updates of nodes, Creation of nodes with given path (idempotent) | e.g. updateOrCreate / override
PUT /api/v1/:project/webroot/my/existing/path - Full Update Updates a node with the given path
PUT /api/v1/:project/webroot/my/missing/path - Yields 404 since the path is missing
PUT /api/v1/:project/webroot/my/existing/missingElement - Yield 201 since element was created using the missingElement segment.
POST /api/v1/:project/webroot/my/existing/path - Partial Update
Creating nodes using a given uuid should use PUT not POST
Important: PUT must be idempotent
Node API
POST: Creation of new nodes PATCH: Partial updates of nodes PUT: Full updates of nodes, Creation of nodes with given id (idempotent) | e.g.: updateOrCreate / override
Examples:
Webroot API
POST: Partial updates of nodes PUT: Full updates of nodes, Creation of nodes with given path (idempotent) | e.g. updateOrCreate / override
PUT /api/v1/:project/webroot/my/existing/path - Full Update Updates a node with the given path
PUT /api/v1/:project/webroot/my/missing/path - Yields 404 since the path is missing
PUT /api/v1/:project/webroot/my/existing/missingElement - Yield 201 since element was created using the missingElement segment.
POST /api/v1/:project/webroot/my/existing/path - Partial Update