Root List Resource¶
Name | root |
URI | /api/ |
Description | Links to all the main resources, including URI templates to resources anywhere in the tree. This should be used as a starting point for any clients that need to access any resources in the API. By browsing through the resource tree instead of hard-coding paths, your client can remain compatible with any changes in the resource URI scheme. |
HTTP Methods |
|
Parent Resource | None. |
Child Resources | |
Anonymous Access | Yes |
Links¶
Name | Method | Resource |
---|---|---|
groups | GET | Review Group List Resource |
info | GET | Server Info Resource |
repositories | GET | Repository List Resource |
review_requests | GET | Review Request List Resource |
self | GET | Root List Resource |
session | GET | Session Resource |
users | GET | User List Resource |
HTTP GET¶
Handles HTTP GETs to list resources.
By default, this will query for a list of objects and return the list in a serialized form.
Request Parameters¶
Field | Type | Description |
---|---|---|
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. |
Examples¶
application/json¶
{
"links": {
"groups": {
"href": "http://reviews.example.com/api/groups/",
"method": "GET"
},
"info": {
"href": "http://reviews.example.com/api/info/",
"method": "GET"
},
"repositories": {
"href": "http://reviews.example.com/api/repositories/",
"method": "GET"
},
"review_requests": {
"href": "http://reviews.example.com/api/review-requests/",
"method": "GET"
},
"self": {
"href": "http://reviews.example.com/api/",
"method": "GET"
},
"session": {
"href": "http://reviews.example.com/api/session/",
"method": "GET"
},
"users": {
"href": "http://reviews.example.com/api/users/",
"method": "GET"
}
},
"stat": "ok",
"uri_templates": {
"diff": "http://reviews.example.com/api/review-requests/{review_request_id}/diffs/{diff_revision}/",
"diff_comment": "http://reviews.example.com/api/review-requests/{review_request_id}/reviews/{review_id}/replies/{reply_id}/diff-comments/{comment_id}/",
"diff_comments": "http://reviews.example.com/api/review-requests/{review_request_id}/reviews/{review_id}/replies/{reply_id}/diff-comments/",
"diffs": "http://reviews.example.com/api/review-requests/{review_request_id}/diffs/",
"draft": "http://reviews.example.com/api/review-requests/{review_request_id}/draft/",
"file": "http://reviews.example.com/api/review-requests/{review_request_id}/diffs/{diff_revision}/files/{filediff_id}/",
"files": "http://reviews.example.com/api/review-requests/{review_request_id}/diffs/{diff_revision}/files/",
"group": "http://reviews.example.com/api/groups/{group_name}/",
"groups": "http://reviews.example.com/api/groups/",
"info": "http://reviews.example.com/api/info/",
"last_update": "http://reviews.example.com/api/review-requests/{review_request_id}/last-update/",
"replies": "http://reviews.example.com/api/review-requests/{review_request_id}/reviews/{review_id}/replies/",
"reply": "http://reviews.example.com/api/review-requests/{review_request_id}/reviews/{review_id}/replies/{reply_id}/",
"reply_draft": "http://reviews.example.com/api/review-requests/{review_request_id}/reviews/{review_id}/replies/draft/",
"repositories": "http://reviews.example.com/api/repositories/",
"repository": "http://reviews.example.com/api/repositories/{repository_id}/",
"review": "http://reviews.example.com/api/review-requests/{review_request_id}/reviews/{review_id}/",
"review_draft": "http://reviews.example.com/api/review-requests/{review_request_id}/reviews/draft/",
"review_request": "http://reviews.example.com/api/review-requests/{review_request_id}/",
"review_requests": "http://reviews.example.com/api/review-requests/",
"reviews": "http://reviews.example.com/api/review-requests/{review_request_id}/reviews/",
"root": "http://reviews.example.com/api/",
"screenshot": "http://reviews.example.com/api/review-requests/{review_request_id}/screenshots/{screenshot_id}/",
"screenshot_comment": "http://reviews.example.com/api/review-requests/{review_request_id}/reviews/{review_id}/screenshot-comments/{comment_id}/",
"screenshot_comments": "http://reviews.example.com/api/review-requests/{review_request_id}/screenshots/{screenshot_id}/screenshot-comments/",
"screenshots": "http://reviews.example.com/api/review-requests/{review_request_id}/screenshots/",
"session": "http://reviews.example.com/api/session/",
"user": "http://reviews.example.com/api/users/{username}/",
"users": "http://reviews.example.com/api/users/",
"watched": "http://reviews.example.com/api/users/{username}/watched/",
"watched_review_group": "http://reviews.example.com/api/users/{username}/watched/review-groups/{watched_obj_id}/",
"watched_review_groups": "http://reviews.example.com/api/users/{username}/watched/review-groups/",
"watched_review_request": "http://reviews.example.com/api/users/{username}/watched/review-requests/{watched_obj_id}/",
"watched_review_requests": "http://reviews.example.com/api/users/{username}/watched/review-requests/"
}
}
application/xml¶
<?xml version="1.0" encoding="utf-8"?>
<rsp>
<stat>ok</stat>
<uri_templates>
<diff_comments>http://reviews.example.com/api/review-requests/{review_request_id}/reviews/{review_id}/replies/{reply_id}/diff-comments/</diff_comments>
<watched_review_groups>http://reviews.example.com/api/users/{username}/watched/review-groups/</watched_review_groups>
<session>http://reviews.example.com/api/session/</session>
<file>http://reviews.example.com/api/review-requests/{review_request_id}/diffs/{diff_revision}/files/{filediff_id}/</file>
<replies>http://reviews.example.com/api/review-requests/{review_request_id}/reviews/{review_id}/replies/</replies>
<diff>http://reviews.example.com/api/review-requests/{review_request_id}/diffs/{diff_revision}/</diff>
<screenshots>http://reviews.example.com/api/review-requests/{review_request_id}/screenshots/</screenshots>
<watched_review_request>http://reviews.example.com/api/users/{username}/watched/review-requests/{watched_obj_id}/</watched_review_request>
<group>http://reviews.example.com/api/groups/{group_name}/</group>
<screenshot>http://reviews.example.com/api/review-requests/{review_request_id}/screenshots/{screenshot_id}/</screenshot>
<review>http://reviews.example.com/api/review-requests/{review_request_id}/reviews/{review_id}/</review>
<watched_review_group>http://reviews.example.com/api/users/{username}/watched/review-groups/{watched_obj_id}/</watched_review_group>
<last_update>http://reviews.example.com/api/review-requests/{review_request_id}/last-update/</last_update>
<diff_comment>http://reviews.example.com/api/review-requests/{review_request_id}/reviews/{review_id}/replies/{reply_id}/diff-comments/{comment_id}/</diff_comment>
<draft>http://reviews.example.com/api/review-requests/{review_request_id}/draft/</draft>
<reply>http://reviews.example.com/api/review-requests/{review_request_id}/reviews/{review_id}/replies/{reply_id}/</reply>
<review_request>http://reviews.example.com/api/review-requests/{review_request_id}/</review_request>
<files>http://reviews.example.com/api/review-requests/{review_request_id}/diffs/{diff_revision}/files/</files>
<review_draft>http://reviews.example.com/api/review-requests/{review_request_id}/reviews/draft/</review_draft>
<users>http://reviews.example.com/api/users/</users>
<repository>http://reviews.example.com/api/repositories/{repository_id}/</repository>
<watched>http://reviews.example.com/api/users/{username}/watched/</watched>
<screenshot_comments>http://reviews.example.com/api/review-requests/{review_request_id}/screenshots/{screenshot_id}/screenshot-comments/</screenshot_comments>
<user>http://reviews.example.com/api/users/{username}/</user>
<groups>http://reviews.example.com/api/groups/</groups>
<watched_review_requests>http://reviews.example.com/api/users/{username}/watched/review-requests/</watched_review_requests>
<info>http://reviews.example.com/api/info/</info>
<diffs>http://reviews.example.com/api/review-requests/{review_request_id}/diffs/</diffs>
<review_requests>http://reviews.example.com/api/review-requests/</review_requests>
<repositories>http://reviews.example.com/api/repositories/</repositories>
<reviews>http://reviews.example.com/api/review-requests/{review_request_id}/reviews/</reviews>
<reply_draft>http://reviews.example.com/api/review-requests/{review_request_id}/reviews/{review_id}/replies/draft/</reply_draft>
<screenshot_comment>http://reviews.example.com/api/review-requests/{review_request_id}/reviews/{review_id}/screenshot-comments/{comment_id}/</screenshot_comment>
<root>http://reviews.example.com/api/</root>
</uri_templates>
<links>
<info>
<href>http://reviews.example.com/api/info/</href>
<method>GET</method>
</info>
<users>
<href>http://reviews.example.com/api/users/</href>
<method>GET</method>
</users>
<self>
<href>http://reviews.example.com/api/</href>
<method>GET</method>
</self>
<repositories>
<href>http://reviews.example.com/api/repositories/</href>
<method>GET</method>
</repositories>
<session>
<href>http://reviews.example.com/api/session/</href>
<method>GET</method>
</session>
<groups>
<href>http://reviews.example.com/api/groups/</href>
<method>GET</method>
</groups>
<review_requests>
<href>http://reviews.example.com/api/review-requests/</href>
<method>GET</method>
</review_requests>
</links>
</rsp>