| Bug-ID-Nummer |
BUG-000149835 |
| Eingereicht | June 8, 2022 |
| Zuletzt geändert | June 5, 2024 |
| Gilt für | ArcGIS API for Python |
| Gefunden in Version | 1.9.1 |
| Betriebssystem | Windows OS |
| Betriebssystemversion | 10.0 64 Bit |
| Status | As Designed
Nach Überprüfung durch das Entwicklungsteam wurde festgestellt, dass dieses Verhalten wie geplant ist. Weitere Informationen finden Sie im Abschnitt "Zusätzliche Informationen".
|
Zusätzliche Informationen
The URL used to initialize a logs object must be initialized using the portaladmin URL. The logs object does not need to be initialized directly using the Logs class but instead is available as a logs property of the admin manager object.
from arcgis.gis import GIS
portal_connection = GIS("portal_url", "username", "password")
logs = portal_connection.admin.logs
Testing after initializing in this manner returned appropriate results when the input start_time and end_time arguments were either:
* a DateTime object
* a timestamp object with time (no milliseconds): ex "2022-06-06T16:56:26"
* a floating object representing seconds: 1654548986.911
Workaround
Use the second Python script sample with the Python Datetime object and portal timestamp without using milliseconds (YYYY-MM-DDTHH:MM:SS) as inputs for the 'start_time' and 'end_time' arguments.
Schritte zur Reproduzierung