image_get ()
Function prototype | image_get (session, ref) |
---|---|
API Version | 2.7.32 and higher |
SOAP, REST |
Description
Retuns an image from its reference
This function is similar to case_get_image () , user_get_image (session, case, image, type), associate_get_image (session, associate, type) , team_get_image (session, team, image, type) but the main difference is that the mentioned functions can be used to get the image of a CASE, USER, etc. by a qualitative name of the desired image (“INSIGNIA”, “LOGO”…), but not by a direct image reference.
To keep the privacy and ensure that a reference can’t be used by any other user to download an image, the references are generated explicitly for the active session user. This means that the images can only be requested from the same session from which the references were obtained.
The function image_get() can be used to get an image by its reference independently of the object to which it is related (a CASE, USER…).
Required permissions: The reference of the image must have been obtained from API functions used during the current active session. Otherwise, a INSUFICIENT_PRIVILEGES error will be returned.
The following API functions return image references that can be used with image_get():
Input parameters: |
|
Output parameters: |
|
Request example
image_get ( “LCAAAAAAAAAAAA”, "38jsuc183289fhw831idu")
Response
The response format is XML when the function has been invoked via the SOAP API, and JSON when it has been invoked via the REST API
Return Error codes
ERROR CODE |
|
---|---|
INVALID_TOKEN | The session token provided is not valid |
INSUFFICIENT_PRIVILEGES | The session user does not have the necessary privileges to request the image because the reference doesn’t correspond to the active session |