Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
A total of 3 APIs were identified to have inconsistencies in their functionality. Community decided to track and document each issue separately in their own tickets.
@Arpit Singh to track and document each API separately providing documentation for each issue in detail. Based on each issue either a task or bug is to be raised.
Document each API and its issue separately
Raise tickets for each API separately
Introduction
There are few inconsistencies found within the CPS core APIs. This proposal aims to discuss these problems and suggest appropriate solutions for the same. The following list of APIs are found to be impacted by the findings:
Get a node
Update node leaves
Replace a node with descendants
Brief Analysis
Get a Node
Problem Description:
When a list is fetched using Get a node API then instead of returning one list containing n-number of list items, the API returns n-number of JSON objects where each object contains one list item each.
For example: if there is a list named "Items" containing 10 items named Item 1, Item 2, ......, Item 10. When this list is fetched using get a node API, a total of 10 individual JSON objects each named "Items", are returned where each object encapsulates one list Item.
To tryout the sample curl requests below please create a simple bookstore entry in your local CPS deployment. Or just execute the following curl request
When updating any data node, it's parent node xpath and payload containing updated data are provided as part of the request. The payload contains the data of child node to be updated.
But due to a user error the parent node's data can be sent in the payload and once the request is executed, instead of failing, the request is successfully executed with partial update Where only the child data node is updated, and the parent data node is not updated.
If a replace operation is performed on a list, where a new list item is also added to the list, then it results in a 200-response code, with a partial replace operation.