Open APIs

  • 1.  TASK Resource to create 2 different identities in same request

    TM Forum Member
    Posted Sep 17, 2021 13:54
    Hello,

    I've read the TMF630 REST API Design part 1 regarding the Task Resource guidelines, however - probably because I'm new on this - I was not able to find a clear response to my questions.

    In my use case, due to several reasons, we have the need to create with same API request, 2 different instances. For example. imagine we need to create 1 service entity (according TMF638) and 1 billingAccount (according TMF666) - in the same request. 
    For that purpose we would create a Task resource under service inventory named for instance "ServiceFull", which will receive all the information from Service entity and also the billingAccount entity.

    I was trying to find a JSON example, showing a similar type of TASK resource - i.e. showing the creation of  2 different resource types, which are usually created with different APIs, but without success. Does anyone has an example/sample of such type of TASK request?

    Many thanks,
    Miguel Leal


    ------------------------------
    Miguel Leal
    Nokia
    ------------------------------


  • 2.  RE: TASK Resource to create 2 different identities in same request

    TM Forum Member
    Posted Sep 18, 2021 14:21
    Hi Miguel
    I'm not aware of a task resource in the current set of TMF Open APIs that does this type of coordinated transaction.
    But seemingly you would create a custom task resource that embeds (for example) the Service and BillingAccount entities. This would serve as input and response - in the response you would expect to see the IDs populated in both Service and BillingAccount entities. You would have to manage partial success semantics, depending on your specific business requirements.
    Good luck!

    ------------------------------
    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.
    ------------------------------



  • 3.  RE: TASK Resource to create 2 different identities in same request

    TM Forum Member
    Posted Sep 21, 2021 06:08
    Thanks for your reply Jonathan!

    ------------------------------
    Miguel Leal
    Nokia
    ------------------------------



  • 4.  RE: TASK Resource to create 2 different identities in same request

    TM Forum Member
    Posted Sep 20, 2021 02:44
    Hi Miguel,

    If you pay attention to what you will see in REST API design guidelines, such case is NOT covered indeed.
    Reason for that is Tasks are meant to be some 'last resort' option in case the regular CRUD design would not fly to cover specific use-cases, but still the design of a Task, like any regular CRUD operation, is resource type centric, i.e. is supposed to apply to single resource type.
    One relevant example of defining a Task is actual bulk operations, but those would apply on ONE resource type. as can be seen from the URI itself: https://mydomain/myresourcetype/bulkupdate, for example (you can see it sits in the scope of 'myresourcetype', by nature).

    Then if you need to expose single API that would operate - eventually in transactional manner - on multiple types of resources, then this is not part of the regular REST approach, BUT there is room for aggregation or composition on top of regular REST APIs at upper level (enablers levering of regular REST APIs at API Gateway / Managenement level or other frameworks).

    ------------------------------
    Christophe MICHEL
    Amdocs Management Limited
    ------------------------------



  • 5.  RE: TASK Resource to create 2 different identities in same request

    TM Forum Member
    Posted Sep 21, 2021 06:11
    Thanks for your reply Christophe.
    We will  now evaluate the options we may have, considering the comments received.

    ------------------------------
    Miguel Leal
    Nokia
    ------------------------------