Beanstalk

Version Control with a Human Face

User model

Admin privileges required for these API methods.

Find all users

http-request
GET /api/users.xml

Click to expand…

http-response
<?xml version="1.0" encoding="UTF-8"?>
<users type="array">
  <user>
    <account-id type="integer">44253</account-id>
    <admin type="boolean">true</admin>
    <created-at type="datetime">
      2007-05-16T23:52:31Z
    </created-at>
    <email>email@example.com</email>
    <first-name>Dima</first-name>
    <id type="integer">624622</id>
    <last-name>Sabanin</last-name>
    <login>sdmitry</login>
    <timezone>Krasnoyarsk</timezone>
    <updated-at type="datetime">
      2009-04-20T19:05:16Z
    </updated-at>
  </user>
  <user>
    <account-id type="integer">56346</account-id>
    <admin type="boolean" nil="true"></admin>
    <created-at type="datetime">
      2007-05-17T00:55:39Z
    </created-at>
    <email>fakeemail_2@nowhere.example.com</email>
    <first-name>Ilya</first-name>
    <id type="integer">2349</id>
    <last-name>Sabanin</last-name>
    <login>ilya</login>
    <timezone nil="true"></timezone>
    <updated-at type="datetime">
      2009-04-20T19:05:18Z
    </updated-at>
  </user>
</users>
ruby
Beanstalk::API::User.find(:all)

Find a single user

User ID is required. Number 27 in the examples below.

http-request
GET /api/users/27.xml

Click to expand…

http-response
<?xml version="1.0" encoding="UTF-8"?>
<user>
  <account-id type="integer">44253</account-id>
  <admin type="boolean">true</admin>
  <created-at type="datetime">
    2007-05-16T23:52:31Z
  </created-at>
  <email>email@example.com</email>
  <first-name>Dima</first-name>
  <id type="integer">624622</id>
  <last-name>Sabanin</last-name>
  <login>sdmitry</login>
  <timezone>Krasnoyarsk</timezone>
  <updated-at type="datetime">
    2009-04-20T19:05:16Z
  </updated-at>
</user>
ruby
Beanstalk::API::User.find(27)