Creating an API for 3rd party access to my desktop Clarion app data

I’m trying to assess the feasibility of creating an API for 3rd party access to my desktop Clarion app data. Has anyone had experience creating such an interface, or perhaps have some thoughts on the subject?

Mark Knowles
[email protected]

Easy-peasy w/ Nettalk
https://capesoft.com/accessories/netsp.htm

I agree with Kevin.
A Nettalk API webserver is the easiest type of server to create. No extensive end-user UI.
Just NetWebServiceMethod procedures for your endpoints.
There are samples and IIRC at least one ClarionLive (www.clarionlive.com) webinar dedicated to creating an API service/server.

You will want your server running as a service (Capesoft Self-Service). It will need to run on a system that allows it access to your database. The service will need to be exposed to the Internet and need an SSL certificate.

1 Like

For what purpose?

  1. Selected data for read-only access, export to Excel for example, that they can download?
  2. Read-write access for full/selective update of data

Option 1 is a LOT easier :wink:

“API” here can have different meanings to different people.

In today’s world it generally means that you have an HTTPS server, which programs can access to do stuff. Those programs might be on the same machine, on the LAN, or perhaps somewhere outside the LAN. Sometimes these are refereed to as “REST APIs” or (less common now) “SOAP APIs”.

In the past it could have meant “creating a DLL that other programs can link and call”, but that’s really not used much now. For example something like QuickBooks had an “api” for their desktop program which was a DLL that you called into.

Some people also use it in a sort of export-import way (ie you export data to say a CSV file, and they can import it.) That’s not really an “API” but in the old (old) days was the best we had.

If you say “my app has an API” today, then most people would interpret that to mean “there’s an API Server that you can run, which allows other programs to interact with your system over HTTPS”. Usually using JSON. They might call it a REST api (which is more a concept than a specification) but implies JSON over HTTPS.

Creating an API server in Clarion is, as Kevin said, pretty easy. NetTalk Server level (CapeSoft NetTalk) provides both the server code, the processes to get automatic (and free) certificates, and so on. It also provides templates which form the back-bone to your API methods. It generates documentation for those methods automatically.

If you’ve never done one before, and especially if you’ve never written or hosted a HTTPS server before, then I recommend starting with the book (Developing Web Applications with NetTalk Book). This has chapters on creating a server, creating an API server, stuff you need to know about servers in general and so on.

We do the NetTalk User Group Webinar on Thursdays (www.clarionive.com) and most questions these days are about creating API’s. Once you know what you are doing it takes minutes to add new API functionality, and perhaps an hour to create a new API server from scratch. Of course there is a learning curve to know what you are doing, but it’s pretty easy.

1 Like