Users |
This page explains how to use the Accompa REST API to retrieve information about users in your Accompa account. |
|
Read a User
|
Reading a user is achieved via a HTTP GET request to its URI. |
|
GET /user/{id} |
Returns a single user account whose integer ID is {id} |
|
RESPONSE |
Status: 200
<user>
<user_id>104</user_id>
<email>mickey.mouse@disney123.com</email>
<username>US-mickey.mouse@disney123.com</username>
<firstname>Mickey</firstname>
<lastname>Mouse</lastname>
<deleted></deleted>
<status>Active</status>
</user> |
If a user account with ID matching {id} exists, an XML response will be generated along with the status code "200". The XML response will contain the data for that particular user account, as shown above.
If a user account with ID matching {id} does not exist, the response HTTP 404 "not found" will be returned. Other errors will return a response other than "200", usually along with an error message in XML format. |
|
GET /user/{email} |
Returns one or more user accounts whose email address is {email}.
NOTE: In Accompa, an email address can be associated with more than one user account. However, each user account will have a unique "username". The API response will include "username" information. |
|
RESPONSE |
Status: 200
<users>
<user>
<user_id>104</user_id>
<email>mickey.mouse@disney123.com</email>
<username>US-mickey.mouse@disney123.com</username>
<firstname>Mickey</firstname>
<lastname>Mouse</lastname>
<deleted></deleted>
<status>Active</status>
</user>
...
<user>
<user_id>106</user_id>
<email>mickey.mouse@disney123.com</email>
<username>EU-mickey.mouse@disney123.com</username>
<firstname>Mickey</firstname>
<lastname>Mouse</lastname>
<deleted></deleted>
<status>Active</status>
</user>
</users> |
If one or more user accounts with email address matching {email} exist, an XML response will be generated along with the status code "200". The XML response will contain the data for one or more matching user accounts, as shown above.
If *no* user accounts with email address matching {email} exist, the response HTTP 404 "not found" will be returned. Other errors will return a response other than "200", usually along with an error message in XML format. |
|
Read List of Users
|
Reading the list of all users on your Accompa account is achieved via a HTTP GET request to its URI. |
|
GET /user |
Returns the list of all users on your Accompa account |
|
RESPONSE |
Status: 200
<users>
<user>
<user_id>104</user_id>
<email>mickey.mouse@disney123.com</email>
<username>US-mickey.mouse@disney123.com</username>
<firstname>Mickey</firstname>
<lastname>Mouse</lastname>
<deleted></deleted>
<status>Active</status>
</user>
<user>
<user_id>106</user_id>
<email>mickey.mouse@disney123.com</email>
<username>EU-mickey.mouse@disney123.com</username>
<firstname>Mickey</firstname>
<lastname>Mouse</lastname>
<deleted></deleted>
<status>Active</status>
</user> <user>
<user_id>107</user_id>
<email>jason.bourne@treadstone.com</email>
<username>jason.bourne@treadstone.com</username>
<firstname>Jason</firstname>
<lastname>Bourne</lastname>
<deleted></deleted>
<status>Active</status>
</user>
...
</users> |
|