You can retrieve the picture from Exact Online through the same secured channel used for the APIs as a blob by using:
select httpget(pictureurl) picture
from me
This retrieves the picture, which is in the example below automatically rendered by Query Tool (50 shades of gray design):
Note that if you do a lot of httpget
, each one occurs some overhead. Especially when downloading thousands of pictures, you will incur a lot of load on Exact Online. Do it only when necessary.
As an alternative, you can also use:
select *
from exactonlinexml..items
The XML API of Exact Online returns the picture in the payload itself, reducing the number of round trips. Disadvantage is that if you have a 15.000 x 15.000 pixels x 32 depth image, you will get... exactly that, and it is huge and great and amazing. Please note that XML API uses HTTP compression (gzip).
Advantage of the URL used by the REST API is that it creates a thumbnail. That will generate some load on the Exact server (I don't know whether and how smart they cache), but reduces network constraints. Please note that REST API tables do NOT use HTTP compression, so compressible output still takes a lot of bandwidth. As you can see, there are a lot of design decisions to make and test, despite the ease of use of SQL, when doing large downloads and/or uploads.
You can probably fiddle with the thumbnail size as shown below:
What does the error say? Also are you sure its an image and now a webpage? You can check that by using F12 browser developers tools and in the network tab. – RamonRobben – 2017-02-23T09:59:41.687
I get an 'Oops'-error in return. But with the solution in the answer below I'm seeing the image now! – RH1985 – 2017-02-23T10:15:41.223