The Infomaptic REST Api

Infomaptic provides a simple REST api that you can use to generate your reports. Just like when integrating reports with the rest of the Esri system, you will need to know the ObjectId of the record you want to generate a report about.

URL Structure of the API

Type: Get

https://app.infomaptic.com/api/report/{templateId}/view

Where {templateId} should be replaced with the ID of the item in your ArcGIS Portal. See Finding your Template Id for instructions on how to find your templateId.

There are also the following query parameters:

  • type (required) - One of: pdf, html, png
  • key (optional) - The key value (usually the ObjectId of the record to use when generating the report)
  • token (optional) - The ArcGIS Token. If the template is secured, you will need to provide an ArcGIS Token that has access to the item (template).
  • refreshCache (optional, default: false) - One of true, false. Setting this to true tells the server to generate the report from scratch, skipping the cache. Infomaptic caches each report generation for a few minutes to reduce the number of views. Each request with refreshCache=true will count as a view.

Details on the type parameter:

The type parameter controls the type of report that is returned, PDF, Html or PNG.

  • pdf - Returns a PDF document, with the mime-type of application/pdf
  • html - Returns an HTML document, with the mime-type of text/html
  • png - Only supported for single page templates Returns a PNG file, with the mime-type of image/png

Swagger Documentation

The api is also documented via a Swagger page, which can be viewed here: https://app.infomaptic.com/api-docs/index.html

Python Example

This example generates a PNG output for use within a Python notebook.

python example

import requests
from PIL import Image
response = requests.get('https://app.infomaptic.com/api/report/f5a7452cbd434a7293ec2ed56f61058b/view?type=png&refreshCache=false', stream=True)
img = Image.open(response.raw)