Product Documentation

FairCom Edge Android IoT

Previous Topic

Next Topic

REST API with FairCom Edge on Android

Now that the server is running, either by the sample apk or using your custom application, you may start to develop using other APIs like REST. The first required step is to export the web server port, in the same way we exported the server port 5597 previously. In this case, we will export the port 8080:

./adb forward tcp:8080 tcp:8080

Once this is done, you may access the documentation from your browser, going to the swagger website:

http://editor.swagger.io

then go to File > Import url:

and paste the default FairCom Edge url: http://localhost:8080/ctree/api/v1/openapi

And the documentation will be shown:

From here, besides having access to the FairCom EDGE REST documentation in a friendly format, it is possible to submit commands. Notice that this is just one of the alternatives to use REST with FairCom EDGE, in this document we also show in the sequence the use of curl and the postman application - all the alternatives that follow can be used independently.

In This Chapter

Using REST with swagger

Using REST with curl

Using External Tools

TOCIndex