Loading...
 

User API Specification


1. List all users


Parameters
Action: GET
URL: http://yoururl.feedbackroad.com/api/v1/users.xml
Request: Null


Example CURL
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' \ -u 123638dc733ceaf75130303fe6e6010f63868bc0:X -X GET http://yoururl.feedbackroad.com/api/v1/users.xml


Example Response
<?xml version="1.0" encoding="UTF-8"?>
<message client="127.0.0.1" time="1316115319">
  <response>
    <code>200</code>
    <data>
      <users>
        <user>
          <user_id>198</user_id>
          <user_type>moderator</user_type>
          <user_email>barney@flintstones.com</user_email>
          <user_display_name>barney rubble</user_display_name>
          <user_guid>123</user_guid>
          <notification_on_new_idea>1</notification_on_new_idea>
          <notification_on_new_comment>1</notification_on_new_comment>
          <notification_on_update_status>1</notification_on_update_status>
          <notification_on_admin_post>1</notification_on_admin_post>
          <user_cdate>2011-09-14 23:45:14</user_cdate>
          <user_mdate>0000-00-00 00:00:00</user_mdate>
        </user>
        <user>
          <user_id>199</user_id>
          <user_type>user</user_type>
          <user_email>user@yahoo.com</user_email>
          <user_display_name>yahoo user</user_display_name>
          <user_guid></user_guid>
          <notification_on_new_idea>1</notification_on_new_idea>
          <notification_on_new_comment>1</notification_on_new_comment>
          <notification_on_update_status>1</notification_on_update_status>
          <notification_on_admin_post>1</notification_on_admin_post>
          <user_cdate>2011-09-14 23:53:06</user_cdate>
          <user_mdate>0000-00-00 00:00:00</user_mdate>
        </user>
      </users>
    </data>
  </response>
</message>

If successful, a 200 (OK) status code is returned.

2. List single user


Parameters
Action: GET
URL: http://yoururl.feedbackroad.com/api/v1/users/with/id/151.xml
Request: Null


Example CURL
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' \ -u 123638dc733ceaf75130303fe6e6010f63868bc0:X -X GET http://yoururl.feedbackroad.com/api/v1/users/with/id/151.xml


Example Response
<?xml version="1.0" encoding="UTF-8"?>
<message client="127.0.0.1" time="1316115319">
  <response>
    <code>200</code>
    <data>
      <users>
        <user>
          <user_id>198</user_id>
          <user_type>moderator</user_type>
          <user_email>barney@flintstones.com</user_email>
          <user_display_name>barney rubble</user_display_name>
          <user_guid>123</user_guid>
          <notification_on_new_idea>1</notification_on_new_idea>
          <notification_on_new_comment>1</notification_on_new_comment>
          <notification_on_update_status>1</notification_on_update_status>
          <notification_on_admin_post>1</notification_on_admin_post>
          <user_cdate>2011-09-14 23:45:14</user_cdate>
          <user_mdate>0000-00-00 00:00:00</user_mdate>
        </user>
      </users>
    </data>
  </response>
</message>

If successful, a 200 (OK) status code is returned.
A 404 (Not Found) status code is returned if the user id cannot be found.

3. Create new user


Parameters
Action: POST
URL: http://yoururl.feedbackroad.com/api/v1/users.xml
Request: 
<user>
    <user_type>user</user_type>
    <user_email>newuser@yahoo.com</user_email>
    <user_display_name>new user</user_display_name>
</user>


Example CURL
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' \ -u 123638dc733ceaf75130303fe6e6010f63868bc0:X -d '
<user>
    <user_type>user</user_type>
    <user_email>newuser@yahoo.com</user_email>
    <user_display_name>new user</user_display_name>
</user>' -X POST http://yoururl.feedbackroad.com/api/v1/users.xml


Example Response
<?xml version="1.0" encoding="UTF-8"?>
<message client="127.0.0.1" time="1315864854">
  <response>
    <code>201</code>
    <data>
      <users>
        <id>151</id>
      </users>
    </data>
  </response>
</message>

If successful, a 201 (Created) status code is returned along with the id of the new user.
A 400 (Bad Request) status code is returned if a required parameter is missing.
A 406 (Not Acceptable) status code is returned if a parameter value is not valid.
A 409 (Conflict) status code is returned if a existing value conflicts with a value you are trying to add.

4. Update user


Parameters
Action: PUT
URL: http://yoururl.feedbackroad.com/api/v1/users/with/id/151.xml
Request: 
<user>
    <user_type>user</user_type>
    <user_email>newuser@yahoo.com</user_email>
    <user_display_name>new user</user_display_name>
</user>


Example CURL
curl -H 'Accept: application/xml' -H 'Content-Type: application/x-www-form-urlencoded' \ -u 123638dc733ceaf75130303fe6e6010f63868bc0:X -d '
<user>
    <user_type>user</user_type>
    <user_email>newuser@yahoo.com</user_email>
    <user_display_name>new user</user_display_name>
</user>' -X PUT http://yoururl.feedbackroad.com/api/v1/users/with/id/151.xml


Example Response
<?xml version="1.0" encoding="UTF-8"?>
<message client="127.0.0.1" time="1315864854">
  <response>
    <code>200</code>
    <data>
      <users>
        <id>151</id>
      </users>
    </data>
  </response>
</message>

If successful, a 200 (OK) status code is returned along with the id of the user updated.
A 400 (Bad Request) status code is returned if a required parameter is missing.
A 404 (Not Found) status code is returned if the user id cannot be found.
A 406 (Not Acceptable) status code is returned if a parameter value is not valid.
A 409 (Conflict) status code is returned if a existing value conflicts with a value you are trying to add.

5. Delete user


Parameters
Action: DELETE
URL: http://yoururl.feedbackroad.com/api/v1/users/with/id/151.xml
Request: Null

Example CURL
curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' \ -u 123638dc733ceaf75130303fe6e6010f63868bc0:X  -X DELETE http://yoururl.feedbackroad.com/api/v1/users/with/id/151.xml

Example Response
<?xml version="1.0" encoding="UTF-8"?>
<message client="127.0.0.1" time="1315864854">
  <response>
    <code>200</code>
    <data>
      <users>
        <id>151</id>
      </users>
    </data>
  </response>
</message>

If successful, a 200 (OK) status code is returned along with the id of the deleted user.
A 404 (Not Found) status code is returned if the user id cannot be found.

collecting customer feedback
Collecting your customers feedback just became a lot easier
Feedback Collection more...


© 2011 www.FeedbackRoad.com
All Rights Reserved