For the complete documentation index, see llms.txt. This page is also available as Markdown.

Images (Ximage)

Syntax: Ximage_<parameter>

Produce images as part of the API response. This can be useful for using Spark services to feed image elements to a front-end.

  1. Click on the target chart or image.

  2. Use the Name Box to create a Name for the image, for example Ximage_rocketchart.

  3. Upload the file to Spark and open the API Tester.

  4. API request (inputs) Field view lists all the Ximages that have been defined in the workbook.

  5. Next to the Image Name field is the File Name field, which corresponds to the FileName parameter of the API request. Enter the desired filename here, for example, customfilename.pdf. If no filename is provided, then a UUID is used for the filename.

  6. Click Submit to make the API request.

  7. In the API response (outputs) Field view, open the Images expandable.

  8. Each image will be listed in the table with a link to download the image.

Return an image as a Base64 string

Syntax: Ximage_metadata.<parameter>

Images can be returned as a Base64 string. This can be easier to use than an attachment when integrating the API response to a front-end. This works when the image is defined as part of the Metadata subservice.

Return original file size images

Syntax: Ximageoriginal_<parameter> or Ximageoriginal_metadata.<parameter>

Ximage will return an image that has been resized based upon its dimensions in an Excel file. To return an image in its original quality and file size, use the alternative Ximageoriginal mapping.

  • This functionality supports JPEG or PNG images but not Excel charts.

  • In File, Options, Advanced, select Do not compress images in file.

Sample file

Open

Last updated