Skip To Content

Create (Trace Configurations)

Description

The create operation on the traceConfigurations resource provides the ability to create a single named trace configuration. Named trace configurations store the properties of a complex trace in a trace network and can be shared through a map service consumed by a web map or field app. Multiple parameters and properties are provided with the create operation that support the analytic workflows associated with the trace operation.

Learn more about trace configurations

License:
The active portal account must be licensed with theArcGIS Advanced Editing user type extension to use this operation.

Request parameters

ParameterDetails
f

Description: Optional parameter specifying the output format of the response. The default response format is html.

Values: html | json

name

Description: Required parameter specifying the name of the named trace configuration.

Syntax: name=<string>

description

Description: Optional parameter specifying the description of the named trace configuration.

Syntax: description=<string>

traceType

Description: The trace type. This required parameter specifies the core algorithm that will be used to analyze the network. Trace types can be configured using the traceConfiguration parameter.

Values: <connected | upstream | downstream | shortestPath>

Syntax: traceType=<traceType>

Example: traceType=shortestPath

traceConfiguration

Description: Required parameter specifying the collection of trace configuration properties.

To reference the collection of trace configuration properties, see traceConfiguration properties.

Syntax: traceConfiguration=<traceConfiguration>

resultTypes

Description: Optional parameter specifying the types of results to return.

Syntax:

[
  { 
    "type" : "elements" | "aggregatedGeometry",
    "includeGeometry" : true | false,
    "includePropagatedValues": true | false,
    "networkAttributeNames" :["attribute1Name","attribute2Name",...],
    "diagramTemplateName": <value>, 
    "resultTypeFields":[{"networkSourceId":<long>,"fieldname":<value>},...]
  },...
]

tags

Description: Optional parameter specifying user-provided tags; this is provided as an array of strings.

Syntax: tags=[<string>]

JSON Response syntax

JSON response:



{
  “success” : <boolean>,
  “error” : {                   // only if success is false
    “extendedCode” : <HRESULT>,
    “message” : <error message>,
    “details” : [ <detail> ]
}
}

Example usage

Create a named trace configuration for a trace network using the create operation.

Request URL and parameters:

https://myserver.esri.com/server/rest/services/Landbase/TraceNetworkServer/traceConfigurations/create



f=json
name=ConnectedTrace
description=Connected trace example
traceType=connected
traceConfiguration=
 {
  "includeBarriers":true,
  "validateConsistency":true,
  "ignoreBarriersAtStartingPoints":false,
  "allowIndeterminateFlow":false,
  "shortestPathNetworkAttributeName":"",
  "traversabilityScope":"junctionsAndEdges",
  "conditionBarriers":[],
  "functionBarriers":[],
  "functions":[],
  "outputFilters":[],
  "outputConditions":[],
  "pathDirection":"noDirection"
 }
resultTypes=[{"type":"elements"}]
tags= ["connected"]

JSON response:

{
 "success": true
}