Results 1 to 7 of 7

Thread: Creating a Lianja Rest API

  1. #1
    Senior Member
    Join Date
    Mar 2014
    Posts
    122

    Creating a Lianja Rest API

    Hi All

    There is not much discussion in the forum or in the Wiki on this Topic.
    Wanting to hear some thoughts on how to structure and create a Rest API using Lainja Cloud Server.
    I have written one already in VFP but interested in the tricks like; type of page; passing credentials; do you need to assign a port to bypass Login.Rsp etc.

    Maybe I am overthinking it? Is it just a Page App...
    Thanks Paul
    Name:  RestAPIWiki.PNG
Views: 83
Size:  12.4 KB

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,781
    Blog Entries
    18
    Hi Paul

    can you explain what it is you are wanting to achieve and why you need a REST API. Once you answer that I will point you to relevant doc.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,150
    Hi Paul,

    REST API's are often confused with Web API's in general.

    This article compares the major types: https://www.altexsoft.com/blog/soap-...raphql-vs-rpc/

    In the work I do, an RPC interface makes most sense. The needs are well defined and the goal is to create a definition of the interface that "customer" programmers can easily implement and test.

    An RPC interface is easily implemented in an RSP page.

    Hank

  4. #4
    Senior Member
    Join Date
    Mar 2014
    Posts
    122
    HI Hank

    How you doing and thanks for the blog. I have not yet read it but will when I get a chance as you raise a good point with RPC's.
    Cheers Paul

  5. #5
    Senior Member
    Join Date
    Mar 2014
    Posts
    122
    Hello Barry

    I have 2 cases in mind for use of a an API:
    (1) I have a Lianja APP that manages a customer DB including certain wallet information.
    I need the ability to remotely hit the DB with simple (JSON) requests to return info and based on that info possibly send subsequential requests to update it.
    The API key should be passed in the requests with key data.
    The manager APP may require a customer portal to self register customers.

    (2) I have a lianja APP that manages a customer DB (say contract data).
    I may have unknown 3rd party APPs that require to query the DB remotely and subsequentially requests to update it.

    Thanks PAul

  6. #6
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,781
    Blog Entries
    18
    Hi Paul

    That being the case you have nothing to write as Lianja cloud server has all that built in.

    Read this article
    https://www.lianja.com/doc/index.php...y:Cloud_Server

    Then this article.

    https://lianja.com/resources/blog/39...ja-sql-server-

    Since that article was written the use of an APIKEY was added. You specify this in the Lianja server manager and include it on the ODATA URI

    APIKEY=xxx
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  7. #7
    Senior Member
    Join Date
    Mar 2014
    Posts
    122
    Perfect thanks Barry!
    Regards Paul.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us