Medias


Introduction

With Navigart 3 API, artworks have medias and one can alse have informations about medias if the endpoint is activated.

Informations about medias in artworks

Artworks have medias, so in order to accelerate treatment, informations about medias are duplicated in artwork informations. Let's see it in one example : curl http://api.navigart.fr/123/artworks/360000000000128' | jq '.results[0]._source.ua.medias' Informations about medias for this artworks are available in results[0]._source.ua.medias, which is an array of medias. Note : they are in results[0] because there is only one artwork for this query, because we ask API to give us informations about only one artwor.

Here is the response :

 [
   {
       "_id": "9000000080493",
       "type": "image",
       "legend": " ",
       "copyright": "© Bernard Faucon",
       "file_name": "3V/01/3V01029.jpg",
       "url_template": "https://images.navigart.fr/{size}/{file_name}",
       "max_width": 1000,
       "max_height": 999,
       "box_width": 255,
       "box_height": 255,
       "header_aggregate": false
   },
   {
       "_id": "9000000080494",
       "type": "image",
       "legend": " ",
       "copyright": "© Bernard Faucon",
       "file_name": "3V/01/3V01030.jpg",
       "url_template": "https://images.navigart.fr/{size}/{file_name}",
       "max_width": 991,
       "max_height": 1000,
       "box_width": 253,
       "box_height": 255,
       "header_aggregate": false
   },
   {
       "_id": "9000000080577",
       "type": "image",
       "legend": " ",
       "copyright": "© Bernard Faucon",
       "file_name": "3V/01/3V01115.jpg",
       "url_template": "https://images.navigart.fr/{size}/{file_name}",
       "max_width": 982,
       "max_height": 1000,
       "box_width": 250,
       "box_height": 255,
       "header_aggregate": false
   },
   {
       "_id": "9000000079959",
       "type": "image",
       "legend": "Visuel provisoire ",
       "copyright": "© Bernard Faucon",
       "file_name": "3V/00/3V00098.jpg",
       "url_template": "https://images.navigart.fr/{size}/{file_name}",
       "max_width": 1000,
       "max_height": 984,
       "box_width": 259,
       "box_height": 255,
       "header_aggregate": false
   },
   {
       "_id": "9000000079961",
       "type": "image",
       "legend": "Visuel provisoire ",
       "copyright": "© Bernard Faucon",
       "file_name": "3V/00/3V00103.jpg",
       "url_template": "https://images.navigart.fr/{size}/{file_name}",
       "max_width": 989,
       "max_height": 1000,
       "box_width": 252,
       "box_height": 255,
       "header_aggregate": false
   },
   {
       "_id": "9000000080198",
       "type": "image",
       "legend": " ",
       "copyright": "© Bernard Faucon",
       "file_name": "3V/00/3V00717.jpg",
       "url_template": "https://images.navigart.fr/{size}/{file_name}",
       "max_width": 1000,
       "max_height": 972,
       "box_width": 262,
       "box_height": 255,
       "header_aggregate": false
   },
   {
       "_id": "9000000080578",
       "type": "image",
       "legend": " ",
       "copyright": "© Bernard Faucon",
       "file_name": "3V/01/3V01116.jpg",
       "url_template": "https://images.navigart.fr/{size}/{file_name}",
       "max_width": 993,
       "max_height": 1000,
       "box_width": 253,
       "box_height": 255,
       "header_aggregate": false
   }
   ]

Here are the details of informations available :

URI and size of the media

You have to recompose the URI of the media by using file_name, url_template and the size you want. The size parameter is a constraint corresponding to the max height or the max width of the image you want. For example, if you want the media id 9000000080493 that should not be largest or highest that 600px, just call : https://images.navigart.fr/600/3V/01/3V01029.jpg

Please note that the media doesn't padd empty space with black of white color. For example, imagine that a media has a max_width of 500 and a max_height of 1000. When you ask an image of 600px, so with size=600, the corresponding image will have a height of 600px and a width of 300px.

Contact us

You may contact us by sending an email to aide@videomuseum.fr