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   R E P O S I T O R Y   U T I L I T Y

Open Segmentation Target Group Endpoint

Returns XML serialized segmentation target group.

 

Availability: Business Analyst Server.

 

URL Example

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

Parameters

Parameter

Description

Item (required)

Folder item containing a segmentation target group. Type esriFolderItem.

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.

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.

Example Usage

The example below retrieves an existing segmentation target group item from the Business Analyst Server Repository. In order to demonstrate this method, a market segmentation target group is created and saved to the repository. The OpenSegTargetGroup method is then used to retrieve the profile.

 

STEP 1: Create a target group

http://localhost/ArcGIS/baserver/REST/services/DefaultMap/BAServer/TargetGroup/execute?
Targets=[{"Core":["1","2","3"]},{"Secondary":["4","5"]}]&
ActiveDatasetID=USA_ESRI&
OutputItem={
  "WorkspaceName":"Default Workspace",
  "ProjectName":"Default Project",
  "folderType":"esriFolderSegTGs",
  "itemName":"targetGroup_OpenSegTargetGroup"
}&
f=PJSON

 

STEP 2: Execute the OpenSegTargetGroup request in compatibility with version 9.3.1

http://localhost/ArcGIS/baserver/REST/services/DefaultMap/BAServer/OpenSegTargetGroup/execute?
Item={
  "WorkspaceName":"Default Workspace",
  "ProjectName":"Default Project",
  "folderType":"esriFolderSegTGs",
  "itemName":"targetGroup_OpenSegTargetGroup"
}&
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":
  [
  ]
}

 

NOTE: The response has been abbreviated where "..." is noted.

 

STEP 2: Execute the OpenSegTargetGroup request in compatibility with version 10.0

http://localhost/ArcGIS/baserver/REST/services/DefaultMap/BAServer/OpenSegTargetGroup/execute?
Item={
  "WorkspaceName":"Default Workspace",
  "ProjectName":"Default Project",
  "folderType":"esriFolderSegTGs",
  "itemName":"targetGroup_OpenSegTargetGroup"
}&
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 response has been abbreviated where "..." is noted.

 

See Also

TargetGroupData Type

Business Analyst Server Repository

Business Analyst Server REST API Reference