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