I'm trying to upload a web map definition to our ArcGIS Online Organizational Account through the ArcGIS Portal REST API. I'm using python to construct and issue the request. So far I can retrieve information about items, but I've yet to successfully use the AddItem Operation. I keep getting "{"error":{"code":403,"messageCode":"GWM_0003","message":"You do not have permissions to access this resource or perform this operation.","details":[]}}
However, I am using the admin account, getting a token and can perform other operations, such as Item, to get a json definition of a web map.
Here is the URL:
https://<AGOL Organizational URL>/sharing/rest/content/users/<username>/addItem?f=json
Attached is a scrubbed version of the JSON I'm trying to post through the operation. Should this be allowed, and if so, is there a document available that shows what the JSON payload should look like to successfully use the addItem operation?