Root List Resource¶
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.
This also contains information on the server and the capabilities of the API. This information was formerly provided only by the Server Info resource, but has been moved here as a convenience to clients.
Details¶
Name | root |
URI | /api/ |
Token Policy ID | root |
HTTP Methods |
|
Parent Resource | None. |
Child Resources |
|
Anonymous Access | Yes, if anonymous site access is enabled |
Links¶
Name | Method | Resource |
---|---|---|
default_reviewers | GET | Default Reviewer List Resource |
extensions | GET | Extension List Resource |
groups | GET | Review Group List Resource |
hosting_service_accounts | GET | Hosting Service Account List Resource |
hosting_services | GET | Hosting Service List Resource |
info | GET | Server Info Resource |
repositories | GET | Repository List Resource |
review_requests | GET | Review Request List Resource |
search | GET | Search Resource |
self | GET | Root List Resource |
session | GET | Session Resource |
users | GET | User List Resource |
validation | GET | Validation List Resource |
webhooks | GET | WebHook List Resource |
HTTP GET¶
Retrieves the list of top-level resources and templates.
Errors¶
100 - Does Not ExistHTTP 404 - Not Found | Object does not exist |
101 - Permission DeniedHTTP 403 - Forbidden | You don’t have permission for this |
103 - Not Logged InHTTP 401 - Unauthorized | You are not logged in |
Examples¶
application/vnd.reviewboard.org.root+json¶
$ curl http://reviews.example.com/api/ -H "Accept: application/json"
Vary: Accept, Cookie
ETag: cb3200fd154754d623499b18c7506cdacb05a557
Content-Type: application/vnd.reviewboard.org.root+json
X-Content-Type-Options: nosniff
{
"capabilities": {
"diffs": {
"base_commit_ids": true,
"moved_files": true,
"validation": {
"base_commit_ids": true
}
},
"review_requests": {
"commit_ids": true,
"trivial_publish": true
},
"scmtools": {
"git": {
"empty_files": true
},
"mercurial": {
"empty_files": true
},
"perforce": {
"empty_files": true,
"moved_files": true
},
"svn": {
"empty_files": true
}
},
"text": {
"can_include_raw_values": true,
"markdown": true,
"per_field_text_types": true
}
},
"links": {
"default_reviewers": {
"href": "http://reviews.example.com/api/default-reviewers/",
"method": "GET"
},
"extensions": {
"href": "http://reviews.example.com/api/extensions/",
"method": "GET"
},
"groups": {
"href": "http://reviews.example.com/api/groups/",
"method": "GET"
},
"hosting_service_accounts": {
"href": "http://reviews.example.com/api/hosting-service-accounts/",
"method": "GET"
},
"hosting_services": {
"href": "http://reviews.example.com/api/hosting-services/",
"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"
},
"search": {
"href": "http://reviews.example.com/api/search/",
"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"
},
"validation": {
"href": "http://reviews.example.com/api/validation/",
"method": "GET"
},
"webhooks": {
"href": "http://reviews.example.com/api/webhooks/",
"method": "GET"
}
},
"product": {
"is_release": true,
"name": "Review Board",
"package_version": "2.5.17",
"version": "2.5.17"
},
"site": {
"administrators": [
{
"email": "admin@example.com",
"name": "Example Admin"
}
],
"time_zone": "UTC",
"url": "http://example.com/"
},
"stat": "ok",
"uri_templates": {
"api_token": "http://reviews.example.com/api/users/{username}/api-tokens/{api_token_id}/",
"api_tokens": "http://reviews.example.com/api/users/{username}/api-tokens/",
"archived_review_request": "http://reviews.example.com/api/users/{username}/archived-review-requests/{review_request_id}/",
"archived_review_requests": "http://reviews.example.com/api/users/{username}/archived-review-requests/",
"branches": "http://reviews.example.com/api/repositories/{repository_id}/branches/",
"change": "http://reviews.example.com/api/review-requests/{review_request_id}/changes/{change_id}/",
"changes": "http://reviews.example.com/api/review-requests/{review_request_id}/changes/",
"commits": "http://reviews.example.com/api/repositories/{repository_id}/commits/",
"default_reviewer": "http://reviews.example.com/api/default-reviewers/{default_reviewer_id}/",
"default_reviewers": "http://reviews.example.com/api/default-reviewers/",
"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/",
"diff_context": "http://reviews.example.com/api/review-requests/{review_request_id}/diff-context/",
"diff_file_attachment": "http://reviews.example.com/api/repositories/{repository_id}/diff-file-attachments/{file_attachment_id}/",
"diff_file_attachments": "http://reviews.example.com/api/repositories/{repository_id}/diff-file-attachments/",
"diff_validation": "http://reviews.example.com/api/validation/diffs/",
"diffs": "http://reviews.example.com/api/review-requests/{review_request_id}/diffs/",
"draft": "http://reviews.example.com/api/review-requests/{review_request_id}/draft/",
"extension": "http://reviews.example.com/api/extensions/{extension_name}/",
"extensions": "http://reviews.example.com/api/extensions/",
"file": "http://reviews.example.com/api/review-requests/{review_request_id}/diffs/{diff_revision}/files/{filediff_id}/",
"file_attachment": "http://reviews.example.com/api/review-requests/{review_request_id}/file-attachments/{file_attachment_id}/",
"file_attachment_comment": "http://reviews.example.com/api/review-requests/{review_request_id}/reviews/{review_id}/file-attachment-comments/{comment_id}/",
"file_attachment_comments": "http://reviews.example.com/api/review-requests/{review_request_id}/file-attachments/{file_attachment_id}/file-attachment-comments/",
"file_attachments": "http://reviews.example.com/api/review-requests/{review_request_id}/file-attachments/",
"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/",
"hosting_service": "http://reviews.example.com/api/hosting-services/{hosting_service_id}/",
"hosting_service_account": "http://reviews.example.com/api/hosting-service-accounts/{account_id}/",
"hosting_service_accounts": "http://reviews.example.com/api/hosting-service-accounts/",
"hosting_services": "http://reviews.example.com/api/hosting-services/",
"info": "http://reviews.example.com/api/info/",
"last_update": "http://reviews.example.com/api/review-requests/{review_request_id}/last-update/",
"muted_review_request": "http://reviews.example.com/api/users/{username}/muted-review-requests/{review_request_id}/",
"muted_review_requests": "http://reviews.example.com/api/users/{username}/muted-review-requests/",
"original_file": "http://reviews.example.com/api/review-requests/{review_request_id}/diffs/{diff_revision}/files/{filediff_id}/original-file/",
"patched_file": "http://reviews.example.com/api/review-requests/{review_request_id}/diffs/{diff_revision}/files/{filediff_id}/patched-file/",
"remote_repositories": "http://reviews.example.com/api/hosting-service-accounts/{account_id}/remote-repositories/",
"remote_repository": "http://reviews.example.com/api/hosting-service-accounts/{account_id}/remote-repositories/{repository_id}/",
"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_group_user": "http://reviews.example.com/api/groups/{group_name}/users/{username}/",
"review_group_users": "http://reviews.example.com/api/groups/{group_name}/users/",
"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/",
"search": "http://reviews.example.com/api/search/{username}/",
"session": "http://reviews.example.com/api/session/",
"user": "http://reviews.example.com/api/users/{username}/",
"users": "http://reviews.example.com/api/users/",
"validation": "http://reviews.example.com/api/validation/",
"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/",
"webhook": "http://reviews.example.com/api/webhooks/{webhook_id}/",
"webhooks": "http://reviews.example.com/api/webhooks/"
}
}