MyWiFi

API for developers: reference guide

API index :

List of users/tickets
New user
Editing user
Deleting user
List of users group
List of weekly rate plans


List of registered users/tickets

Requires the list of users of your account.
is possible, but not required, append the parameter PageSize and PageIndex by which it is possible to paginate the list of received data.

  • URL : https://api.mywifiservice.com/v1/RegisteredUsers
  • Method : GET
  • Additional URL parameters : pageSize (default value 100), PageIndex (default value 0)

Request example

GET https://api.mywifiservice.com/v1/RegisteredUsers?PageIndex=0&PageSize=20 HTTP/1.1
Accept: application/json
Accept-Charset: UTF-8
Content-type: application/json
Authorization: Bearer TOKEN


Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 753
Date: Sat, 28 Apr 2012 13:19:40 GMT

....Json/Xml Data...



Adding a new user

This feature allows you to add a new user/ticket to your account. The request will need to provide the user data in JSON or XML format.

  • URL : https://api.mywifiservice.com/v1/registeredusers
  • Method : POST
  • Required input : User serialized data in JSON/xml format. Required fields: GroupID, WeeklyRatePlanID, FirstName, LastName, Login, Password
  • Output : serialized data of the user created

Request example

POST https://api.mywifiservice.com/v1/registeredusers HTTP/1.1
Accept: application/json
Accept-Charset: UTF-8
Content-type: application/json
Authorization: Bearer TOKEN

...Json/Xml user data...

Response

HTTP/1.1 201 Created
Content-Type: application/json;charset=utf-8
Content-Length: 253
Date: Sat, 28 Apr 2012 13:19:40 GMT

....Json/Xml Data of created user...



Editing a user

The operation of this call is similar to the above but allows you to change the user data rather than to create it. Being a REST call, the user ID must be provided directly in the url.

  • URL : https://api.mywifiservice.com/v1/registeredusers/"RegisteredUserID of the user"
  • Method : PUT
  • Required input : User serialized data in JSON/xml format. Required fields: GroupID, WeeklyRatePlanID, FirstName, LastName, Login, Password
  • Output : none

Request example

PUT https://api.mywifiservice.com/v1/registeredusers/345 HTTP/1.1
Accept: application/json
Accept-Charset: UTF-8
Content-type: application/json
Authorization: Bearer TOKEN


Response

HTTP/1.1 200 Ok



Deleting a user

Allows you to delete a user from your list. Even in this case, the user ID is supplied directly to the end of the url.

  • URL : https://api.mywifiservice.com/v1/registeredusers/"RegisteredUserID of the user"
  • Method : DELETE

Request example

DELETE https://api.mywifiservice.com/v1/registeredusers/2248 HTTP/1.1
Accept: application/json
Accept-Charset: UTF-8
Authorization: Bearer TOKEN


Response

HTTP/1.1 204 No Content



List of users group

Takes the list of user groups in your account.

  • URL : https://api.mywifiservice.com/v1/Groups
  • Method : GET

Request example

GET https://api.mywifiservice.com/v1/Groups HTTP/1.1
Accept: application/json
Accept-Charset: UTF-8
Authorization: Bearer TOKEN


Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 272
Date: Sat, 28 Apr 2012 13:19:40 GMT

....Json/Xml Data...



List of weekly rate plans

Requires the list of tariff plans for your account.

  • URL : https://api.mywifiservice.com/v1/WeeklyRatePlans
  • Method : GET

Request example

GET https://api.mywifiservice.com/v1/WeeklyRatePlans HTTP/1.1
Accept: application/json
Accept-Charset: UTF-8
Authorization: Bearer TOKEN


Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: 272
Date: Sat, 28 Apr 2012 13:19:40 GMT

....Json/Xml Data...