Select to view content in your preferred language

layers & tables in service not appearing on AGOL but present when querying with API

561
3
07-18-2023 06:14 AM
mikAMD
by
Occasional Contributor III

So for the past couple of weeks I had this problem where tables and layers that I would add in an existing service with the API would not show up on AGOL, but they were present on the server since I could successfully see them with the API, add data and query this data also.

I've just found out what was the problem which I'll post as an answer for anybody coming accross this problem.

0 Kudos
3 Replies
mikAMD
by
Occasional Contributor III

So I add layers with the python API with the add_to_definition() function for the service (FeatureLayerCollection()), but I assume this problem is the same regardless of the method used. Usually I would not specifiy the ID for a new table/layer, as the server would just attribute the max one already existing + 1.

But I finally noticed that the tables and layers that would not appear on AGOL have an ID that is bigger than 25. So I tried adding other tables but this time with specifying an ID that was lower than 26 (I had previously deleted other layers and tables in service, meaning there were gaps between some of the IDs), and voilà, they are all present on AGOL.

So it seems that tables and layers with an ID higher than 25 do not show up on AGOL. I have notified ESRI support, still waiting on their answer to confirm if I'm crazy or this is a bug.

0 Kudos
mikAMD
by
Occasional Contributor III

Well, it seems I was hasty. I was indeed able to add 3 tables with an ID lower than 26, and all 3 are visible on AGOL. However, I just added a layer with ID 24 and this one is not visible... 😩

0 Kudos
YS2388
by
New Contributor III

I'm having the exact same issue. Hopefully someone out there has a fix...

Thanks!

0 Kudos