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. A reconcile operation must be performed prior to post. The sessionId performing the post operation must match the sessionId used for the reconcile operation. For the ability to post a subset of edits in the current version to the default version, use the rows parameter.
The Post operation is supported both synchronously and asynchronously.
Request parameters
Parameter | Details |
---|---|
f | Description: Optional parameter to specify the output format of the response. The default response format is html. Values: html | json |
sessionId | Description: The client-generated session ID (GUID); a required parameter. Syntax : sessionId = {3F2504E0-4F89-41D3-9A0C-0305E82C3301} |
rows | Description: Optional parameter to specify the rows (features or objects) when posting a subset of edits in the current version to the default version. The objectIds specified 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 is required in order to see the posted features in the version. ![]() 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:
Example:
|
async | Description: If true, the request is processed as an asynchronous job, and a URL is returned that a client can visit to check 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" :
}
JSON response to the status URL (when pending or in progress):
{
"status" : "",
"submissionTime" : ,
"lastUpdatedTime" :
}
Example usage
Use the post operation to post edits from a named version to the default version.
Example one
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 two
Use the post operation to post a subset of edits from a named version to the default version using the rows parameter.
The objectIds specified must be edits in the current version, which can be obtained from the differences operation. In the example, the objectids 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, while objectIds 12 and 14 are updated and deleted features. For layerId1, objectId 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
}