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.
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.
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... 😩
I'm having the exact same issue. Hopefully someone out there has a fix...
Thanks!
Hi all,
Did anyone ever get to the bottom of this? Did Esri fix the issue or present an effective solution somewhere? I just added a layer successfully to a hosted feature layer via the ArcGIS API for Python using add_to_definition, and it isn't showing anywhere in the AGOL user interface (I can add the layer manually using the url for the service, but it would be great if this step wasn't necessary - having to fix things via the UI defeats the purpose of scripting...)
Problem still present for me.