art-institute-of-chicago / data-aggregator

An API of public data collected from several different systems at the Art Institute of Chicago
GNU Affero General Public License v3.0
65 stars 6 forks source link

Image API not working #84

Open yzalokar opened 1 month ago

yzalokar commented 1 month ago

I am having trouble retrieving an image from the following api endpoint: https://www.artic.edu/iiif/2/1adf2696-8489-499b-cad2-821d7fde4b33/full/843,/0/default.jpg

The API response is always 404 not found. I tested this with various different image id's.

On your website, where you use this api call, there is no image shown, which indicates that the API doesn't return an image.

Attached you have a screenshot of my response in postman and also a screenshot from your website, where the image is missing.

Can you please look into this? I am trying to develop a website based on your API. 25A31412-D30B-4252-B254-15798519BA0C

Screenshot 2024-10-29 at 15 35 04
nikhiltri commented 1 month ago

What query is providing you with the image ID 1adf2696-8489-499b-cad2-821d7fde4b33?

yzalokar commented 1 month ago

This specific image ID is displayed in your documentation: https://api.artic.edu/docs/#images

But I also tried it with different image id's which I got through: https://api.artic.edu/api/v1/artworks or: https://api.artic.edu/api/v1/artworks/48883?fields=id,title,image_id

48883 is the ID from the first artwork I get when calling: https://api.artic.edu/api/v1/artworks

Screenshot 2024-10-29 at 19 24 45
nikhiltri commented 1 month ago

Ah, the specific ID that's used in our documentation may not necessarily by available anymore. What you’ll want to do is take the image_id that the /artworks endpoint provides you and plug that into the URL you’re using.

So in the case of the artwork with the ID 48883, its image_id is ac167e1a-78f0-2621-5676-58f38a6c16f3. Plug that into the URL you’re constructing and you’ll end up with:

https://www.artic.edu/iiif/2/ac167e1a-78f0-2621-5676-58f38a6c16f3/full/843,/0/default.jpg

Which resolves to the image for artwork 43338.

yzalokar commented 1 month ago

Now I got it. The problem was sitting behind the pc 😄. Tanks alot!