File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,25 @@ class NodeStatistics(pdt.BaseModel):
115115@read_router .get ('/nodes/statistics' , response_model = NodeStatistics )
116116@with_dbenv ()
117117async def get_nodes_statistics (user : int | None = None ) -> dict [str , t .Any ]:
118- """Get node statistics."""
118+ """Get node statistics.
119+
120+ :param user: Optional user PK to filter statistics by user.
121+ :return: A dictionary containing total node count, counts by node type, and creation time statistics.
122+
123+ >>> {
124+ >>> "total": 47,
125+ >>> "types": {
126+ >>> "data.core.int.Int.": 42,
127+ >>> "data.core.singlefile.SinglefileData.": 5,
128+ >>> ...
129+ >>> },
130+ >>> "ctime_by_day": {
131+ >>> "2012-01-01": 10,
132+ >>> "2012-01-02": 15,
133+ >>> ...
134+ >>> },
135+ >>> }
136+ """
119137
120138 from aiida .manage import get_manager
121139
You can’t perform that action at this time.
0 commit comments