Open APIs

 View Only
  • 1.  TMF639 / Search list resource on given attribute

    Posted Oct 05, 2022 09:24
    Hello,

    I am working on TMF639 api and looking for below solution:

    User can search list of resource based on some resourceCharacteristic name and value.
    what should be the standard request parameter for this URL ?  GET /tmf-api/resourceInventoryManagement/v4/resource?@type=MSISDN&<resourceCharacteristic name and value.>
    List of resource should be retrieved which having resource characteristic  premiumValue as gold

    And Response will be like :
    [
    {"@type": "MSISDN","resourceStatus","value": "0170123456","available","resourceCharacteristic": [ { "name": "premiumValue", "valueType": "string", "value": "gold" } ]},
    {"@type": "MSISDN","resourceStatus","value": "0170123457", "available","resourceCharacteristic": [ { "name": "premiumValue", "valueType": "string", "value": "gold" } ]},
    ]

    Please suggest.


    ------------------------------
    Best Regards,
    Ashok Hathal
    ------------------------------


  • 2.  RE: TMF639 / Search list resource on given attribute

    Posted Oct 06, 2022 02:49
    Hi Ashok
    Perhaps you could use something like characteristic.name=premiumValue&characteristic.value=gold 
    You might also want to consider expressing your query using JSON query, as defined in recent TMF630 design guidelines.

    ------------------------------
    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: TMF639 / Search list resource on given attribute

    Posted Oct 07, 2022 01:28
    Thanks for your reply.
    Should it be : 
    resourceCharacteristic.name=premiumValue&resourceCharacteristic.value=gold

    or should it be:
    characteristic.name=premiumValue&characteristic.value=gold

    which one is TMF compliance as above ?  can you please help to share the document as well where it describe ?

    ------------------------------
    Best Regards,
    Ashok Hathal
    ------------------------------



  • 4.  RE: TMF639 / Search list resource on given attribute

    Posted Oct 10, 2022 06:33
    The only proper way to query on Characteristic values is with the advanced query pattern described in TMF630 Part 6 JSON Path Extension.  See my answer in a previous thread here.

    ------------------------------
    Vance Shipley
    SigScale
    ------------------------------



  • 5.  RE: TMF639 / Search list resource on given attribute

    Posted Oct 11, 2022 15:03
    Hi,

    I think suggested solution will apply once response fetched.
    But I looking parameter pattern that first prepare request param and based on that fetch the response.
    Not like first fetch the full response and then apply filter, it will cause performance issue.

    ------------------------------
    Best Regards,
    Ashok Hathal
    ------------------------------



  • 6.  RE: TMF639 / Search list resource on given attribute

    Posted Oct 11, 2022 21:19
    I've heard this rationale before however it confuses the limitations of your framework with an interface specification.  A query of a REST Collection (i.e. Inventory) needs to convey the criteria to select a subset of the items of the Collection.  TMF630 Part 6 describes the use of JSON Path syntax to provide complex criteria.

    A poor implementation might might lean on a library to apply JSON Path to an array of Objects (items), requiring you to first get a JSON representation of every item in the Collection. A better implementation would parse the JSON Path and create a native database query.  At SigScale we chose the latter.

    ------------------------------
    Vance Shipley
    SigScale
    ------------------------------



  • 7.  RE: TMF639 / Search list resource on given attribute

    Posted Oct 06, 2022 08:05
    Hi Ashok,
    In my opinion, to achieve the flexibility in your query, we should use POST. In the payload of POST, we can have where clause. For example,
    "where": {"resourceCharacteristic": [{"name": "premiumValue", "value": "gold"}]}

    ------------------------------
    Pankaj Hadke
    Tech Mahindra Limited
    ------------------------------



  • 8.  RE: TMF639 / Search list resource on given attribute

    Posted Oct 07, 2022 01:30
    Hello Pankaj,
    Above solution is TMF compliance? can you please help to share the document as well where it describes please ?

    ------------------------------
    Best Regards,
    Ashok Hathal
    ------------------------------



  • 9.  RE: TMF639 / Search list resource on given attribute

    Posted Oct 07, 2022 02:23
    Hi Ashok,
    No, you will not find this suggestion in standard documentation.

    ------------------------------
    Pankaj Hadke
    Tech Mahindra Limited
    ------------------------------