Hosting Service Resource¶
Added in 2.5
Provides information on registered hosting services.
Review Board has a list of supported remote hosting services for repositories and bug trackers. These hosting services contain the information needed for Review Board to link with any repositories hosted on that service and access content for display in the diff viewer.
This resource allows for querying that list and determining what capabilities of the hosting service can be used by Review Board.
Details¶
Name | hosting_service |
URI | /api/hosting-services/{hosting_service_id}/ |
Token Policy ID | hosting_service |
HTTP Methods |
|
Parent Resource | |
Child Resources | None |
Fields¶
idString | The hosting service’s unique ID. |
nameString | The name of the hosting service. |
needs_authorizationBoolean | Whether an account must be authorized and linked in order to use this service. |
plansDictionary | Information on account configuration plans supported by the hosting service. These correspond to the Added in 3.0.19 |
self_hostedBoolean | Whether the service is meant to be self-hosted in the network. |
supported_scmtoolsList of String | The comprehensive list of repository types supported by Review Board. Each of these is a registered SCMTool ID or human-readable name. Some of these may not be supported by the service anymore. See |
supports_bug_trackersBoolean | Whether bug trackers are available. |
supports_list_remote_repositoriesBoolean | Whether remote repositories on the hosting service can be listed through the API. |
supports_repositoriesBoolean | Whether repository linking is supported. |
supports_two_factor_authBoolean | Whether two-factor authentication is supported when linking an account. |
visible_scmtoolsList of String | The list of repository types that are shown by Review Board when configuring a new repository. Each of these is a registered SCMTool ID or human-readable name. Added in 3.0.17 |
Links¶
Name |
Method |
Resource |
---|---|---|
accounts | GET |
|
repositories | GET |
|
self | GET |
HTTP GET¶
Returns information on a particular hosting service.
This will cover the capabilities of the hosting service, and information needed to help link repositories and bug trackers hosted on it.
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 |
112 - OAuth2 Missing Scope ErrorHTTP 403 - Forbidden | Your OAuth2 token lacks the necessary scopes for this request. |
113 - OAuth2 Access Denied ErrorHTTP 403 - Forbidden | OAuth2 token access for this resource is prohibited. |
Examples¶
application/vnd.reviewboard.org.hosting-service+json¶
$ curl https://reviews.example.com/api/hosting-services/bitbucket/ -H "Accept: application/json"
HTTP 200 OK
Content-Length: 1885
Content-Type: application/vnd.reviewboard.org.hosting-service+json
ETag: b4eb0820183cf825856054b0cc471dd75d57a77f
Vary: Accept, Cookie
X-Content-Type-Options: nosniff
{
"hosting_service": {
"id": "bitbucket",
"links": {
"accounts": {
"href": "https://reviews.example.com/api/hosting-service-accounts/?service=bitbucket",
"method": "GET"
},
"repositories": {
"href": "https://reviews.example.com/api/repositories/?hosting-service=bitbucket",
"method": "GET"
},
"self": {
"href": "https://reviews.example.com/api/hosting-services/bitbucket/",
"method": "GET"
}
},
"name": "Bitbucket",
"needs_authorization": true,
"plans": {
"other-user": {
"fields": {
"bitbucket_other_user_repo_name": {
"help_text": "The name of the repository. This is the <repo_name> in https://bitbucket.org/<username>/<repo_name>/",
"name": "Repository name",
"required": true
},
"bitbucket_other_user_username": {
"help_text": "The username of the user who owns the repository. This is the <username> in https://bitbucket.org/<username>/<repo_name>/",
"name": "Username",
"required": true
}
},
"name": "Other User"
},
"personal": {
"fields": {
"bitbucket_repo_name": {
"help_text": "The name of the repository. This is the <repo_name> in https://bitbucket.org/<username>/<repo_name>/",
"name": "Repository name",
"required": true
}
},
"name": "Personal"
},
"team": {
"fields": {
"bitbucket_team_name": {
"help_text": "The name of the team. This is the <team_name> in https://bitbucket.org/<team_name>/<repo_name>/",
"name": "Team name",
"required": true
},
"bitbucket_team_repo_name": {
"help_text": "The name of the repository. This is the <repo_name> in https://bitbucket.org/<team_name>/<repo_name>/",
"name": "Repository name",
"required": true
}
},
"name": "Team"
}
},
"self_hosted": false,
"supported_scmtools": [
"Git",
"Mercurial"
],
"supports_bug_trackers": true,
"supports_list_remote_repositories": false,
"supports_repositories": true,
"supports_two_factor_auth": false,
"visible_scmtools": [
"Git"
]
},
"stat": "ok"
}