Question

API 3.0 -- run_look() PNG Format

  • 1 March 2016
  • 4 replies
  • 254 views

Userlevel 2

Hello Looker –


I’ve been doing some experimenting with the API 3.0. I’d like to be able export images of looks. I’m able to get data back when I choose format: JSON, but I get a 500 error when I have the format set to: “png”.


Here’s what I’m inputting:


Here’s the output:


Thanks!


Andrew


4 replies

Userlevel 2

I get a 200 response now. Thanks!


AK

Userlevel 3

Hey @Andrew_Kraemer,


We noticed that this is an issue with API only users not having a specific account setup complete that blocks PhantomJS from making the request to the Look. (there’s a page that asks a user if they’re ok with newsletters and product releases that needs to be completed before Looks are accessible to that user) This is a known bug and we’re working on removing the bottleneck this request does. I’ve taken a look and completed this step for you and also turned off Newsletters/Release Notes emails. You can change this if you wish in your account settings.


Also, the swagger page won’t display the png after you get a response because theres no MIME type set yet on the front end, but you should still get a PNG from the api request!


Can you give it a try again and let us know if it yields a 200?

Userlevel 2

Next question –


I was hoping to get back the visualization – not an image of the data table. How do I get a PNG of the visualization back?


AK

Userlevel 2

Anicia –


Thanks for the update. When I run run_look(look_id,format), I do get an image back, but it is just of the datatable – not the visualization (like a bar chart). Is there a way to get a png – not just an iFrame – of the visualization?


Best,


Andrew

Reply