Layer7 API Management

  • 1.  using existing Rest API as Datasource backend in Live Api Creator

    Broadcom Employee
    Posted Aug 06, 2018 02:22 PM

    Hi,

    one of our customers has raised a request to use the LAC for creating a new abstractive  rest api above an existing Rest Api (as datasource). so far our back end data source was mainly Database and i cannot find any example in documentation for the requested use case. 

     

    your help will be much appreciated if you can reference me to such example.

     

    Thanks, #lac #liveapicreatorlac



  • 2.  Re: using existing Rest API as Datasource backend in Live Api Creator

    Posted Oct 25, 2018 07:08 PM

    In the Demo API (included within our single-user/demo package in LAC 5.0), there are two resources:

    1. CustomerOrders_JS_SubResource - table-based resource with another JavaScript subresource (which in the case, connects to a data source as well, but this could apply to calling another external API)

    2. CustomerOrders_JS_Totally - Javascript resource, demonstrating how you could combine the two API responses. 

     

    Hope this helps. 



  • 3.  Re: using existing Rest API as Datasource backend in Live Api Creator

    Broadcom Employee
    Posted Oct 25, 2018 07:41 PM

    Just to add a bit: you could also use a custom endpoint to receive all requests to a given set of URLs, and then do with these requests as you please. It's a thin layer, but it can be useful in some cases.

     

    Another possibility would be to use the existing REST API as a data source by creating a data source provider. See https://docops.ca.com/ca-live-api-creator/5-0/en/creating-apis/manage-data-source-providers for details. The MongoDB data source provider, which is included in the product in source form, is a good example of turning a REST API (in this case MongoDB) into a fairly full-featured data source.