REST APIのHistory endpoint<\/A>は、組織内で発生しているイベントに関する情報を掘り下げるのに最適なツールです。ArcGIS Onlineの管理者として包括的なCSV形式のイベントを簡単にダウンロードできますが、REST APIでは返されるデータをカスタマイズし、より具体的な質問をするオプションがあります。history CSVの使い方の例については、このブログをご覧ください:https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-\/administration\/exploring-the-organization-activity-log-csv<\/SPAN><\/A> <\/SPAN><\/P> <\/SPAN><\/P>このブログでは、特定の組織のログインイベントに関する情報をエクスポートするために必要なクエリを探ります。このAPIで特定のパラメーターを使用するには現在、BUG-000120745のためCSV形式を使用する必要があります。これは将来のリリースで対応予定ですが、大量の情報にはCSV形式が最適です。<\/P> <\/SPAN><\/P>シナリオ:<\/STRONG> 管理者のAndyは、2019年2月にどのユーザーがArcGIS Onlineにログインし、どのアプリからログインしたかを理解したいと考えています。彼は従業員のOreo J. Sampsonがパスワードを知らないのではないかと密かに疑っており、毎日リセットを頼んでいるため聞くのを恐れています。Andyは組織のログイン情報を確認して検証します。<\/SPAN><\/P><\/P>調査手順:<\/STRONG><\/SPAN><\/P> <\/SPAN>クエリを作成する:<\/LI><\/OL>URL:<\/STRONG> https:\/\/sampson23.maps.arcgis.com\/sharing\/rest\/portals\/self\/history<\/A>?<\/P>パラメーター:<\/STRONG><\/P>all=true<\/EM> 組織内すべてのメンバーのイベントを返します<\/P>start=0<\/EM> 最初のレコードから開始<\/P>num=10000<\/EM> 返される最大イベント数(csv形式が必要)<\/P>f=csv<\/EM> 結果をcsvで返す<\/P>sortOrder=asc<\/EM> 昇順で情報を出力<\/P>token = 2hVsODGfBpk5X_hGc0MOrnxmddIk4bL4hP8FyOAxM0QxL3VEw86iTdB2管理者トークンが必要<\/EM><\/P>fromDate =2019-02-01<\/EM> 日付範囲の開始日<\/P>toDate=2019-02-28<\/EM> 日付範囲の終了日<\/P>actions= failedlogin<\/EM> 返されるイベントタイプ<\/P> <\/P>作成されたサンプルURL:<\/STRONG><\/P>https:\/\/sampson23.maps.arcgis.com\/sharing\/rest\/portals\/self\/history?all=true&start=0&actions=failedLogin&sortOrder=asc&toDate=2019-02-28&fromDate=2019-02-01&num=10000&f=csv&token=<token<\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/><\/>
パラメーター:<\/STRONG><\/P>all=true<\/EM> 組織内すべてのメンバーのイベントを返します<\/P>start=0<\/EM> 最初のレコードから開始<\/P>num=10000<\/EM> 返される最大イベント数(csv形式が必要)<\/P>f=csv<\/EM> 結果をcsvで返す<\/P>sortOrder=asc<\/EM> 昇順で情報を出力<\/P>token = 2hVsODGfBpk5X_hGc0MOrnxmddIk4bL4hP8FyOAxM0QxL3VEw86iTdB2管理者トークンが必要<\/EM><\/P>fromDate =2019-02-01<\/EM> 日付範囲の開始日<\/P>toDate=2019-02-28<\/EM> 日付範囲の終了日<\/P>actions= failedlogin<\/EM> 返されるイベントタイプ<\/P> <\/P>作成されたサンプルURL:<\/STRONG><\/P>
This is incredibly helpful information, Thanks for the great post!
I am wondering if it is possible to create this same type of log file using the python API and pandas data frame? My management is looking for statistics on user adoption and they want to see the when and how our users are accessing our AGOL site. Ideally, they would love to see stats going back to late 2017 / 2018. From what I can tell the Python API has a history method that could be used; however, I am not able to find a way to filter out unwanted events (i.e. actions=login and a subset of GIS technicians ). Also given the csv limitation (max of 10k events) and the amount of time I need to go back both AGOL Download Activity Log and the Python API history method don’t seem to be great options.
Any suggestions would be greatly appreciated.
kgerrow@esri.com
Thanks for the informative post!
I have a similar question to Matt's above -- we're trying to get a sense of how many active ArcGIS Pro users we have in a given year. Since we used named accounts, I did a query using the REST API with "actions=login" and "clientId=arcgisprodesktop" as part of the parameters. Worked well, but I'm getting hampered by the 10k limitation. Is there any way to download/access more than 10k rows at a time?
Hi,
Matt Martin/USA Martin, I'm looking into your questions with the Python API. Will let you know when I have more information.
Reina Murray, there is a 10k limit to the amount of records that can be retrieved in a single request. I would recommend either using a filter like search only for login actions to try to limit the query, or make multiple requests to the history api on different dates. This way you can break up your requests so they don't exceed the 10K limit.
The limit ensures that data queried through this API is performant, so therefor will need logic to parse through different days if you do want to collect and analyze these actions.
Reina Murray My workaround to the 10k max, though not ideal, was to use postman and make multiple requests to the history api as suggested above. However, in doing so I discovered that the history api seemed to ignore my toDate (end of date range) parameter. This meant I ended up getting duplicate events when I combined all of the csv exports together. I used the “ReqID” field as the unique identifier to remove all duplicates except the first occurrence. This can be easily done in excel using a free add-in called Kutools.
Kelly Gerrow Thank you for looking into this some more for me. I would also like to ask if you know if the history api has a limit to how far it can go back. I tried using the multiple request workflow like you mentioned above using the first and last day of each month (exp. 2018-01-01 to 2018-01-31).
My hope was to start at Jan 1st 2018 and go month by month till I reached the current date (Jan 9th 2020). The weird thing was that it was not until August (2018-08-01 to 2018-08-31) that I got my first login result of Dec 6, 2018.
I know I should have had login events prior to this date as I am able to view older content creation, deletion, and sharing events using the download activity log, located on the AGOL organization overview page. Any additional resources you may know of would be incredibility helpful.
Thank you again!!!
I tried with my ArcGIS Enterprise 10.7.1, but always the csv has not rows. There is something to do at DataStore or setting some options somewhere?
I just read the note: Only available with ArcGIS Online, then I wonder if this functionality will be migrate toward on-premise environment, I means ArcGIS Enterprise ?
Is there a way to view login events on ArcGIS Enterprise?
Hi everyone,
Any update related to login events on ArcGIS Enterprise. I got the same as @FranciscoHernandez2 when I execute the following endpoint:
https://<root>/portal/sharing/rest/portals/self/history?all=true&start=0&actions=failedLogin&sortOrder=asc&toDate=2019-02-28&fromDate=2019-02-01&num=10000&f=csv&token=%3Ctoken
The csv output file (auditLog.csv) have empty rows. Is there any alternative to obtain a tracking report?
Thanks,
S.
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.