API Reference

If you are a software developer or integrator, you might want to use the provided API (Application Programming Interface) to easily integrate IronWifi authentication service with your existing system. Possible system integrations include:

  • Building access control system
  • Human resources system
  • Visitor tracking system
  • Billing system
  • Hotel checkin, checkout system

Full documentation of our API is available at https://www.mashape.com/ironwifi/ironwifi .  The API communication interface is available at https://console.ironwifi.com/api and communication is provided strictly through a https service and JSON arrays.

Examples on how to use the Rest API

https://curl.haxx.se/download.html is one method of working with our api.

Generate an API key and add it to the variable below. This key needs to be used with all requests sent to the API.

key=’xxxxxxxxxxxxxxxxxxxx’;

To get list of users

$ curl ‘https://console.ironwifi.com/api/users’ -H “authorization: Bearer $key” -H ‘accept: application/json, text/plain, */*’

 

Create new user

$ curl ‘https://console.ironwifi.com/api/users’ -H “authorization: Bearer $key” -H ‘content-type: application/json;charset=UTF-8’ -H ‘accept: application/json, text/plain, */*’ –data-binary ‘{“username”:”USER1″}’

Response includes the user_id. It is required to manipulate the user profile.

user_id=2969744;

Set a user password (add attribute)

$ curl ‘https://console.ironwifi.com/api/attributes’ -H “authorization: Bearer $key” -H ‘content-type: application/json;charset=UTF-8’ -H ‘accept: application/json, text/plain, */*’ –data-binary “{\”userid\”:\”$user_id\”,\”attribute\”:\”Cleartext-Password\”,\”operator\”:\”:=\”,\”table\”:\”radcheck\”,\”value\”:\”abc123\”}”

 

Get a list of user attributes

$ curl “https://console.ironwifi.com/api/attributes?table=radcheck&userid=$user_id” -H “authorization: Bearer $key” -H ‘accept: application/json, text/plain, */*’

Response provides attribute_id. It is required to manipulate the attribute.

attribute_id=5505687;

To delete an attribute

$ curl “https://console.ironwifi.com/api/attributes/$attribute_id?table=radcheck” -X DELETE -H “authorization: Bearer $key” -H ‘accept: application/json, text/plain, *.*’