Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Sv translation
languageen

/api/reports/:id/images

Posts an image to the report with the specified ID.

Resource Information

Request Parameters

Parameters

Detail

Example

id

ID of the report for which to post an image. You can find the ID in the response to /api/reports.

123

name

(Optional) New image view name.

My View Name
fileImage file. 
width(Optional) Query parameter specifying view width (percentage value).30
height(Optional) Query parameter specifying view height (absolute value in pixels).500

Sample Request / Response

Using curl (you have to use "@" character before full path to image file):

Code Block
curl POST -H "Content-Type: multipart/form-data" -H "Authorization: OAuth realm=\"https://service.belladati.com/\", oauth_consumer_key=\"myConsumer\", oauth_token=\"mh7an9dkrg59\", oauth_timestamp=\"135131231\", oauth_nonce=\"randomString\"" -F "name=My View Name" -F "file=@/path/to/file.png" "https://service.belladati.com/api/reports/123/images?width=30&height=500"

When the image has been posted successfully, the response has the HTTP status code 200 and the content contains image view ID.

Code Block
{
    "viewId":"34-uRSxwaBSD"
}

...