Skip to content
dzey edited this page Sep 2, 2012 · 17 revisions

Mustached Robot API

The Mustached Robot API allows external developers to access to the coworking space datas. All the datas are available at http://domain.com/api.

Access

The access is restricted by a basic HTTP authentication login/password

Results

Results are returned in xml, json, php, html or csv. You must append ".FORMAT_NAME" at the end of your request. Example : url: GET /user/34.xml or GET /user/34.json

Resources

GET /users

List all the users of the coworking space.

GET /user/:id

Get the datas of a specific user.

You can get more informations about the user (such as the skills of the user or the company of the user) by using the "expand[]" parameter. Please note that by using this parameter you will send more requests to the database, so use this option only if you really need the expanded informations.

Examples:

  • GET /user/1.xml?expand[]=skills
  • GET /user/1.xml?expand[]=skills&expand[]=company

Possible values for the expand parameter:

  • skills
  • company

GET /user/:id/skills

Get the skills of a specific user

GET /user/:id/checkins/:order

Get the checkins of a specific user. :order is an optional parameter to order results by checkin date ('created_at'). Default value is 'asc'.

GET /users/here/:reason_id

Get a list of the users currently in the coworking space.

If the :reason_id parameter is given, the response returns the users currently here for the reason specified. If the :reason_id parameter is not given, the response returns all the users in the coworking space (whatever the reason).

GET /checkins/:order

Get all the checkins of the coworking space. :order is an optional parameter to order results by checkin date ('created_at'). Default value is 'asc'.

GET /checkin/:id

Get the datas of a specific checkin

GET /reasons

Get the list of all the reasons configured by the administrator (= the reason why the user checks in)

GET /seats

Get the coworking seats information: total seats number, available seats number and occupied seats number are returned. Please note only the coworkers who have checked in with the reason "coworking" are used.

GET /coworking/next_events

Get the next events in the coworking space (starting from the current day)