Select to view content in your preferred language

Uploading an Item via REST API

898
1
02-27-2019 07:06 AM
AlexanderFischer
Occasional Contributor

By using the REST API, I have tried to upload a zipped shapefile that is on my computer to my ArcGIS Online account as an item. I used the URL below:

https://www.arcgis.com/sharing/rest/content/users/Zeno_10/addItem

And these are the five parameters that I have used:

"f" : "json"

"dataUrl" : @"D:\Temp\Shape12.zip"

"title" : "Shapeeee"

"type" : "shapefile"

"token" : "[My token Text]"

You can see the JSON response below:

{
"error": {
"code": 400,
"messageCode": "CONT_00272",
"message": "!CONT_00272!",
"details": []
}
}

I have two questions related to REST API:

1-) Which parameters do I need to use if I want to upload my zipped shapefile to the Contents in my ArcGIS Online account? I have looked into the documentation below but couldn't figure out which parameters to use and how.

Add Item—ArcGIS REST API: Users, groups, and content | ArcGIS for Developers 

2-) The error message is impossible to understand. What does "CONT_00272" mean? Is there a documentation that explains these error codes?

Thanks

0 Kudos
1 Reply
JoeHershman
MVP Regular Contributor

I know this is old, but if anyone comes here looking for the solution I have posted it another thread.  

Create PortalItem with zip file

 

Thanks,
-Joe
0 Kudos