Hi All,
I'm getting the following error when attempting to addCalibrationPoints using the Linear Referencing Service applyEdits REST API function:
{'error': {'code': 500, 'message': 'Unable to complete operation.', 'details': []}}
- I'm executing this from an ArcGIS Pro Python script tool.
- Enterprise version is 11.3.
- ArcGIS Pro version is 3.3 (though I don't think it matters because I'm calling applyEdits from Python).
I can manually add a calibration point in Pro using the Location Referencing Add Calibration Point tool; same service, same version.
This is what the applyEdits payload looks like:
https://MyServer/server/rest/services/MyService/MapServer/exts/LRServer/applyEdits
?f=json
&token=MyToken
&gdbVersion=MY.NAME@MY.ORG.AR_250212b
&sessionId={51777728-f672-4805-9831-b1800715f796}
&edits=
[
{"id": 1, "addCalibrationPoints":
[
{
"networkLayerId": 3,
"routeId": "LOC103431P",
"fromDate": 1522972800000,
"geometry": { "x": 441393.9140999997, "y": 3626705.8938999996}, "measure": 0.26968174 }
]
}
]
The CalibrationPoints service layer id is 1 and the Network service layer id is 3.
I don't believe geometry needs a spatialReference because the input geometry spatialReference matches the CalibrationPoints spatialReference, but I've tried it anyway with the same results.
I don't believe recalibrateRouteDownstream or retire are required either, but I've tried them anyway, with the same results.
I have successfully executed applyEdits to update Event fields (applyEdits/updates) and to retire a route (applyEdits/retireRoute) so it seems like I'm setting everything up properly. That basic workflow is:
- Get a sessionId and versionGuid
- startReading
- startEditing
- acquire a lock on the route
- applyEdits (response is 'Unable to complete operation.')
- release lock
- stopEditing
- stopReading
This workflow very closely follows a presentation at the 2021 Developer Summit for adding a calibration point:
https://www.youtube.com/watch?app=desktop&v=VQzW-EZCEKc
Thanks for any help!