Version Management Service - Start Editing Session ID?

1330
4
09-16-2020 12:16 AM
LongDinh
Occasional Contributor II

In the Version Management Service REST API notes (Version Management Service—ArcGIS REST API | ArcGIS for Developers ), there are several references to the parameter 'sessionID' - a client generated guid.

For example in the the 'Start Editing' notes: 

Start Editing—ArcGIS REST API | ArcGIS for Developers 

Where and how do I acquire a sessionId?

0 Kudos
4 Replies
MelissaJarman
Esri Contributor

This is a late response, but just incase someone else has this same question. 


When you are using operations that first require a startReading or startEditing operation to be completed first, the sessionID must match. If performing these operations via the ArcGIS Pro client, the pro client will generate the sessionID and ensure that this same sessionID is used for all REST calls. 

When you are using the REST endpoint yourself to issue these calls (through your application), it is your responsibility to generate your own sessionID. You can use an online GUID generator, python module, etc for this GUID. This is dependent on where you are executing these REST calls from.

HåkonDreyer
Esri Contributor

Hi @MelissaJarman Do you know if it's possible to access Pro's current session_id? It seems to be necessary for custom gptools to work with branch versions inside Pro.

Doing an edit with REST with a new id or without any will delete the session_id set by Pro in the GDB_LOCKS table and we run into the Object has no schema lock error on any subsequent Pro edits.

RalfSchmidt
New Contributor III

Hi @HåkonDreyer ,

according to the thread https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-sdk-updating-the-same-attribute-on..., there is no way to get the sessionID in Pro.

I need it for a similar issue: Roads&Highways (aka Location Referencing) has no API inside Pro. Therefore, we need to implement customizations using R&H's REST API. But without the sessionID things get mixed up.

0 Kudos
HåkonDreyer
Esri Contributor

Thanks @RalfSchmidt, I hadn't seen that post.

Your use case looks like one more reason to fix the "no schema lock" issue.

0 Kudos