FRAMES | NO FRAMES

 

B U S I N E S S   A N A L Y S T   10.0   R E S T   A P I   S E G M E N T A T I O N   T A S K

Target Group Endpoint

Composes a Tapestry segmentation target group by an array of targets.

 

Availability: Business Analyst Server.

 

URL Example

http://localhost/ArcGIS/baserver/REST/services/DefaultMap/BAServer/TargetGroup/execute

Specific Parameters

Parameter

Description

Targets (required)

Array of targets. Type array of Target.

ActiveDatasetID (optional)

ID of the active dataset. Type string.

Default: ID of the first available dataset.

compatibility (optional)

Business Analyst Server version the JSON output is compatible with. Type string. Available with Business Analyst Server 10.0.

Default: 9.3.1.

f (optional)

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

Default: HTML.

IsFullErrorMessage (optional)

Mode for composing error messages. Type boolean.

Default: false.

OutputItem (optional)

Configuration options for storing the output segmentation target group in the repository. Type esriFolderItem.

token

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

Returns

Variable of type string containing XML serialized segmentation target group. In the case of JSON and PJSON response types, the response format depends on the compatibility parameter value.

Example Usage

The example below generates a Target Group list which is often used as input to other Business Analyst Server analysis tasks.

 

NOTE: Target group values are associated with market Tapestry segment codes. See Get Segments lookup operation to query available Tapestry segments.

 

Request in compatibility with version 9.3.1

http://localhost/ArcGIS/baserver/REST/services/DefaultMap/BAServer/TargetGroup/execute?
Targets=[
  {"Name":"Core","Values":"1,2,3"},
  {"Name":"Secondary","Values":"4,5"}
]&
ActiveDatasetID=USA_ESRI&
compatibility=9.3.1&
f=PJSON

 

Response

{
  "results":
  [
    {
      "TargetGroupData":
      {
        "Target":
        [
          {
            "Cluster":
            [
              {
                "Code":"1",
                "Name":"Top Rung"
              },
              {
                "Code":"2",
                "Name":"Suburban Splendor"
              },
              {
                "Code":"3",
                "Name":"Connoisseurs"
              }
            ],
            "Name":"Core"
          },
          {
            "Cluster":
            [
              {
                "Code":"4",
                "Name":"Boomburbs"
              },
              {
                "Code":"5",
                "Name":"Wealthy Seaboard Suburbs"
              }
            ],
            "Name":"Secondary"
          }
        ]
      }
    }
  ],
  "messages":
  [
  ]
}

 

Request in compatibility with version 10.0

http://localhost/ArcGIS/baserver/REST/services/DefaultMap/BAServer/TargetGroup/execute?
Targets=[
  {"Name":"Core","Values":"1,2,3"},
  {"Name":"Secondary","Values":"4,5"}
]&
ActiveDatasetID=USA_ESRI&
compatibility=10.0&
f=PJSON

 

Response

{
  "results":
  [
    {
      "paramName":"TargetGroupData",
      "dataType":"GPString",
      "value":"<TargetGroupData>
        <Target Name=\"Core\">
          <Cluster Code=\"1\" Name=\"Top Rung\" />
          <Cluster Code=\"2\" Name=\"Suburban Splendor\" />
          <Cluster Code=\"3\" Name=\"Connoisseurs\" />
        </Target>
        <Target Name=\"Secondary\">
          <Cluster Code=\"4\" Name=\"Boomburbs\" />
          <Cluster Code=\"5\" Name=\"Wealthy Seaboard Suburbs\" />
        </Target>
      </TargetGroupData>"
    }
  ],
  "messages":
  [
  ]
}

 

NOTE: The XML string value in the response is split in lines for easy reading.

 

See Also

TargetGroupData Type

Business Analyst Server REST API Reference