API Connections

So to summarize you want to submit a form, maybe with a file upload, to an external api together with a token.

So like something like the server action form that we now have but submit to external api endpoint?

And what will be the result of the post request?
Or is failure or succes that matters?

Exactly like the server action form that wapppler has.

To summarise.

  1. Ability to submit any available wappler data ServerConnect Data/Appconnect Data in a json body and URL string to the 3rd party API using post/put.

  2. The response will be a status (200,404 etc) and off course any json data the server responds with.

  • The Json returned may can contain more details such as server Side data from the 3rd party DB and may be an array or nested arrays etc.

  • This json returned should be available inside the wappler json data source or alternative , so it can be visually rendered or further processed on serverconnect.

it would be great to pass binary data such as file upload, but the ability to bind
any wappler data to a post body, is paramount. The data can come from the form on a page, from a query developed in server connect, cookie, session storage etc.

Cheers,

Johnny Hajjar @George

3 Likes

I think there are 2 types of 3rd party APIs. First you have public APIs that can be accessed without any credentials, you could access these with App Connect directly using some AJAX requests. On the other hand you have APIs which require some authentication using an API key, OAUTH or something else. These mostly must be implemented server-side, so should be implemented in Server Connect.

The client-side implementation is just as Server Connect, but it should be extended a bit with support for custom headers, put and delete.

With the server-side an action in Server Connect would do the API call and return the data, on the client-side you just call the server action like you do now.

The only problem I see is that for us the APIs are unknown, we donā€™t know what the API expects as parameters and what they return. Because we donā€™t know what it returns we donā€™t have the meta data required to fill the data pickers in Wappler. The question is how to solve this, most APIs have always the same properties in the output, so we could do a sample call when the action is created and use the result as meta data. But a lot of modern APIs have optional properties, it does not have to return all properties on each call, also the output could change depending on the input. And then we also have error handling, most will return some status code, but some APIs return the error in the result.

4 Likes

The question is how to solve this.

I was thinking about this, and maybe the following could work:

Let the community select and vote for the most desirable APIs/services to connect to and implement support for those.

Then, with time, add support for more APIs (just like Zapier, Piesync, Integromat and others do).

And finally, for all the other APIs, add a generic connector, so at least it will be possible to connect with services that donā€™t demand more specific setup.

1 Like

As i see it
best solution is to make the developer type the parameters names and types then wappler save and use that as the meta data so the developer can edit the meta when needed.

1 Like

I think we got the API meta data generation nicely covered already :slight_smile: will post workflow and screenshots in separate topic

7 Likes

this looks very good.
If apis and routes are the future of wappler, I already consider the wappler as the definitive tool for development.

Iā€™m very happy about it!

wappler is opening up a new world. @George @patrick @Teodor really really thank you very much

3 Likes

You can check it out at:

4 Likes

@George that looks amazing ! I guess with elastic.io alot of stuff can be connected :smiley::ok_hand:t5:. also it has interesting wizards and interface for its connectors

My god is the most beautiful thing Iā€™ve ever seen. :pray::+1::+1::ok_hand: Congratulations @George

2 Likes

@george , @patric @Teodor THANK YOU SO MUCH FOR API EXTENSION ā€¦

2 Likes

Implemented in version 1.5.3 :slight_smile:

2 Likes

Ethan Hunt - Your mission, should you accept itā€¦ is to build ANOTHER weather mobile App using the Wappler Geolocate and API extentions.

This message will self destruct in 10 secondsā€¦

2 Likes

We should make a list of topics for weekly challenges- I think we will all learn a lot and have a lot of fun !

4 Likes

I recreated the Unsplash video like the tutorial on DMXZone and it worked perfectly, so about to try some real world stuff. If it works, which I am sure it will then I will only start begging for the server side of this on Tuesday so I do not look too greedy.

@psweb can we use OAUTH2 via this extension ? did you try

Havent tried yet, sorry, will let you know once i do though.

No you canā€™t use oauth2 with the API Data Source it isnā€™t a social connector it is a public data retrieval

will you add this feature in next release ?