Query Edit Log

URL:
https://<LinearReferencingService-url>/queryEditLog
Methods:
GET
Required Capability:
The ArcGIS Location Referencing license is required to use this resource.
Version Introduced:
10.7.1

Description

This operation allows the LRS Edit Log to be queried without the table being published as part of the service. The LRS Edit Log is a versioned table that contains a history of LRS edit activities performed in a database version. This data is consumed by the Apply Event Behaviors tool to update event locations for route edits. The queried table belongs to the workspace of the first LRS in the service.

Request parameters

ParameterDetails

f

(Optional)

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

Values: html | json | pjson

gdbVersion

(Optional)

Specifies the geodatabase version to use. If this parameter is not specified, the published map's version is used.

Syntax:

1
gdbVersion=<version>

Example:

1
gdbVersion="user1.version1"

WHERE

(Optional)

Specifies a SQL WHERE clause for the query filter. Any legal SQL WHERE clause that operates on LRS Edit Log table fields is allowed. If this parameter is not specified, the entire table is queried.

Syntax:

1
WHERE="<clause>"

Example:

1
WHERE="1=1"

count

(Optional)

Specifies the number of records to return. If specified, the most recent countof results will be returned. The default value for this parameter is the row count of the table.

Syntax:

1
count=<count>

Example:

1
count=10

Example usage

URL for querying all unprocessed edit log records in a version.

1
https://sampleserver/server/rest/services/MyLRS/MapServer/exts/LRServer/queryEditLog?gdbVersion=portaladmin.test9&where=PROCESSED+IS+NULL+OR+PROCESSED+=+0

JSON response syntax

The output is sorted in descending order of the transaction date of each edit log record.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
  "editLogRecords": [
    {
      "objectId": <objectId>,
      "activityType": "<activityType",
      "lrsNetworkName": "<lrsNetworkName>",
      "routeId": "<routeId>",
      "toRouteId": "<toRouteId>",
      "fromDate": <epochTimeInMilliseconds>,
      "toDate": <epochTimeInMilliseconds>,
      "editData": "<editDataInXMLFormat>"
    },
  ]
  ...
}

JSON response example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
  "editLogRecords": [
    {
      "objectId": 5202,
      "activityType": "CreateRoute",
      "lrsNetworkName": "LineNetwork",
      "routeId": "{E7806741-69F6-4354-82AA-94EE672DB789}",
      "toRouteId": "{E7806741-69F6-4354-82AA-94EE672DB789}",
      "fromDate": 1555027200000,
      "toDate": -2209161600000,
      "editData": "<?xml version=\"1.0\"?>\r\n<RouteEditModel xmlns:xsi=\"https://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"https://www.w3.org/2001/XMLSchema\" SchemaVersion=\"3\"><RouteEditActivity xsi:type=\"CreateRouteInfo\" RouteId=\"{E7806741-69F6-4354-82AA-94EE672DB789}\" ToRouteId=\"{E7806741-69F6-4354-82AA-94EE672DB789}\" OperationTime=\"2019-04-12T00:00:00\" DoNotApplyEventBehaviors=\"false\"><RouteStates><RouteState RouteId=\"{E7806741-69F6-4354-82AA-94EE672DB789}\" FirstM=\"NaN\" LastM=\"NaN\" LineOrder=\"0\" IsReversed=\"false\"/></RouteStates></RouteEditActivity></RouteEditModel>\r\n"
    }
  ]
}

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

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close