Open APIs

 View Only
Expand all | Collapse all

Resource Inventory Management (TMF369) : How the response will look like if API is returning multiple resources?

  • 1.  Resource Inventory Management (TMF369) : How the response will look like if API is returning multiple resources?

    TM Forum Member
    Posted Apr 19, 2022 10:14
    Edited by Marlon Almazan Apr 20, 2022 09:35
    In TMF369 How the response will look like if we call GET operation and it returns list of resources. As  API guide does not mention about response in this case.

    Example
    GET /resource?fields=...&{filtering}

    Request
    GET /tmf-api/resourceInventoryManagement/v4/resource?fields=id,href,value,@type,category,usageState&category=Premium&usageState=idle
    Accept: application/json

    ------------------------------
    Arko Chakravarty
    VCT International
    ------------------------------


  • 2.  RE: Resource Inventory Management (TMF369) : How the response will look like if API is returning multiple resources?

    TM Forum Member
    Posted 29 days ago
    Hi Arko
    In the Open API swagger files, there are two flavors of GET.
    • retrieve (get by ID) - returns a single JSON entity in the Body of the GET response: {"id": "rver34345345", "href":"https://server:port/blabla"}
    • search (get by filter) - returns an array of JSON entities in the Body of the GET response: [{"id": "rver34345345", "href":"https://server:port/blabla"}, {"id": "rver34345346", "href":"https://server:port/blabla1"}]
    Hope it helps

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