Hosting Service Account List Resource¶
Name | hosting_service_accounts |
URI | /api/hosting-service-accounts/ |
Description | Provides information and allows linking of hosting service accounts. The list of accounts tied to hosting services can be retrieved, and new accounts can be linked through an HTTP POST. |
HTTP Methods | |
Parent Resource | Root List Resource |
Child Resources | |
Anonymous Access | Yes, if anonymous site access is enabled |
Links¶
Name | Method | Resource |
---|---|---|
create | POST | Hosting Service Account List Resource |
self | GET | Hosting Service Account List Resource |
HTTP GET¶
Retrieves the list of accounts on the server.
This will only list visible accounts. Any account that the administrator has hidden will be excluded from the list.
Request Parameters¶
Field | Type | Description |
---|---|---|
counts-only (optional) | Boolean | If specified, a single count field is returned with the number of results, instead of the results themselves. |
max-results (optional) | Integer | The maximum number of results to return in this list. By default, this is 25. |
start (optional) | Integer | The 0-based index of the first result in the list. The start index is usually the previous start index plus the number of previous results. By default, this is 0. |
HTTP POST¶
Request Parameters¶
Field | Type | Description |
---|---|---|
password (optional) | String | The password on the account, if the hosting service needs it. |
service_id (required) | String | The registered ID of the service for the account. |
username (required) | String | The username on the account. |
Examples¶
application/vnd.reviewboard.org.hosting-service-accounts+json¶
{
"hosting_service_accounts": [
{
"id": 1,
"links": {
"self": {
"href": "http://reviews.example.com/api/hosting-service-accounts/1/",
"method": "GET"
}
},
"service": null,
"username": "testuser"
}
],
"links": {
"create": {
"href": "http://reviews.example.com/api/hosting-service-accounts/",
"method": "POST"
},
"self": {
"href": "http://reviews.example.com/api/hosting-service-accounts/",
"method": "GET"
}
},
"stat": "ok",
"total_results": 1
}
application/vnd.reviewboard.org.hosting-service-accounts+xml¶
<?xml version="1.0" encoding="utf-8"?>
<rsp>
<total_results>1</total_results>
<stat>ok</stat>
<hosting_service_accounts>
<array>
<item>
<username>testuser</username>
<service>
</service>
<id>1</id>
<links>
<self>
<href>http://reviews.example.com/api/hosting-service-accounts/1/</href>
<method>GET</method>
</self>
</links>
</item>
</array>
</hosting_service_accounts>
<links>
<self>
<href>http://reviews.example.com/api/hosting-service-accounts/</href>
<method>GET</method>
</self>
<create>
<href>http://reviews.example.com/api/hosting-service-accounts/</href>
<method>POST</method>
</create>
</links>
</rsp>