I'm looking for a way to programmatically upload a geotif file to AGOL, and then share the image out as a Image Service or another way.
I tried using the AddItem REST API but no luck so far.
Is there anything in JS API or ArcPy that can be used for this purpose?
We'd prefer to get this done without using ArcGIS Server or ArcGIS Desktop/Pro.
Thanks.
It looks like you should be able to do this using ArcPy, but I haven't done it myself.
https://pro.arcgis.com/en/pro-app/latest/arcpy/sharing/introduction-to-arcpy-sharing.htm
Be aware (if you weren't already) that to share raster data as an image service via AGOL you'll need ArcGIS Image for AGOL. Otherwise you can store a geotiff on AGOL, but you can't host it as an image service.