/CreateReport

GETGETPOST
Use dark colors for code blocksCopy
1
GET https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment/CreateReport

The /CreateReport request allows you to create many types of high quality reports for a variety of use cases describing the input area. If a point is used as a study area, the service will create a 1­mile ring buffer around the point to collect and append enrichment data.

Parameters

NameRequiredTypeDefaultDescription
string

bin

The output response returned as a binary byte-stream..

string

An access token with the required privileges.

[object]

The area that will be enriched, defined as input points, polygons, administrative boundaries, or addresses.

string

null | empty

The ID of the report.

string

pdf

The format of the generated report, including PDF and XLSX.

string

null | empty

Additional options to customize reports.

object

null | empty

The properties for the study area buffer.

object

Stores an output report item to a portal instead of a bin.

object

null | empty

Sets the country or dataset to query.

number

4326

Requests the input geometries in a specified spatial reference system.

Required parameters

f

The output response will be returned in a binary byte-stream.

Use dark colors for code blocksCopy
1
f=bin

token

An access token with the required privileges.

  • ArcGIS Location Platform: premium:user:geoenrichment
  • ArcGIS Online: premium:user:geoenrichment
Use dark colors for code blocksCopy
1
token=<ACCESS_TOKEN>

Learn more about access tokens and privileges in the Security and authentication developer guide.

studyAreas

Study areas may be defined by input points, polygons, administrative boundaries or addresses.

Examples

Example 1 - Point feature described as map coordinates (default study area: 1-mile buffer):

studyAreas=[{"geometry":{"x":-117.1956,"y":34.0572}}]

Example 2 - Polygon study area:

studyAreas=[{"geometry":{"rings":[[[-117.185412,34.063170],[-122.81,37.81],[-117.200570,34.057196],[-117.185412,34.063170]]],"spatialReference":{"wkid":4326}},"attributes":{"id":"1","name":"optional polygon area name"}}]

Example 3 - Administrative boundaries—for example, U.S. state:

studyAreas=[{"sourceCountry":"US","layer":"US.States","ids":["06"]}]

Example 4 - Point described as a single line address:

studyAreas=[{"address":{"text":"380 New York St. Redlands, CA 92373"}}]

Example 5 - Point described as a multiple field input address:

studyAreas=[{"address":{"Address":"380 New York St.","City":"Redlands","Region":"CA","Postal":"92373","CountryCode":"USA"}}]

Additional notes

  • Study area requests with large polygon(s) are available with POST request only.
  • When reports are based on standard geography IDs, like example 3 above, the list of IDs cannot exceed 1024 characters total.

Optional parameters

report

Optional parameter to identify the id of the report. This may be one of the many default reports available along with our demographic data collections or a customized report. Custom report templates are stored in an ArcGIS organization as a Report Template item. The organization URL and a valid ArcGIS authentication token is required for security purposes to access these templates. If no report is specified, the default report is census profile for United States and a general demographic summary report for most countries.

The default behavior, as described above, will be followed.

Examples

Example 1 - Request to run the Census 2010 Profile report:

report=census2010_profile

Example 2 - Request to use a custom report template:

report={"itemid":"1e6ef0580dc34ac4a","url":"www.arcgis.com","token":"XAaHVFRY63TT"}

Example 3 - Request to use a custom report template and ignore any errors that arise from resources not being accessible:

report={"itemid":"1e6ef0580dc34ac4a","url":"www.arcgis.com","token":"XAaHVFRY63TT","ignoreErrors":"true"}

Additional notes

  • For a study area within the US the default report will be based on the census profile for that area.
  • Further information on how to use tokens to access content items is provided in this Security and authentication topic.
  • You can return a list of available reports for each Country. See Example 1 below to return a list of available reports for the United States.

format

Optional parameter to specify the format of the generated report. Supported formats include PDF and XLSX.

Example

Request the output in XLSX format:

format=xlsx

reportFields

Optional parameter specifies additional choices to customize reports. Below is an example of the position on the report header for each field.

report header template

address

Study area address text.

areadesc2

Area description text.

binarylogo

Custom logo graphic specified as MIME64 string.

latitude

Study area latitude text. Default value is given for points and polygon(s) as centroid y value of study area.

longitude

Study area longitude text. Default value is given for points and polygon(s) as centroid x value of study area.

logo

Custom logo graphic specified as a complete URL reference. Default is esri logo.

locationname

Custom location name. Default value is a description of study area defined in the report request.

mapurl

Replaces default background basemap for map reports with a user-specified map.

reportstyle

Style to get the report in. Available styles are "Screen" and "Paper". Default: "Screen".

subtitle

Study area report subtitle.

title

Study area report title. Default value is the selected report title name.

The default behaviors, as described in the above table, will be followed.

Examples

Example 1 - Customize report title, subtitle and logo:

reportFields={"title": "My Report","subtitle": "Produced by Foo company","logo": "https://fooCompany.com/shared/logo.png"}

Example 2 - Customize the logo, location name and replace the default background map:

reportFields={"logo": "https://fooCompany.com/shared/logo.png","locationname":"San Francisco","mapurl":"https://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer"}

studyAreasOptions

Optional parameter to specify the properties for the study area buffer.

By default a 1 mile radius buffer will be applied to points and address locations to define a study area.

The default behavior, as described above, will be followed.

Example

Use a 1, 3, 5 mile buffer radii in study area options to define an area of a 0-1 mile band, 1-3 mile band and 3-5 mile band from an input study area point:

