FRAMES | NO FRAMES

 

B U S I N E S S   A N A L Y S T   10.2   R E S T   R E P O S I T O R Y   U T I L I T Y

Get Report Endpoint

Generates a report in the given formats from a report item previously created and stored in the repository.

 

Availability: Business Analyst Server.

 

URL Example

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/GetReport/execute

Parameters

Parameter

Description

Item (required)

The report item stored in the repository. Type esriFolderItem.

ReportFormat (required)

Array of output report formats. Type array of string.

f (optional)

Response format. Type string. Available formats: HTML, JSON, PJSON, XML.

Default: HTML.

token

Authentication token. This parameter is required if your Business Analyst Server is secured. Type string.

Returns

Variable of type TaskResultOutput whose Reports array contains ReportInfo items.

 

NOTE: Since Business Analyst 10.0, the output type of this endpoint is changed.

Remarks

Use Get Available Report Formats lookup operation to query all available report formats.

Example Usage

The example below illustrates a workflow to get a summary report from repository item. This workflow includes a preliminary step of creating summary reports using the Simple Rings endpoint.

 

STEP 1: Create Summary Reports using Simple Rings

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/SimpleRings/execute?
Stores={"Points":[
  {"longitude":-117.195683,"description":"Store Study Site","latitude":34.057596,"name":"store_study_site","storeID":"1"}
]}&
Radii=1;2;3&
DistanceUnits=esriMiles&ReportOptions=[{
  "ReportFormat":"PDF",
  "TemplateName":"Demographic and Income Profile",
  "ReportHeader":[{"key":"subtitle","value":"Custom Title"}]
}]&
OutputReportItems=[{
  "WorkspaceName":"Default Workspace",
  "ProjectName":"Default Project",
  "folderType":"esriFolderReports",
  "itemName":"getReportSample"
}]&
OutputType=GetReport&
f=PJSON

 

STEP 2: Get the Age by Income Profile Report in HTML Format

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/GetReport/Execute?
Item={
  "WorkspaceName":"Default Workspace",
  "ProjectName":"Default Project",
  "folderType":"esriFolderReports",
  "itemName":"getReportSample"
}&
ReportFormat=HTML&
f=PJSON

 

Response

{
  "results":
  [
    {
      "paramName":"Age by Income Profile.HTML",
      "dataType":"GPDataFile",
      "value":
      {
        "url":"http://localhost/arcgisoutput/_ags_T8ECA03E47466797E56B799905D57C.html"
      }
    }
  ],
  "messages":
  [
  ]
}

 

See Also

Get Available Report Formats Endpoint

Simple Rings Endpoint

ReportOptions Type

Business Analyst Server Repository

Business Analyst Server REST Reference