accsyn-python-api 3.3.1__py3-none-any.whl → 3.3.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- accsyn_api/_version.py +1 -1
- accsyn_api/session.py +55 -0
- {accsyn_python_api-3.3.1.dist-info → accsyn_python_api-3.3.2.dist-info}/METADATA +1 -1
- accsyn_python_api-3.3.2.dist-info/RECORD +8 -0
- accsyn_python_api-3.3.1.dist-info/RECORD +0 -8
- {accsyn_python_api-3.3.1.dist-info → accsyn_python_api-3.3.2.dist-info}/WHEEL +0 -0
- {accsyn_python_api-3.3.1.dist-info → accsyn_python_api-3.3.2.dist-info}/entry_points.txt +0 -0
accsyn_api/_version.py
CHANGED
accsyn_api/session.py
CHANGED
|
@@ -1650,6 +1650,61 @@ class Session(object):
|
|
|
1650
1650
|
return bool(response.get("result"))
|
|
1651
1651
|
|
|
1652
1652
|
|
|
1653
|
+
# Logs/audit
|
|
1654
|
+
|
|
1655
|
+
def logs(
|
|
1656
|
+
self,
|
|
1657
|
+
entitytype: Optional[str] = None,
|
|
1658
|
+
entityid: Optional[str] = None,
|
|
1659
|
+
search: Optional[str] = None,
|
|
1660
|
+
sort: str = "date",
|
|
1661
|
+
sort_reverse: bool = False,
|
|
1662
|
+
pagination_page: Optional[int] = None,
|
|
1663
|
+
pagination_limit: Optional[int] = None,
|
|
1664
|
+
pagination_skip: Optional[int] = None,
|
|
1665
|
+
) -> Dict[str, Any]:
|
|
1666
|
+
"""
|
|
1667
|
+
Return backend disk logs for an entity scope.
|
|
1668
|
+
|
|
1669
|
+
:param entitytype: Optional entity type/scope (workspace, job, user, ...), defaults to 'workspace'.
|
|
1670
|
+
:param entityid: Optional entity ID reference used for entity-specific logs.
|
|
1671
|
+
:param search: Optional free text search string to filter log rows.
|
|
1672
|
+
:param sort: Optional sort key, defaults to 'date'.
|
|
1673
|
+
:param sort_reverse: Reverse sort order when True.
|
|
1674
|
+
:param pagination_page: Optional pagination page number.
|
|
1675
|
+
:param pagination_limit: Optional pagination page size.
|
|
1676
|
+
:param pagination_skip: Optional pagination skip/offset.
|
|
1677
|
+
:return: Raw backend response dictionary, always containing ``result`` and optionally additional metadata.
|
|
1678
|
+
"""
|
|
1679
|
+
if entitytype:
|
|
1680
|
+
entitytype = entitytype.lower().strip()
|
|
1681
|
+
payload: Dict[str, Any] = dict(
|
|
1682
|
+
entitytype=entitytype or "workspace",
|
|
1683
|
+
sort=(sort or "date"),
|
|
1684
|
+
sort_reverse=sort_reverse,
|
|
1685
|
+
)
|
|
1686
|
+
if search:
|
|
1687
|
+
payload["search"] = search
|
|
1688
|
+
|
|
1689
|
+
pagination: Dict[str, int] = {}
|
|
1690
|
+
if pagination_page is not None:
|
|
1691
|
+
if not isinstance(pagination_page, int):
|
|
1692
|
+
raise AccsynException("pagination_page must be an integer!")
|
|
1693
|
+
pagination["page"] = pagination_page
|
|
1694
|
+
if pagination_limit is not None:
|
|
1695
|
+
if not isinstance(pagination_limit, int):
|
|
1696
|
+
raise AccsynException("pagination_limit must be an integer!")
|
|
1697
|
+
pagination["limit"] = pagination_limit
|
|
1698
|
+
if pagination_skip is not None:
|
|
1699
|
+
if not isinstance(pagination_skip, int):
|
|
1700
|
+
raise AccsynException("pagination_skip must be an integer!")
|
|
1701
|
+
pagination["skip"] = pagination_skip
|
|
1702
|
+
if pagination:
|
|
1703
|
+
payload["pagination"] = pagination
|
|
1704
|
+
|
|
1705
|
+
response = self._event("GET", "log/find", payload, entityid=entityid)
|
|
1706
|
+
return cast(Dict[str, Any], response or dict(result=[]))
|
|
1707
|
+
|
|
1653
1708
|
# Misc
|
|
1654
1709
|
def get_api_key(self) -> str:
|
|
1655
1710
|
"""Fetch API key, by default disabled in backend."""
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
accsyn_api/__init__.py,sha256=vSGlQJ7mqd5eE2vElmJ_hnvRy61FkMqFpUXyhhVapTY,121
|
|
2
|
+
accsyn_api/_devtools.py,sha256=nDhD_LKrgGvJXaXxP0RRPMugOLJKMxQkjr8K4gXyOKg,848
|
|
3
|
+
accsyn_api/_version.py,sha256=poXYNHUCOq1GI16s6_1DNOSFQVpp5oAbvhZz_OS3yAw,94
|
|
4
|
+
accsyn_api/session.py,sha256=cFrtqTtfSHq6S0nq0bncFJAuUlSXtLA9Y4vDvAlyhE0,89671
|
|
5
|
+
accsyn_python_api-3.3.2.dist-info/METADATA,sha256=1YraTPqfKEWMqLVjNjc69-2qo0aSiEZG8ZTunTS8r-I,4685
|
|
6
|
+
accsyn_python_api-3.3.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
7
|
+
accsyn_python_api-3.3.2.dist-info/entry_points.txt,sha256=i6jv25cTq1_QzeTlRV6MYIzsyfikRe1Bk4ETWkyXVqU,50
|
|
8
|
+
accsyn_python_api-3.3.2.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
accsyn_api/__init__.py,sha256=vSGlQJ7mqd5eE2vElmJ_hnvRy61FkMqFpUXyhhVapTY,121
|
|
2
|
-
accsyn_api/_devtools.py,sha256=nDhD_LKrgGvJXaXxP0RRPMugOLJKMxQkjr8K4gXyOKg,848
|
|
3
|
-
accsyn_api/_version.py,sha256=Rb8h7-M-5CBkSuIeh1jk_0CXv51zdiyw-2QugO9fnNc,94
|
|
4
|
-
accsyn_api/session.py,sha256=bpOvNJFPOz47SwO2UE_tt4_AW82gk3vstKwo0dZLABM,87273
|
|
5
|
-
accsyn_python_api-3.3.1.dist-info/METADATA,sha256=iHzMZc1ySfce_qLRapS6sF8-p00iiA_Xy8YcPGrJ75Q,4685
|
|
6
|
-
accsyn_python_api-3.3.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
7
|
-
accsyn_python_api-3.3.1.dist-info/entry_points.txt,sha256=i6jv25cTq1_QzeTlRV6MYIzsyfikRe1Bk4ETWkyXVqU,50
|
|
8
|
-
accsyn_python_api-3.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|