How to use the API documentation environment

Follow

You can access the API documentation environment at https://dev.cloud4wi.com/ or by clicking on the API documentation button in the "Cloud4Wi API" application, in the Marketplace.
By entering your "API key" / API secret" pair you can access a developer-friendly environment, where you can find a list of all supported API endpoints. For each endpoint you can find a list of supported parameters, with their type and description.
The environment also allows you to generate your request by filling out a web form. As a result of your request, the REST URL, along with the results of your real data will be generated.
Please note that currently we only support the GET method. This means that you can easily check all your API callbacks by entering your REST URL in the navigation bar of your browser.

 

Previous step

The previous step was enabling or refreshing your API secret. If you don't have your API secret, please read the following article: Get or refresh your API credentials through the Control Panel.

 

Entering "API key" and "API secret"

Please access at the API documentation environment at https://dev.cloud4wi.com/ and enter your API key and secret.



Then a list of endpoints appears. Currently you can perform operations on:

  • analytics : Retrieve data from Hotspot Analytics
  • engagement : Get all the information about user engagement
  • hotspots : Get all the information about Hotspots
  • loyalty : Get all the information about user loyalty
  • sessions : Retrieve all connections data and authentications errors
  • social : Get all the information about Social Login based end-users
  • users : Retrieve all end-user's profiles and details
  • visits : Retrieve all the logs of Splash Portal impressions
  • wifiareas : Get all the details of Venues

Using the documentation environment is very intuitive, please find a practical example of it below:

 

Example of use: Users

After entering the API key and secret, all the available entities will be displayed. Each entity includes a set of API endpoints that are possible to call. In our case, we choose to perform operations on users and we click on "users : Retrieve all end-users' profiles and details" to expand this tab.



Then endpoints appear. By clicking on the method used ("GET", in our case) for the endpoint chosen, we can see more information on that, such as implementation notes, response content type ("application/json" in all current cases), parameters and response messages.
In this example we choose the "/users" endpoint and click on the corresponding "GET" label.



In the parameters list, required fields are filled with default values. By clicking on the Try it out! button, you can get the API callback for the selected values (deleted, limit, offset).
Please note that the following data are shown:

  • Request URL
  • Response body
  • Response code
  • Response headers

This data is usually helpful for you to manage all possible cases. You can copy and paste the Request URL to your code, to be sure that the API call on your code is the same made in the documentation environment.


In our case the request URL is:

https://api.cloud4wi.com/users?deleted=false&limit=1000&offset=0&api_version=v1.0&api_key=b2cb3024e213162f761fc10401f366e4&api_secret=71bef00b72616ad97ef972a0cc5cd472

Now we can get a subset of the users who returned. We can get a list of active users with a Click-Through account that accepted the marketing clause. This means:

  • provider: 'passthrough'
  • privacy: true
  • deleted: false
  • limit: 1000
  • offset: 0

After filling out the form and clicking on the Try it out! button, you will conveniently get the request and response again. The request URL in this case is:

https://api.cloud4wi.com/users?provider=passthrough&privacy=true&deleted=false&limit=1000&offset=0&api_version=v1.0&api_key=b2cb3024e213162f761fc10401f366e4&api_secret=71bef00b72616ad97ef972a0cc5cd472


This is a very intuitive way to make API calls, and no advanced development skills are required. It is helpful to have a good knowledge of Cloud4Wi, to be fully aware of all the necessary steps.

 

Next step

Now you are ready to write your own code. Find a sample script in the following article: Examples of custom code using APIs.

Have more questions? Submit a request

Comments