You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""`Retrieve usage data and limits per space <https://developer.cognite.com/api#tag/Statistics/operation/getSpaceStatisticsByIds>`_
63
+
64
+
See also: `Retrieve statistics and limits for all spaces <https://developer.cognite.com/api#tag/Statistics/operation/getSpaceStatistics>`_
65
+
66
+
Args:
67
+
space (str | SequenceNotStr[str] | None): The space or spaces to retrieve statistics for.
68
+
return_all (bool): If True, fetch statistics for all spaces. If False, fetch statistics for the specified space(s).
69
+
70
+
Returns:
71
+
InstanceStatsPerSpace | InstanceStatsList: InstanceStatsPerSpace if a single space is given, else InstanceStatsList (which is a list of InstanceStatsPerSpace)
72
+
73
+
Examples:
74
+
75
+
Fetch statistics for a single space:
76
+
77
+
>>> from cognite.client import CogniteClient
78
+
>>> client = CogniteClient()
79
+
>>> res = client.data_modeling.statistics.per_space("my-space")
80
+
81
+
Fetch statistics for multiple spaces:
82
+
>>> res = client.data_modeling.statistics.per_space(
83
+
... ["my-space1", "my-space2"]
84
+
... )
85
+
86
+
Fetch statistics for all spaces (ignores the 'space' argument):
87
+
>>> res = client.data_modeling.statistics.per_space(return_all=True)
0 commit comments