studyAreasOptions={"areaType":"RingBuffer","bufferUnits":"esriMiles","bufferRadii":[1,3,5]}

returnType

Optional parameter used for storing an output report item to Portal for ArcGIS instead of returning a report to a customer via binary stream. The attributes are used by Portal to determine where and how an item is stored. Parameter attributes include: user, folder, title, item_properties, URL, token, and referrer.

Example

Creating a new output in a Portal for ArcGIS Instance:

returnType = {"user" : "testUser", "folder" : "FolderName", "title" : "Report Title", "item_properties" : "<properties>", "url" : "https://hostname.domain.com/webadaptor", "token" : "<token>", "referrer" : "<referrer>"}

Additional notes

  • This parameter is only available for the createReport method in ArcGIS.
  • You can save to a portal instance that is not the one federating your server as long as the attributes specify the portal instance to where you want to output your report item.

useData

Optional parameter to specify the hierarchy to query in the case of multiple vintages being available. For example, the current year and previous year vintages of data are available for the US. This parameter can explicitly use the previous year instead of the default current year. In the US, the esri2024 hierarchy is the default, it is based on boundaries from the 2020 census and Esri's updated demographics for the current year. The esri2023 hierarchy is based on boundaries from the 2020 census and Esri's updated demographics for the year 2023.

The useData parameter can also provide an optional performance hint. By default, the service will automatically determine the country associated with each location submitted in the studyAreas parameter, however, there is an associated computational cost that can lengthen the time it takes to return a response. To skip this intermediate step and potentially improve the speed and performance of the service, the caller can specify the country up front through this parameter.

If there are multiple vintages of data (US only), the default behavior is to query the most current year available.

Examples

Example 1 - Query the most current vintage of data for locations in the US (default behavior).

useData={"sourceCountry":"US","hierarchy":"esri2024"}

Example 2 - Query the 2023 data for locations in the US.

useData={"sourceCountry":"US","hierarchy":"esri2023"}

Example 3 - Provide a performance hint to the service by indicating that all of the input features in the studyAreas parameter describe locations or areas in the US.

useData={"sourceCountry":"US"}

inSR

Optional parameter to define the input geometries in the studyAreas parameter in a specified spatial reference system.

When input points are defined in the studyAreas parameter, this optional parameter can be specified to explicitly indicate the spatial reference system of the point features. The parameter value can be specified as the well-known ID describing the projected coordinate system or geographic coordinate system.

The standard latitude and longitude-based geographic coordinate system based on the WGS 1984 datum will be used.

Example

Specify the input geometry in the Web Mercator (Auxiliary Sphere) projected coordinate system based on the WGS 1984 datum:

inSR=3857

Additional notes

Response status

For a list of error codes and details, go to Error codes.

Response details

A PDF or XLSX file will be returned.

Examples

Create a demographic and income comparison profile

The request also includes a polygon study area for a 1-mile ring buffer area from input geometry.

Use dark colors for code blocksCopy
1
GET https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/GeoEnrichment/createReport?studyAreas=[{"geometry":{"x":-117.1956,"y":34.0572}}]&report=dandi&f=bin&format=PDF&token=<ACCESS_TOKEN>

Create an executive summary

Use dark colors for code blocksCopy
1
GET https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/GeoEnrichment/createReport?studyAreas=[{"geometry":{"rings":[[[-117.26,32.81],[-117.40,32.92],[-117.12,32.80],[-117.26,32.81]]],"spatialReference":{"wkid":4326}},"attributes":{"id":"Polygon 1","name":"Optional Name 1"}}]&useData={"sourceCountry":"US"}&report=execsummary&f=bin&format=PDF&token=<ACCESS_TOKEN>

Create a report from defined by a single-line address

The request also includes a 3-mile ring buffer around the point.

Use dark colors for code blocksCopy
1
GET https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/GeoEnrichment/createReport?studyareas=[{"address":{"text":"380 New York St. Redlands, CA 92373"}}]&studyAreasOptions={"areaType":"RingBuffer","bufferUnits":"esriMiles","bufferRadii":[3]}&report=dandi&reportFields={"title": "My Report","subtitle": "Produced by my company"}&useData={"sourceCountry":"US"}&f=bin&format=PDF&token=<ACCESS_TOKEN>

Create a report defined by a named administrative boundary area.

Use dark colors for code blocksCopy
1
GET https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/GeoEnrichment/createReport?studyAreas=[{"sourceCountry":"US","layer":"US.ZIP5","ids":["92373"]}]&report=dandi&f=bin&format=PDF&token=<ACCESS_TOKEN>

Create a report using the IDs of US counties

Use dark colors for code blocksCopy
1
GET https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/GeoEnrichment/createReport?studyAreas=[{"sourceCountry":"US","layer":"US.Counties","ids":["06071","06065"]}]&report=dandi&reportFields={"title": "My Report","subtitle": "Produced by Company X"}&f=bin&format=PDF&token=<ACCESS_TOKEN>

Create a report using the IDs of of US.Places

Use dark colors for code blocksCopy
1
GET https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/GeoEnrichment/createReport?studyAreas=[{"sourceCountry":"US","layer":"US.Places","ids":["4850256,2253545"]}]&report=community_profile&reportFields={"title": "My Report","subtitle": "Produced by Company X"}&f=bin&format=PDF&token=<ACCESS_TOKEN>

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.