Retrieving a picture

Retrieval of pictures is performed using URLs transmitted via a data feed or API.
Important notes:
- The delivery of image-related metadata is mandatory and both must be stored together.
 - Images should be stored in a cache with an expiration date.
 - When this date expires, a new API call must be made to retrieve the image.
 
Example of a result with a call to our API:
Partial result from the endpoint "/api/artist/id/picture"
{
	"id_picture": 4615,
	"name": "https://images.music-story.com/protected/pictures/3b9e2e50-259a-11e7-b2c4-20eb3c695984/57309f32-259a-11e7-b2c4-20eb3c695984.jpg",
	"source": "Getty",
	"width": 3368,
	"height": 3368
}
Example of a result with a data feed:
Partial result from a json file on Artist level
{
  "pictures" : [
    {
      "name": "https://images.music-story.com/protected/pictures/4dc2f342-fcda-11e6-afe3-1437daa09300/877df23f-fcda-11e6-afe3-1437daa09300.jpg"
      "tags": null,
      "metas": {
        "id": 85351057,
        "title": "Photo of Gram PARSONS",
        "artist": "Jim McCrary"
      }
      }
  ]
}
- In both case (API or data feed), the image url (field "name") is protected by a token that needs to be added to the "Authorization" header.
 - The token is the same token used to retrieve metadata via our API and it is available on the Metadata Monitor : API > Monitoring
 
Example of a call to retrieve an image with cURL command
curl -O 'https://images.music-story.com/protected/pictures/3b9e2e50-259a-11e7-b2c4-20eb3c695984/57309f32-259a-11e7-b2c4-20eb3c695984.jpg' \
  -H 'Authorization: Bearer XXXXXX'