Images and Icons
These services return the appropriate image/icon for a specified thumbprint. The two services are related, in that each is used to retrieve image data relating to one or more resources using the concept of a ‘thumbprint’ to allow sharing of image data for resources with equivalent images. The ‘thumbprint’ is the same for images with the same content. The services differ in that the image service allows different sizes and format of image to be returned as desired by the caller, possibly resizing the raw images, while the icon service returns all of the raw images combined into a single file in the Microsoft icon (.ico) format.
Request
URL (indicative only) | Method | Description |
---|---|---|
/resources/v2/{thumbprint}/image[/{size}] | GET | Returns the specified image. See below for details on the format and other details of the response. |
/resources/v2/{thumbprint}/icon | GET | Returns the specified icon data in the image/vnd.microsoft.icon format. |
Parameter | Description |
---|---|
{thumbprint} | The thumbprint for the image/icon. This value is typically generated in the data returned to a GET request to /resources[/{id}] and is generated for the image data at that moment and so may be different in a subsequent call if the image data has changed. This value is also unique to the instance of the service. |
{size} | The size of the image to return (defaults to 32 if no value is supplied). Only the values 16, 24, 32, 48, 64, 96, 128, 256 and 512 are supported. |
clientName, clientAddress | See Client Name, Client Address and Device Id section above. |
Note:
- These requests require an authorization token
- The URLs for requests for image/icon data are illustrative only. The actual URLs should be obtained from the response to resource enumeration (i.e. /resources/v2/ or /resources/v2/{id}) which will return the URL.
- However, the optional suffix of the image request (i.e. [/{size}) must be constructed by the client.
- The response image format is determined by the requested content type (i.e. the value(s) for the accept header). The recognized content types are: image/png, and image/gif. Also the wildcard values
image/*
and*/*
are also recognized as referring to all supported content types in no defined order. If multiple content types are specified, then specific contents types (for exampleimage/gif
) are taken as higher precedence than wildcard types (for exampleimage/*
) and the order is taken to indicate preference among specific content types. Accept headers with ‘q’ values are ignored. See section 14.1 of Hypertext Transfer Protocol – HTTP/1.1 for details on accept headers.- The images service will always return an image of the requested format and size (or its best choice if not specified) even if this requires resizing the raw image data.
Response
Response code | Description |
---|---|
200 (OK) | Success |
401 (Unauthorized) | Bad/Missing security token (see CitrixAuth Authentication Scheme document [3]) |
400 (Bad Request) | Invalid size parameter. |
404 | Unknown/missing thumbprint. |
Response format | Request accept/response content-type header |
---|---|
GIF | image/gif |
PNG | image/png |
Example: successful request for a 32x32 PNG image
Request
GET http://www.example.com/Citrix/Store/resources/v2/5C6D3CD...7A/image/32 HTTP/1.1 Accept: image/png
Authorization: CitrixAuth H4sIA....
Host: www.example.com
<!--NeedCopy-->
Response
HTTP/1.1 200 OK
Cache-Control: public, no-store, max-age=0
Content-Type: image/png
Content-Length: 2627
... 32 x 32 png image data ...
<!--NeedCopy-->
Example: successful request for a default-sized GIF image
The request uses accept headers to give image/gif as its required format, it also specifies no size, so the server returns the default size, i.e. 32.
Request
GET http://www.example.com/Citrix/Store/resources/v2/5C6D3CD...7A/image HTTP/1.1 Accept: image/gif
Authorization: CitrixAuth H4sIA....
Host: www.example.com
Connection: Keep-Alive
<!--NeedCopy-->
Response
HTTP/1.1 200 OK
Cache-Control: public, no-store, max-age=0
Content-Type: image/gif
Content-Length: xxxx
... 32 x 32 gif image data ...
<!--NeedCopy-->