Open APIs

 View Only
Expand all | Collapse all

TMF Spec 630 - Queries related to Task Resource Guidelines

  • 1.  TMF Spec 630 - Queries related to Task Resource Guidelines

    TM Forum Member
    Posted Feb 18, 2020 13:17

    As per below Task Resource guidelines of TMF (copied below content from TMF 630 design spec 17.5.1 version - part I)

    >>>>>>>>>>>>>>>>>>>>>>>>>>

    If the operation modifies another resource, "303 See Other" is returned. In this case, the "Location" HTTP header shall point to the primary resource.

    There are use cases:

    -        when a task request is simple and there is no need to persist the request but the server may choose to persist the request in any case, e.g. for accounting purposes

    -        long running task when there is a need to persist the request in order to monitor it.

    Simple task request MAY return an ID.

    If an ID is returned it MUST represent a resource that was created for the task.
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Could you please clarify below queries in the context of above guidelines , say for a use case :-  A new related resource "Resource B" is created as part of a  task acted on a "Resource A"

    • "If the operation modifies another resource, "303 See Other" is returned. " - does 303 has to be returned only when modifying resource or should 303 be returned if a related resource is created
    • It was mentioned "the "Location" HTTP header shall point to the primary resource." -  what is considered as primary resource? for above example, does Resource A is considered a primary resource or Resource B
    • "Simple task request MAY return an ID.If an ID is returned it MUST represent a resource that was created for the task." - does the response should return an ID which is the id of the newly created resource, "Resource B" as per above example ?

    Thanks in advance!

    ------------------------------
    Anusha M
    Oracle Corporation
    ------------------------------


  • 2.  RE: TMF Spec 630 - Queries related to Task Resource Guidelines

    Posted Feb 20, 2020 09:39
    Hi Anusha,

    Interesting questions. My thinking is that a task is a resource by itself, independent from other resources. When you create a task with POST /task then it MAY returns the id of the created task resource with a 200 OK answer, or not with 200 No content answer. This is not any id of resources that the task itself may have modified or created.
    I share your question about the notion of "primary" resource. In fact I'm not sure there is such a primary resource, I would say that the task MAY return 303 See Other with a list of Location to all resources modified or created by the task. I'll raise the point to the TMF API team for clarifiction.

    Regards

    Alexis

    ------------------------------
    Alexis de Peufeilhoux
    Deutsche Telekom AG
    ------------------------------