Jump to >

Draft Screenshot Resource

Provides information on new screenshots being added to a draft of a review request.

These are screenshots that will be shown once the pending review request draft is published.

Details

Name draft_screenshot
URI /api/review-requests/{review_request_id}/draft/screenshots/{screenshot_id}/
Token Policy ID draft_screenshot
HTTP Methods
  • DELETE - Deletes the screenshot from the draft.
  • GET - Returns the serialized object for the resource.
  • PUT - Updates the screenshot’s data.
Parent Resource Draft Screenshot List Resource
Child Resources None
Anonymous Access No

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 from the draft.

This will remove the screenshot from the draft review request. This cannot be undone.

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 in a draft. The caption, currently, is the only thing that can be updated.

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.draft-screenshot+json

$ curl http://reviews.example.com/api/review-requests/8/draft/screenshots/1/ -H "Accept: application/json"
Vary: Accept, Cookie
ETag: 144b25c9cfdab565eda9993e779a80b9f3196584
Content-Type: application/vnd.reviewboard.org.draft-screenshot+json
X-Content-Type-Options: nosniff
{
  "draft_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/draft/screenshots/1/", 
        "method": "DELETE"
      }, 
      "self": {
        "href": "http://reviews.example.com/api/review-requests/8/draft/screenshots/1/", 
        "method": "GET"
      }, 
      "update": {
        "href": "http://reviews.example.com/api/review-requests/8/draft/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"
}