Requesting images directly from IHS
Request
To get an image from IHS (and not from Gracenote), send a GET request to:
http://<host>:<port>/ihs/v1/{resourceType}/{resourceId}
Headers
Content-Type: application/json
Mandatory arguments
resourceType
– one of the following:contents
programs
series
persons
channels
resourceId
– the ID of the resource, as provided by MDS (as part of the response to a browse or search request).
These take values depending on the type of content, as follows:
Content type | resource_type | resource_id | Comments |
Simple event |
|
| Event metadata does not contain |
Event with content |
|
| Event metadata does contain |
Editorial/technical contents |
|
| Applies to all VOD contents. |
Series/season |
|
| Event/content metadata contain |
Editorial/technical channels |
|
| |
Cast/crew |
| Person IDs are obtained from the Cast, Crew, Persona service (CCP), not MDS. |
Other arguments
width
– the width of the required image. If you do not specify a width, the default value is used. This is set in the IHS configuration (default: 480).height
– the height of the required image.If you do not specify a height, the default value is used. This is set in the IHS configuration (default: 720).category
– the category of the required image. This is one of the following:Banner
Banner-L1
Banner-L1T
Banner-L2
Banner-L3
Banner-LO
Banner-LOT
Iconic
Staple
Cast Ensemble
Cast in Character
Logo
Box Art
Poster Art
Scene Still
Photo
Photo – headshot
text
– enables you to request only images with text (yes
) or without (no
). If you request an image with text and none is available, IHS returns the best match image without text.requestId
– for requests after the initial request, this allows you to directly access the image. (The response to the initial request includes therequestId
in its response.)
Example
This GET request gets an image for the specified person at the specified dimensions:
https://<host>:<port>/ihs/v1/persons/25?width=1200&height=900
This returns a response with a body that looks like this:
{
"link": "/persons/25?requestId=5c62d742d69b040001e54a71"
}
You can then make a second request using the returned requestId
to get the actual image:
https://<host>:<port>/ihs/v1/persons/25?requestId=5c62d742d69b040001e54a71
This returns a 303 response that redirects to the actual image URL.
Response
The response to the initial request is a 202 response with a body that looks like this:
{
"link": "/persons/25?requestId=5c62d742d69b040001e54a71"
}
Appending the request ID string to the URL (as shown above) will give a 303 response that redirects to the actual image URL.
See also
For full details of this API, see Image Handler Service (IHS) API documentation.