Partial Post

URL:
https://<root>/<serviceName>/VersionManagementServer/versions/<versionGuid>/partialPost
Methods:
POST
Required Capability:
ArcGIS Advanced Editing user type extension license
Version Introduced:
11.5

Description

The partialPost operation allows the client to post a subset of edits to the DEFAULT version. The rows parameter supports features or objects from simple classes, tables, relationships, utility network classes and topology classes.

The sessionId performing the partial post operation must match the sessionId used for the reconcile operation. The client can only post changes if the default version has not been modified since the last reconcile. If the default version has been modified since the last reconcile, the client will have to reconcile again before posting.

The partialPost operation will perform a reconcile after posting the subset to the DEFAULT version. 

The partialPost operation is supported both synchronously and asynchronously.

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

Request parameters

ParameterDetails

sessionId (Required)

Specifies the client-generated session ID (GUID).

Syntax :

Use dark colors for code blocksCopy
1
sessionId = {3F2504E0-4F89-41D3-9A0C-0305E82C3301}

rows (Required)

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.

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]
  }
]

conflictDetection (Optional)

Specifies whether the conditions required for conflicts to occur are defined by object or by attribute. The default is byObject.

Values: byObject | byAttribute

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

f

The response format. The default format is html.

Values: html | json | pjson

JSON Response syntax

JSON response (when async = false):

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
{
  "hasConflicts": <true | false>,
  "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 | Failed>",
  "submissionTime" : <datetime>,
  "lastUpdatedTime" : <datetime>
 }

JSON response to the statusURL (when completed):

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
{
  "hasConflicts": <true | false>,
  "moment" : <datetime>,
  "status" : "Completed",
  "submissionTime" : <datetime>,
  "lastUpdatedTime" : <datetime>,
  "success" : <true | false>,
  "error" : { // only if success is false
    "extendedCode" : <HRESULT>,
    "message" : <string>,
    "details" : [ <string> ]
	}
}

Example usage

The following is a sample POST request for the partialPost operation where a subset of edits from a named version are posted to the DEFAULT version.

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/partialPost

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

JSON Response example

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