How to add result CSV file in Content -> Add Item

372
2
06-29-2020 04:09 AM
sandhyabaratam
New Contributor

Hi Team,

custom widget: 

I would like to add my  result set as a CSV file in Home-> Content section. it is plain CSV data. 

This is useful for my user while working for larger quantities of data.user can download the result at a later point of time.

Can someone please guide me on this?

Any help is greatly appreciated.

Regards,

Sandhya

0 Kudos
2 Replies
sandhyabaratam
New Contributor

Hi,

I got an update on the mentioned issue.

I tried below as per- Add Item—ArcGIS REST API: Users, groups, and content | ArcGIS for Developers 

url--

http://<hostname>/arcgis/sharing/rest/content/users/<user>/addItem

Inputs--

Text: plain CSV formatted text 

Title: resultCSV

Type: CSV

This is adding a CSVFile in Content and providing and "id" with status as "success". But when we try to view/download the added item in Portal->Content, it is not displaying my input "plain CSV text" anywhere and it is not able to download also.

Error on clicking download button-- "Item does not have a file".

Can someone please help on this. How to retrieve the input data if the above addItem approach is correct. I am not getting any clues on this topic. 

Regards,

Sandhya 

0 Kudos
HarishPalaniappan
New Contributor III
Hi Sandhya,
Based on the detail you provided – looks like you are adding the file through API – you have to publish it for sharing on Arcgis. You may have to call publish item API -  https://developers.arcgis.com/rest/users-groups-and-items/publish-item.htm
 
If this is for manually adding and sharing the file. Please use steps from here  https://doc.arcgis.com/en/arcgis-online/manage-data/add-items.htm
0 Kudos