Select to view content in your preferred language

Portal items- number of views

7391
13
05-02-2018 09:47 PM
JosephJose
Occasional Contributor

Somewhere in conversation, I came across a json url which gives me the number of views on the particular item be it a webmap, app, kml.

Have lost it .Can someone point me out correctly?

Is it something that only an admin can do?

13 Replies
hoogw
by
Frequent Contributor

I found a bug/error in ESRI REST API, please fix the bug in code or update doc either way:

https://developers.arcgis.com/rest/users-groups-and-items/item.htm

the api reads:      

https://<content-url>/items/<itemId>

also give example at bottom

https://www.arcgis.com/sharing/rest/content/items/10ba62fe50864339a8a3e0f18ca85506

You actually will NOT get any info by use above link format. Only a blank page

You must add  

?f=json

by define format to get something

This is a working example:

https://www.arcgis.com/sharing/rest/content/items/a22e7905d67f4330bbec630eebd38419?f=json 

esri staff, please fix the rest api code, by define 'f=json' format by default.

or update the rest api doc above, by put a NOTE: * remind user must append ?f=json at the url end

PatrickMcKinney99
Regular Contributor

Adding f?=psjon will return an easier to read version.  But if run within a script, I guess that doesn't matter as much. 

0 Kudos
Borch
by
Occasional Contributor

Dear all,

Is there any workflow to reset the numviews property without connecting to the portal postgres database?

I cannot find the way to update the property in sharing/rest.

Best

Borja

0 Kudos
ToddW_stl
Esri Contributor

Yes!  I posted a solution on another reply in this thread.

0 Kudos