Can I use ArcPY to do this? It seems like ArcPy is limited to AGOL hosted layer and ArcGIS server web services. What other scripting options are available so I can publish my feature layers in Portal?
Take a look at ArcREST.
https://community.esri.com/community/developers/gis-developers/python?sr=search&searchId=6bd1be40-c109-45f5-9987-87ec25ceb705&searchIndex=0
ArcRest would be good to look into, but generally, if you're familiar with http requests and can monitor them using Fiddler or the Dev Tools, and you're familiar with how to submit requests using Python, you should be able to recreate the requests creating a service manually makes in Python. There's a sample script on creating hosted tiled layers, perhaps it can easily be modified.
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.