Post

URL:
https://<root>/<serviceName>/VersionManagementServer/versions/<versionGuid>/post
Methods:
POST
Required Capability:
ArcGIS Advanced Editing user type extension license
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.

Request parameters

ParameterDetails

f

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

Values: html | json | pjson

sessionId (Required)

Specifies the client-generated session ID (GUID).

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

rows (Optional)

Specifies 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.

This parameter was introduced at ArcGIS Enterprise 10.9.

Syntax:

Use dark colors for code blocksCopy
1
2
3
4
5
6
[
 {
   "layerId" : <layerId>,
   "objectIds" : [ <objectId> ]
 }
]

Example:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
[
  {
     "layerId":0,
     "objectIds":[1207,1208]
  },
  {
     "layerId":1,
     "objectIds":[809]
  }
]

async (Optional)

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):

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
{
  "moment" : <datetime>,
  "success" : <true | false>,
  "error" : { // only if success is false
    "extendedCode" : <HRESULT>,
    "message" : <error message>,
    "details" : [ <detail> ]
  }
}

JSON response (when async = true):

Use dark colors for code blocksCopy
1
2
3
{
  "statusUrl" : <url>
}

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

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

Use dark colors for code blocksCopy
1
2
3
f=json
sessionId={3E11BA55-9A50-4EDD-A694-D5C4F21CD40D}
async=false

JSON response:

Use dark colors for code blocksCopy
1
2
3
4
{
 "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

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
f=json
sessionId={3E11BA55-9A50-4EDD-A694-D5C4F21CD40D}
rows=[
  {
     "layerId":0,
     "objectIds":[1207,1208,12,14]
  },
  {
     "layerId":1,
     "objectIds":[809]
  }
]
async=false

JSON response:

Use dark colors for code blocksCopy
1
2
3
4
{
 "moment": 1602605793507,
 "success": true
}

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