case_get_image ()

case_get_image ()

Function prototype

case_get_image (session, case, type)

API Version

All

Supported interfaces

SOAP, REST

Description

Retuns an image assigned to a CASE

This function provides a way to request an image of a CASE by spefifying the type of image desired (“INSIGNIA”, “IMAGE”…).

Input parameters:

  • session: is the session token obtained in the session_init() call

  • case: reference of the CASE

  • type: One of the following options

    • "IMAGE"

    • "INSIGNIA"

    • "IDENTIFIER/xxxx": where "xxxx" is the IDENTIFIER of the CASE for which we want to obtain the image (e.g. IDENTIFIER/NAT_ES)

Output parameters:

  • result: Content of image base64 encoded

  • ErrorMsg: If any error occurs, then this value contains a description of the error translated to the current language

  • ErrorCode: If any error occurs, then this value contains any of the standard ERROR CODES

Input

  • session: Session

  •  

Output

result: Content of image base64 encoded

ErrorMsg:  Error message if the procces fails

Request Sample

 

Response Sample

<?xml version="1.0" encoding="UTF-8"?>

<result xsi:type="xsd:string">

/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxQTEhUUEhQWFhUVFxgWFxgYGBccGBkaHBwYGhwXGBgaHSggGBwmHBwXITEiJSkrLi4uGB8zODMsNygtLisBCgoKDg0OGxAQGy8kHyY0LCwtLC0sLCws</result>

 <ErrorMsg></ErrorMsg>

Request example

case_get_image (“LC53060c6f729de8.42629546”, 2156, “IMAGE”)

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

 

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 of the CASE