Hi community,
This is a very good point. During our implementation of these APIs, more concretely the order management APIs, we missed a way to manage sub-resources in the standard. Let's see with an example: in our product, service and resource order management implementations we use the notes to register things that we consider interesting for the user regarding the order execution. In complex orders, this list might grow a lot. In this situation, each time we wanted to add a new note we had to get the whole list, add the new note, and patch everything again, with the consequent loss of performance. The same thing happens with any other list of sub-resources in all the APIs.
To solve this, we expanded the API to allow specific treatment for sub-resources. This way, to add a new note to an order the request would look like this:
POST /serviceOrder/123/note
To remove a note, something like DELETE /serviceOrder/123/note/5.
And so on. In order management, this is especially relevant with order items. With the standard as it is, to change the status of an order item, we have to get the whole list of order items, search the order item that we want to change, modify the status and path again the whole list. In complex orders with long lists of order items this is crazy in terms of performance. With this new approach this operation would be something like:
PATCH /serviceOrder/123/orderItem/3
{
state='new status'
}
Quite simpler, right?
Could it be interesting to add these capabilities to the standard?
Best regards,
------------------------------
Abel Ruiz Huerta
SATEC GROUP
------------------------------
Original Message:
Sent: Nov 14, 2021 01:46
From: Jonathan Goldberg
Subject: TMF622 PATCH Product Order API
It's a good question, @Ashika Methal.
Without having some index in the array, you would have to replace the entire array contents using PATCH Merge.
If there was something identifiable, you could use the JSON Patch semantics, but without a reliable index it is probably not a good idea.
If this is important, we could open a CR I suppose, @Ludovic Robert what do you think?
------------------------------
Jonathan Goldberg
Amdocs Management Limited
Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
Original Message:
Sent: Nov 12, 2021 09:01
From: Ashika Methal
Subject: TMF622 PATCH Product Order API
Hi All,
In Patch product order defined in TMF622 Product Ordering API REST Specification, It is mentioned that "orderTotalPrice" is a patchable attribute .But there is no unique identifier in orderTotalPrice. Also, I can find some other attributes without unique identifier in update request payload .What is the expectation for update over these attributes.
Please share your inputs. Thank you in Advance
------------------------------
Ashika Methal
Six DEE Telecom Solutions Pvt Ltd
------------------------------