Screenshot Resource¶
A resource representing a screenshot on a review request.
Details¶
Name | screenshot |
URI | /api/review-requests/{review_request_id}/screenshots/{screenshot_id}/ |
Token Policy ID | screenshot |
HTTP Methods | |
Parent Resource | |
Child Resources |
Fields¶
absolute_urlString | The absolute URL of the screenshot file. Added in 2.0 |
captionString | The screenshot’s descriptive caption. |
filenameString | The base file name of the screenshot’s image. Added in 1.7.10 |
idInteger | The numeric ID of the screenshot. |
pathString | The path of the screenshot’s image file, relative to the media directory configured on the Review Board server. |
review_urlString | The URL to the review UI for this screenshot. Added in 1.7.10 |
thumbnail_urlString | The URL of the screenshot’s thumbnail file. If this is not an absolute URL (for example, if it is just a path), then it’s relative to the Review Board server’s URL. |
urlString | Deprecated The URL of the screenshot file. If this is not an absolute URL (for example, if it is just a path), then it’s relative to the Review Board server’s URL. This is deprecated and will be removed in a future version. Deprecated in 2.0 |
Links¶
Name |
Method |
Resource |
---|---|---|
delete | DELETE |
|
screenshot_comments | GET |
|
self | GET |
|
update | PUT |
HTTP DELETE¶
Deletes the screenshot.
This will remove the screenshot from the draft review request. This cannot be undone.
Deleting a screenshot will automatically create a new review request draft, if one doesn’t already exist. The screenshot won’t be actually removed until the review request draft is published.
This can be used to remove old screenshots that were previously shown, as well as newly added screenshots that were part of the draft.
Instead of a payload response on success, this will return HTTP 204 No Content.
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. |
HTTP GET¶
Returns the serialized object for the resource.
This will require login if anonymous access isn’t enabled on the site.
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. |
HTTP PUT¶
Updates the screenshot’s data.
This allows updating the screenshot. The caption, currently, is the only thing that can be updated.
Updating a screenshot will automatically create a new review request draft, if one doesn’t already exist. The updates won’t be public until the review request draft is published.
Request Parameters¶
captionString | The new caption for the screenshot. |
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 |
105 - Invalid Form DataHTTP 400 - Bad Request | One or more fields had errors |
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.screenshot+json¶
$ curl https://reviews.example.com/api/review-requests/8/screenshots/1/ -H "Accept: application/json"
HTTP 200 OK
Content-Length: 883
Content-Type: application/vnd.reviewboard.org.screenshot+json
ETag: 303f198d1e049627a83e7a81fcf082613fd2f191
Vary: Accept, Cookie
X-Content-Type-Options: nosniff
{
"screenshot": {
"absolute_url": "https://reviews.example.com/media/uploaded/images/2010/08/13/screenshot1.png",
"caption": "Example Screenshot",
"filename": "screenshot1.png",
"id": 1,
"links": {
"delete": {
"href": "https://reviews.example.com/api/review-requests/8/screenshots/1/",
"method": "DELETE"
},
"screenshot_comments": {
"href": "https://reviews.example.com/api/review-requests/8/screenshots/1/screenshot-comments/",
"method": "GET"
},
"self": {
"href": "https://reviews.example.com/api/review-requests/8/screenshots/1/",
"method": "GET"
},
"update": {
"href": "https://reviews.example.com/api/review-requests/8/screenshots/1/",
"method": "PUT"
}
},
"path": "uploaded/images/2010/08/13/screenshot1.png",
"review_url": "/r/8/s/1/",
"thumbnail_url": "/media/uploaded/images/2010/08/13/screenshot1_400x100.png",
"url": "/media/uploaded/images/2010/08/13/screenshot1.png"
},
"stat": "ok"
}