Open APIs

 View Only
  • 1.  Extra Custom Search Operations in TMF OpenAPIS

    Posted Jul 16, 2020 12:10

    Hi,

    My team is currently implementing our new Webservices following the TMF OpenAPIs. While we have found most of our use case in OpenAPIs, we still often need a "search" operation on top of the existing CRUD operations.

    Do you have any pointers on TMForum OpenAPIs that implements those search operations ?

    What's your thoughts on using the already defined "GET" operations and use URL Path Parameters to search for entities ? For examples/api/service?category=X ? As it could lead to long URL for specific search, we could also try to use a more "RPC-ish" way to deal with those services and do a "POST /api/service/_search" with the criteria in the payload

    Of course, all of those customisation would lead to modify the OpenAPI ... But since we would implements as expected the "official operations", I think we can consider we would still be TMF OpenAPI compliant ?

    Kudos,



    ------------------------------
    jonathan schoreels
    VOO SA
    ------------------------------


  • 2.  RE: Extra Custom Search Operations in TMF OpenAPIS

    TM Forum Member
    Posted Jul 16, 2020 15:44
    Hi
    The newly published TMF630 guidelines include a whole new chapter on using JSON Path for filtering, this could perhaps answer your needs using the standard GET API. Suggest you take a look.
    If you have very specific needs, you could consider using the Task Resource pattern, also described in TMF630.

    TMF630 can be found here.

    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: Extra Custom Search Operations in TMF OpenAPIS

    TM Forum Member
    Posted Jul 17, 2020 01:26
    Edited by Vance Shipley Jul 17, 2020 01:26
    > What's your thoughts on using the already defined "GET" operations and use URL Path Parameters to search for entities ? For example /api/service?category=X ?

    Your example above is exactly correct and follows what is documented in TMF630..

    > As it could lead to long URL for specific search

    So what?  There is no limit to the length of a resource path in HTTP and RFC7230 recommends a minimum supported request line length of 8000 octets. If you need a longer resource path than your systems (e.g. httpd server) are configured to allow than the problem is with those and should be corrected there.

    You want your query entirely expressed in the URI as it then benefits from other HTTP mechanisms (e.g. cache).


  • 4.  RE: Extra Custom Search Operations in TMF OpenAPIS

    TM Forum Member
    Posted Jul 17, 2020 03:20

    Hi,

     

    If you take a look at the API pdfs and swagger files (e.g. 633, 638, 640 and 641), you'll see there is, in addition to the retrieve operation, a list operation (which is also a HTTP GET) that accepts filtering attributes to be passed as URL parameters (generic filtering guidelines are defined in TMF 630 part 1 pdf).

     

    Best regard,

    Frederic


    Sensitivity: Internal Use Only

    This e-mail cannot be used for other purposes than Proximus business use. See more on https://www.proximus.be/maildisclaimer