Create (Trace Configurations)

URL:
https://<root>/<serviceName>/TraceNetworkServer/traceConfigurations/create
Methods:
POST
Required Capability:
Requires the ArcGIS Advanced Editing user type extension license
Version Introduced:
10.9

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 named trace configurations

Request parameters

ParameterDetails

f

Specifies the output format of the response. The default response format is html.

Values: html | json | pjson

name

(Required)

Specifies the name of the named trace configuration.

Syntax: name=<string>

description

(Optional)

Specifies the description of the named trace configuration.

Syntax: description=<string>

traceType

(Required)

The traceType 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

(Required)

Specifies the collection of trace configuration properties.

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

Syntax: traceConfiguration=<traceConfiguration>

resultTypes

(Optional)

Specifies the types of results to return.

Syntax:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
[
  {
    "type" : "elements" | "aggregatedGeometry",
    "includeGeometry" : true | false,
    "includePropagatedValues": true | false,
    "networkAttributeNames" :["attribute1Name","attribute2Name",...],
    "diagramTemplateName": <value>,
    "resultTypeFields":[{"networkSourceId":<long>,"fieldname":<value>},...]
  },...
]

tags

(Optional)

Specifies user-provided tags as an array of strings.

Syntax: tags=[<string>]

JSON Response syntax

JSON response:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
  “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

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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:

Use dark colors for code blocksCopy
1
2
3
{
 "success": true
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.