Skip To Content ArcGIS for Developers Sign In Dashboard

Generate Events

Description

License:

The ArcGIS Pipeline Referencing for Server extension is required to use this resource.

Re-creates shapes for event features registered with an LRS Network. If the event has derived network route and measure fields configured, the tool will update those fields when executed.

Request parameters

ParameterDetails
f

Description: Optional parameter to specify the response format. The default response format is html.

Values: html | json

layerDefinition

Description: Optional parameter containing a list of Object IDs, a SQL WHERE clause, and a time instant defining the routes on which the operation will be performed.

Syntax:

{
      "objectIds": [1,2,3,4,5],
      "where": "lineName in ('MainA', 'MainB', 'MainC')",
      "time": [1200045, 1200100]
}

gdbVersion

Description: Optional parameter to specify the geodatabase version to use. If this parameter is not specified, the published map's version is used.

Syntax: gdbVersion=<version>

Example: gdbVersion="user1.version1"

sessionID

Description: Optional parameter set by a client during long transaction editing on a branch version. The sessionId is a guid value that clients establish at the beginning and use throughout the edit session. The sessonId ensures isolation during the edit session.

Syntax: sessionId=<guid>

Example: sessionId="{E81C2E2D-C6A7-40CB-BF61-FB499E53DD1D}"

returnEditMoment

Description: Optional parameter to specify whether the response will report the time edits that were applied. If returnEditMoment=true, the server will return the time edits that were applied in the response's editMoment key. The default value for this parameter is false.

Values: true|false

This parameter was added at 10.7.

returnServiceEditsOption

Description: Optional parameter that returns features edited due to the geodatabase behavior that results from applying the edits. For example, if a feature is deleted and it is the origin in a composite relationship, the destination feature is automatically deleted in the geodatabase. If returnServiceEditsOption is set to originalAndCurrentFeatures, the deleted destination feature is returned along with a reference to the deleted origin feature in the response. Note that, even for deletes, the geometry and attributes of the edited feature are returned.

Results returned from applyEdits are organized in layer-by-layer fashion. If the returnServiceEditsOption is set to originalAndCurrentFeatures, each layer may have edited features returned in an editedFeatures object.

Service-level applyEdits response structure:

[
	{
		id
		addResults
		updateReults
		deleteResults
		attachments: {
			addResults
			updateReults
			deleteResults
		}
		editMoment
		editedFeatures
		exceededTransferLimit                  
	},
	{
	...
	}
]

The editedFeatures object returns full features, including the original features prior to delete, the original and current features for updates, and the current rows for inserts that may contain implicit changes (for example, as a result of a calculation rule).

editedFeatures response structure:

"editedFeatures":{
	"adds":    [ <feature1>, <feature2>], 	// current features
	"updates": [[<originalFeature3>, < currentFeature3>], 	[<originalFeature4>, < currentFeature4>]],
	"deletes": [ <feature5>, <feature6>]	// original features
},

The response includes no editedFeatures and exceededTransferLimit=true if the count of edited features to return is more than the maxRecordCount. If clients are using this parameter to maintain a cache, they should invalidate the cache when exceededTransferLimit = true is returned. If the server encounters an error when generating the list of edits in the response, exceededTransferLimit = true is also returned.

Edited features are returned in the spatial reference of the feature service as defined by the services spatialReference object or by the spatialReference of the layers extent object.

The default for this parameter is none, which will not include editedFeatures.

Values: none|originalAndCurrentFeatures

This parameter was added at 10.7.

Example usage

Example 1

URL for generating events.

https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/eventLayers/2/generateEvents?layerDefinition=%7B"objectIds"%3A%5B1%2C2%5D%7D&gdbVersion=sde.version1&sessionId=&returnEditMoment=&returnServiceEditsOption=&f=html

Note:

layerDefinition={"objectIds":[1,2]} changed to layerDefinition=%7B"objectIds"%3A%5B1%2C2%5D%7D

JSON Response syntax

{
  "statusURL": <jobIdURL>
}

JSON Response example

{"statusURL":"https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/jobs/j20076c37aa514b7289da291b9a8317a2"}