Jump to >

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
  • DELETE - Deletes the screenshot.
  • GET - Returns the serialized object for the resource.
  • PUT - Updates the screenshot’s data.
Parent Resource Screenshot List Resource
Child Resources
Anonymous Access Yes, if anonymous site access is enabled

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

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 http://reviews.example.com/api/review-requests/8/screenshots/1/ -H "Accept: application/json"
Vary: Accept, Cookie
ETag: c9671902dd65f9c7dbeae6abb98c972c899692dc
Content-Type: application/vnd.reviewboard.org.screenshot+json
X-Content-Type-Options: nosniff
{
  "screenshot": {
    "absolute_url": "http://reviews.example.com/media/uploaded/images/2010/08/13/screenshot1.png", 
    "caption": "Example Screenshot", 
    "filename": "screenshot1.png", 
    "id": 1, 
    "links": {
      "delete": {
        "href": "http://reviews.example.com/api/review-requests/8/screenshots/1/", 
        "method": "DELETE"
      }, 
      "screenshot_comments": {
        "href": "http://reviews.example.com/api/review-requests/8/screenshots/1/screenshot-comments/", 
        "method": "GET"
      }, 
      "self": {
        "href": "http://reviews.example.com/api/review-requests/8/screenshots/1/", 
        "method": "GET"
      }, 
      "update": {
        "href": "http://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"
}