Get Report Templates Service
URL http://baoapi.esri.com/rest/report/GetReportTemplates

Get a list of all available Summary Reports templates in the dataset.

Output

The Get Report Templates service returns a list of available report templates including their respective titles, categories, available formats, customizeable header fields, and names. The result of this service is an ArrayOfReportTemplateInfo which provides information about Summary Report templates and the names to use when specifying them in subsequent analysis. Report template names are used in the ReportOptions parameter in Drive Time, Simple Rings, and Summary Reports.

Description

The Get Report Templates service returns a list of available Summary Reports templates and their available output formats in HTML, JSON, PJSON, and XML formats.

Some applications of Get Report Templates include the following:

Usage Tips

You can provide arguments to the Get Report Templates utility service as defined in the parameters table below.

Parameters

Parameter Details
Token (Required) Description: A valid REST services token string.

Syntax: Token=<string>

Example: Token=ABC123...

Notes: The value associated with the Token parameter is for example purposes only. See Get Token for more information on obtaining a token.

ActiveDatasetID Description: Specify a dataset to perform Online API tasks or operations.

Default: USA

Syntax: ActiveDatasetID=<string>

Example: ActiveDatasetID=Canada

Notes: See the Get Datasets task to dynamically query the available dataset IDs.

Access to additional datasets is subject to the type, terms and restrictions associated with your Online API subscription.

Callback Description: Wrap the JSON or PJSON response in a named function that can be executed by client-side JavaScript upon receipt.

Default: null

Syntax: Callback=<string>

Example: Callback=MyCallbackFunction

Notes:
The response will be wrapped in a callback function only if a non-null Callback parameter value is specified and if the response format (the f parameter) is set to JSON or PJSON
.

Callback functions are useful for consuming the service in JavaScript-based client applications as shown in this basic example.

f Description: The response format.

Default: HTML

Syntax: f=<HTML | JSON | PJSON>

Example: f=JSON

Example Usage


Example 1: Obtain a list of currently available Summary Reports templates and their available output formats.

Request Example (1)

http://baoapi.esri.com/rest/report/GetReportTemplates?
f=PJSON&
Token=ABC123
(Example uses limited demo account)

Notes: See Get Token for more information on obtaining a token.


Example Response

JSON Response Syntax

{
  "results": <ArrayOfReportTemplateInfo>
}

JSON Response Example (1)

{
  "results": [
    {
      "name": "market_profile",
      "category": "Demographic Reports",
      "title": "Market Profile",
      "formats": [
        "PDF",
        "Excel",
        "XML",
        "S.XML"
      ],
      "headers": [
        "logo",
        "title",
        "areadescription",
        "address",
        "subtitle",
        "longitude",
        "locationname",
        "latitude",
        "binarylogo"
      ]
    },
    {
      "name": "dandi",
      "category": "Demographic Reports",
      "title": "Demographic and Income Profile (New Style)",
      "formats": [
        "PDF",
        "Excel",
        "XML",
        "S.XML"
      ],
      "headers": [
        "logo",
        "title",
        "areadescription",
        "address",
        "subtitle",
        "longitude",
        "locationname",
        "latitude",
        "binarylogo"
      ]
    },
 
    ...
 
    {
      "name": "acs_population",
      "category": "ACS Reports",
      "title": "ACS Population Summary",
      "formats": [
        "PDF",
        "Excel",
        "XML",
        "S.XML"
      ],
      "headers": [
        "logo",
        "title",
        "areadescription",
        "address",
        "subtitle",
        "longitude",
        "locationname",
        "latitude",
        "binarylogo"
      ]
    }  
  ]
}

Notes: When report templates are specified in other analyses, the values associated with their names are typically specified.

The response has been abbreviated in the example where "..." is noted.



See Also

Drive Time

Get Token

Simple Rings

Summary Reports