The VertiGIS Studio Reporting Client for Python package provides an easy to use API for running reports.
- Python 3.6 or later
This package is published to PyPi, and can be installed using
pip install geocortex-reporting-client
The package exports a
run async function that will return a URL to the report upon completion.
from geocortex.reporting.client import run url = await run("itemid", [... other arguments])
itemidis the ArcGIS item ID of the report you want to run. This is always required.
[... other arguments]are additional optional arguments that describe how to run the report and what parameters to supply to it.
url = await run("itemId")
To run a report from ArcGIS Enterprise you must provide the
url = await run("itemId", portal_url="https://server.domain.com/portal")
To pass additional parameters a report you provide additional keyword arguments that match the names of parameters that exist in the report.
url = await run("itemId", Title="My Title", FeatureIds=[1, 2, 3])
To run a secured report, or a report that accesses secured ArcGIS content you must provide the
token argument that specifies the ArcGIS access token of the user running the report. The token is required to access the report item as well as any secured resources, such as ArcGIS services, that provide data for the report.
url = await run("itemId", token="eyJhbGciOiJIUzI1Ni...")