Hello TMFORUM community,
We basically follow the format specified in TMF 630 REST API Guidelines (v4.2.2) - Section 6.2. Creating Multiple Resources - JSON PATCH for all our APIs since there is a capability to create, modify, remove multiple resources at the same time.
It basically means an op of add, remove, replace, modify is supported via PATCH, a basic example shown below.
PATCH /api/anycustomapi
Content-type: application/json-patch+json
[
{
"op": "add",
"value": {
"id": "42", .....
},
{
"op": "remove",
"value": {
"id": "43".....
}
]
Most of the other TMF Open API specs use POST for creation and PATCH for partial updates. In this case, let's take the example of a POST /productSpecification in TMF 620. There is no mention in this document of supporting multiple requests with an API.
If we wanted to create multiple product specifications with an API and use TMF 620/TMF 622, is it still acceptable to use JSON PATCH for this purpose i.e to not support POST, PATCH for creates and updates and instead support JSON PATCH for creates, updates, removes ?
Example:
[
{
"op": "add",
"value": {
"name": "Data Recurring Specification"
....................
},
{
"op": "remove",
"value": {
"id": "43",
.....
}
]
------------------------------
Remya
------------------------------