Portal Share (Get Share URL)

741
3
Jump to solution
04-21-2020 11:43 AM
GregHorne
New Contributor III

I have added and shared a CSV onto Portal.

item = gis.content.add(file_properties, file)
item_share = item.share(everyone=True, org=True, groups=None, allow_members_to_edit=False)

How do I retrieve the share-url?

Thanks,

Greg

0 Kudos
1 Solution

Accepted Solutions
JakeSkinner
Esri Esteemed Contributor

Hi Greg,

You can obtain the item id from your item variable (item.id) and append it to a URL with /data at the end.  Here is an example URL:

https://<portal.domain.com>/<webadaptor>/sharing/rest/content/items/<itemid>/data 

View solution in original post

0 Kudos
3 Replies
JakeSkinner
Esri Esteemed Contributor

Hi Greg,

You can obtain the item id from your item variable (item.id) and append it to a URL with /data at the end.  Here is an example URL:

https://<portal.domain.com>/<webadaptor>/sharing/rest/content/items/<itemid>/data 

0 Kudos
GregHorne
New Contributor III

Jake,

That worked. 

Thanks.

0 Kudos
JakeLovelace
New Contributor

I am trying to use this format to generate share links for some of my webmaps. But when I try this URL format it just returns JSON. How do I make it return the webmap as a public link?

0 Kudos