Open APIs

 View Only
  • 1.  Regexp expression usage with attribute filtering

    Posted Apr 24, 2020 03:04
    Hi All,

    I have query on implementing the query resources with attribute filtering...

    I need to implement following scenarios:
    1. Filter the records with attribute having the exact match like 'givenName=John'
    2. Filter the records where the givenName like John (include starts with and ends with)
    how the query param should look like for the above filters?
    I am referring to TMF630 Part 1 and came up with the following values
    1. For exact match
    /party/v4/individual/?givenName=John
    2.  For like
    starts with
    /party/v4/individual/?givenName*=John*
    ends with
    /party/v4/individual/?givenName*=*John
    value contains
    /party/v4/individual/?givenName*=John
    I couldn't find any exact example for the #2 (Like) .. but there is the table in TMF630 Part 1 page #35 where they specified the operator literal to be used use '**= regex*'
    Please Confirm whether this is the correct approach or if you have any sample please do share...

    ------------------------------
    Syed Javed
    Oracle Corporation
    ------------------------------


  • 2.  RE: Regexp expression usage with attribute filtering

    TM Forum Member
    Posted Apr 26, 2020 09:30
    Hi Syed
    Perhaps you are aware that the guidelines are being updated to add the use of JSON Path in queries, this might provide a more elegant solution to your use case.
    Suggest you reach out to @Florin Tene who created the proposal, he may be able to guide you here.
    I'm not sure when the new guidelines are planned for publication.
    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.
    ------------------------------



  • 3.  RE: Regexp expression usage with attribute filtering

    Posted Apr 27, 2020 01:51
    Thanks Jonathan for your inputs.

    ------------------------------
    Syed Javed
    Oracle Corporation
    ------------------------------



  • 4.  RE: Regexp expression usage with attribute filtering

    Posted Apr 27, 2020 08:25

    Hi @Florin Tene ​,
    Can you please guide us in specifying the queryParams in TMF format for the scenarios which @Syed Javed has posted above?

    Thanks in advance



    ------------------------------
    Dharaneeshwaran dharaneeshwaran.n@oracle.com
    Oracle Corporation
    ------------------------------



  • 5.  RE: Regexp expression usage with attribute filtering

    TM Forum Member
    Posted Apr 28, 2020 10:32

    Hi,

    Reading some of Syed's examples made me wonder "Can you do that in JSON-PATH?". After a bit of reading, I think:
    value contains

    /party/v4/individual/?givenName*=John
    Might be:
    GET /party/v4/individual/?filter="$[?('John' in @['givenName'])]"

    Steve



    ------------------------------
    Stephen Harrop
    Principal Integration Architect
    Vodafone Group
    ------------------------------



  • 6.  RE: Regexp expression usage with attribute filtering

    Posted Apr 29, 2020 03:25
    Thanks Steve for your inputs.

    ------------------------------
    Syed Javed
    Oracle Corporation
    ------------------------------



  • 7.  RE: Regexp expression usage with attribute filtering

    Posted Apr 29, 2020 03:46
    Edited by Dharaneeshwaran dharaneeshwaran.n@oracle.com May 04, 2020 01:03
    Hi @Steve Harrop,
    Thanks for your inputs
    Can we use the JSON-PATH for other cases(exact match, starts with and ends with) also to maintain consistency?
    Also, it would be helpful if you specify the keywords to be used in the case of an exact match.



    ------------------------------
    Dharaneeshwaran 
    Oracle Corporation
    ------------------------------