REST documentation

REST server url: http://svampguiden.ekoo.se/en/rest_server


REST API

API [method: get]
No description available
helloWorld [method: get]
Test method meant to be used by developers to test the REST client side. Requires no authentication @return array Array with 4 items: 'Hello', 'World', 'and', 'everybody else'
contacts [method: get]
Test method meant to be used by developers to test the REST client side. Returns a multiple array as response. It's interesting to see how the response must be wrapped into several arrays as described in the CI2 documentation http://codeigniter.com/user_guide/libraries/xmlrpc.html. Requires authentication. @return array Array with 2 items each one composed by 4 items
user [method: get]
Returns user's data @param int id User ID @return array
user [method: post]
Returns user's data @param int id User ID @return array
user [method: delete]
Performs fake user deletion @param int id User ID @return string
users [method: get]
Returns users' data @return array
upload [method: post]
REST API Upload using native CI Upload class. @param userfile - multipart/form-data file @param submit - must be non-null value. @return upload data array || error string

USAGE

The REST method helloWorld() returns an array like this one:

Array
(
    [0] => hello
    [1] => world
    [2] => and
    [3] => everybody else
)
With rest there are several way to get such result: for ex. the client has to send a GET request like this one:
$words = $this->rest->get('helloWorld/format/json');
Look at the rest_client.php controller for more examples.

Click here to test the helloWorld_get method.
Click here to test the contacts_get method.