ArcGIS Online - REST API - folderID ?

6094
6
10-08-2014 01:09 PM
Drew
by
Occasional Contributor III

Hello,

I am attempting to  'move' an item in ArcGIS online from folder A to folder B through the REST API, but according to the documentation it states I need a folder id to move to. Usually I can get an item ID from the web site, but no where do I see a folder id.

Does anyone know how I can acquire the folder ID I need?

I am just going to hard code it into my application so I am not looking for code, just some what I can find this unique ID.

Any help would be appreciated.

Andrew

Tags (2)
0 Kudos
6 Replies
Drew
by
Occasional Contributor III

Well I located the 'folderId' for the moveItem command, but its not a friendly way...Maybe there is an easier way, please let me know..

My Steps...

  • Navigate to the folder on ArcGIS.com (or your Portal)
  • Click the 'Add Item' link
    • The dialog will appear...
  • Open FireBug (or some other HTTP traffic inspection tool)
  • Select the 'Browse'
  • Find a .CSV file on your computer  - or create some temp.csv file)
  • Click Open within your dialog (or double click)
  • Now watch in Firebug for the /addItem command
  • From there you will find the folder ID before the /addItem in the URL - it will be a GUID

I hope there is a better way to get this id, please let me know.

Drew

HeathBrackett1
Occasional Contributor II

I was about to post the same question.  There seems to be no folder access in the REST API.  I'd not only like to access the folderID, but also the folderName.  I'd like to be able to change a folder name via the API.

Heath

0 Kudos
Drew
by
Occasional Contributor III

Heath,

I am using Firebug to get all the information I need when the documentation lacks it..

Here is the REST request you need to get folder info + names

http://<MY URL>/sharing/rest/content/users/<USERNAME>?f=pjson&token=<TOKEN>

Drew

0 Kudos
HeathBrackett1
Occasional Contributor II

Thanks Drew.  That should help.

Heath

0 Kudos
EOCSupport
New Contributor II

This is almost 7 years old now so I would hope that you found this easier solution already but I was linked here by another post and figure someone should update for any future visitors. Here is a simpler way to grab a folder ID, simply navigate to the folder in your contents and the id will be in the url (...arcgis.com/...folder=THISISYOURFOLDERID...)

JenMcRuer
Occasional Contributor

Hello, 

I am having a similar issue.  

I have just moved items from a colleague's ArcGIS Online content folder to my own.  I kept all files in the same folders. 

One moved file/folder is an active survey designed in Survey123 Connect. When I open this survey's files in Connect, I no longer have an xls form attached. AND the main survey icon is prompting me to refresh - but warns me "do I really want to download and overwrite?"  - I'm worried about losing data and the survey content itself. 

I have checked the folderID in My Survey Designs> iteminfo file on my computer, and it matches the folder ID enclosing the survey content in ArcGIS online. 

I also no longer see the xls in My Survey Designs survey folder on my computer.  Can I just upload the xls form into this folder again?  And if so, what happens when I download and overwrite in Connect to refresh? 

Lastly, I am using a new MacBook Air and understand that services will no longer be updated for Connect. Could this be part of the issue?

Thank you

0 Kudos