Skip To Content
ArcGIS Developer
Dashboard

Post

  • URL: https://<version-url>/post(POST only)
  • Version Introduced:10.6

Description

The post operation allows the client to post the changes in their version to the default version. The reconcile operation must be performed before the post operation. The sessionId value performing the post operation must match the sessionId value used for the reconcile operation. To post a subset of edits in the current version to the default version, define the rows parameter.

The post operation is supported both synchronously and asynchronously.

Review the read and edit session requirements for version resource operations.

License:
Organization members must be assigned a license for the ArcGIS Advanced Editing user type extension to use this operation.

Request parameters

ParameterDetails
f

The output response format. The default response format is html.

Values: html | json

sessionId

The client-generated session ID (GUID). This parameter is required.

Syntax : sessionId = {3F2504E0-4F89-41D3-9A0C-0305E82C3301}

rows

The rows (features or objects) that will be used when posting a subset of edits in the current version to the default version. The object IDs provided must be edits in the current version, which can be obtained from the differences operation.

When the rows parameter is used to post a subset of edits, the posted edits are no longer present in the version. All other features remain in the version. Another reconcile operation is required to see the posted features in the version.

Note:
The rows parameter is currently only supported with simple features classes, tables, and relationship classes.

This parameter was introduced at ArcGIS Enterprise 10.9.

Syntax:


[
 { 
   "layerId" : <layerId>,
   "objectIds" : [ <objectId> ] 
 }
]

Example:


[
  {
     "layerId":0,
     "objectIds":[1207,1208]
  },
  {
     "layerId":1,
     "objectIds":[809]
  }
]

async

Specifies whether the request will be processed asynchronously. If true, the request will be processed as an asynchronous job, and a URL will be returned that a client can visit to review the status of the job. The default is false.

Values: true | false

This parameter was introduced at ArcGIS Enterprise 10.9.1.

JSON Response syntax

JSON response (when async = false):

{
  "moment" : <datetime>,
  "success" : <true | false>,
  "error" : { // only if success is false
    "extendedCode" : <HRESULT>,
    "message" : <error message>,
    "details" : [ <detail> ]
  }
}

JSON response (when async = true):


{
  "statusUrl" : <url>
}

JSON response to the status URL (when pending or in progress):


{
  "status" : "<Pending | InProgress>",
  "submissionTime" : <datetime>,
  "lastUpdatedTime" : <datetime>
 }

Example usage

Use the post operation to post edits from a named version to the default version.

Example 1

Use the post operation to post all edits from a named version to the default version.

Request URL and parameters:

https://myserver.esri.com/server/rest/services/LandUse/VersionManagementServer/versions/24417758-0DBD-4EC3-95B0-467CAA47FC43/post


f=json
sessionId={3E11BA55-9A50-4EDD-A694-D5C4F21CD40D}
async=false

JSON response:

{
 "moment": 1602605793507,
 "success": true
}

Example 2

Use the post operation to post a subset of edits from a named version to the default version using the rows parameter.

The objectIds values provided must be edits in the current version, which can be obtained from the differences operation. In the example, the objectIds values provided for the rows parameter include a subset of edits with combinations of inserts, updates, and deletes. For layerId 0, objectIds 1207 and 1208 represent newly inserted features, and objectIds 12 and 14 are updated and deleted features. For layerId1, objectIds 809 represents an inserted feature.

Request URL and parameters:

https://myserver.esri.com/server/rest/services/LandUse/VersionManagementServer/versions/24417758-0DBD-4EC3-95B0-467CAA47FC43/post


f=json
sessionId={3E11BA55-9A50-4EDD-A694-D5C4F21CD40D}
rows=[
  {
     "layerId":0,
     "objectIds":[1207,1208,12,14]
  },
  {
     "layerId":1,
     "objectIds":[809]
  }
]
async=false

JSON response:

{
 "moment": 1602605793507,
 "success": true
}