Open APIs

 View Only
  • 1.  TMF622 - Post response

    TM Forum Member
    Posted Oct 26, 2018 12:21
    ​Hello All,

    Please, could you help to clarify the questions about response to POST operation in scope of TMF 622 specification.

    As I understand specification itself, response only includes id and href of created order (p. 39):
    Response

    201 { "id": "11", "href": https://host:port/productOrder/productOrder/11

    }

     
    But TMF622B_Product_Ordering_Conformance_Profile_R17.5.1.pdf  defines (p. 20):

    The response from the server must include a BODY with the contents of the new resource created, filled with at least the same information elements that were included in the request and are supported by the server


    So, what is correct behavior? Should response include full body or only id and href?

    Thank you for clarification in advance


    ------------------------------
    Sincerely yours ,
    Dr. Andrey Drozdov,
    Netcracker Technology
    ------------------------------


  • 2.  RE: TMF622 - Post response

    TM Forum Member
    Posted Oct 29, 2018 06:32
    The standard behavior of POST in Open API is to return the created entity. Specifically for Product Order take a look at the published Swagger file at:
    https://github.com/tmforum-apis/TMF622_ProductOrder/blob/master/Product_Ordering_Management.regular.swagger.json
    The response section for code 201 (success) shows that ProductOrder is being returned:
    "201": {
    "description": "Success",
    "schema": {
    "$ref": "#/definitions/ProductOrder"
    }
    },

    But it is possible to specify as part of the request which fields should be returned in the response, as described in the design guidelines, and the example in the spec is showing the minimum fields that should be returned (the generated fields ID and href).
    For additional queries on this API I suggest you reach out to @Ludovic Robert.​

    ------------------------------
    Jonathan Goldberg
    Amdocs Management Limited
    ------------------------------