Append Routes issue with Rest API

236
5
Jump to solution
3 weeks ago
MirekGroen
New Contributor II

Hi Community,

I am trying to Append Routes through a servers rest endpoint, but are experiencing some unexpected errors. We are using the following procedure: https://developers.arcgis.com/rest/services-reference/enterprise/lr-append-routes.htm

This process can be divided into two sub-processes: first we need to upload a zip-file, with gdb, containing 1 feature class to a feature service. By doing this it returns an item ID, which can be used in the second step.

MirekGroen_0-1714545150097.png

With the second step we are actually appending routes to an existing LRS through the Map Service, but this is giving us an esriJobMessageTypeError: Could not find a feature class in the input zipped file geodatabase.

MirekGroen_0-1714557521657.png

I have access to this specific server and can confirm that the zip-file is uploaded, containing the gdb with feature class. And the uploadItemId is corresponding with the item.

MirekGroen_2-1714545333132.png

The datasets we are using are minimalistic in setup, they don't contain extra things, only the basic fields. The feature class also only contains 4 fields, RouteId, RouteName, FromDate and ToDate, just to rule out that the error is coming from other complex setups.

ArcGIS Enterprise version is 10.9.1. The GeoDatabase and Feature Class are created in ArcGIS Pro 3.2.2. I also tested with a geodatabase created in ArcGIS Pro 2.9, but that didn't help

I hope anyone could help us finding a solution!

0 Kudos
1 Solution

Accepted Solutions
MirekGroen
New Contributor II

The solution for this problem is that name of the zip file should contain .gdb, so at the hierarchy becomes:

|--<filename>.gdb.zip
      |--<filename>.gdb
            |-- Source feature class

Using this hierarchy makes it possible to Append Routes through the REST API

View solution in original post

5 Replies
AyanPalit
Esri Regular Contributor

@MirekGroen Looks like you are following the documentation but seems like the zipped GDB may not be formatted in a way where the source route feature class is not found. Can you post a screenshot of the GDB with its contents or upload a sample?

Ayan Palit | Principal Consultant Esri
0 Kudos
MirekGroen
New Contributor II

Hi @AyanPalit , thanks for your reply. I can share some screenshot, showing that the gdb contains 1 feature class.

MirekGroen_0-1714586683895.png

This gdb packed in a zip file with the same name:

MirekGroen_1-1714586783641.png

And the feature class only contains 3 features with only the minimum necessary attributes:

MirekGroen_2-1714586855544.png

I can also confirm that I changed the names of the zip, gdb and feature class, tried with and without globalids, tried with both PolylineZM and PolylineZ objects, but it keeps resulting in the same error that the feature class could not be found.

0 Kudos
AmitHazra
Esri Contributor

Hello @MirekGroen 

I'm going to offer you an alternative method for triaging this issue. May I suggest you use the ArcGIS Pro Diagnostic Monitor functionality to review the network traffic to see whether you are able to append routes through the Pro GP to your LRS-enabled service. In Pro, try Cntrl+Alt+M. Then you can watch the network traffic log to determine what interactions are taking place. For instance, here I have an FGDB locally with one route in it (Feature class: RouteLoader) that I intend to Append to my branch versioned LRS service:

AmitHazra_5-1714603063250.png


Append Routes:

AmitHazra_1-1714602715190.png

ArcGIS Pro Diagnostic Monitor:

AmitHazra_6-1714603157294.png

 

Note that the uploadItem created has the network and the centerline copied into it and has the new recordset in both:

AmitHazra_7-1714603261368.png

Hopefully, this gives you a starting point to resolve your Append Routes issue. If all else fails, please reach out to our technical support staff.

-Amit
-Esri Transportation LRS Team

 

 

 

0 Kudos
MirekGroen
New Contributor II

Hi @AmitHazra,

Thanks for your suggestion. By doing so, I could see that my feature class was also uploaded first to the server as a zip file. I could see that the name of the zip file also contained .gdb. By adding this in the zip file name, the problem is actually solved and this makes it possible to use the REST API to append routes.

So for further reference the hierarchy of the uploading item should be:

|--<filename>.gdb.zip
      |--<filename>.gdb
            |-- Source feature class

I have sent a suggestion to the Developers page to update the uploadItemId info.

0 Kudos
MirekGroen
New Contributor II

The solution for this problem is that name of the zip file should contain .gdb, so at the hierarchy becomes:

|--<filename>.gdb.zip
      |--<filename>.gdb
            |-- Source feature class

Using this hierarchy makes it possible to Append Routes through the REST API