HTTPv1

异步操作

Server 当前 异步操作 接口;路径、方法、状态码与处理器签名直接来自 0.8.4 源码。

源码 packages/fastsim-plugin-server/src/fastsim_plugin_server/application.py

接口 3

GET/api/v1/operationslist_operations
200dict[str, object]

List operations

处理器list_operations
签名async list_operations(offset: int=Query(default=0, ge=0, le=100000), limit: int=Query(default=50, ge=1, le=200), state: _OperationStateFilter=None, kind: str | None=Query(default=None, min_length=1, max_length=128, pattern='^[a-z][a-z0-9_.-]*$')) -> JSONResponse
源码L2771
REQUEST
curl -X GET \
  http://127.0.0.1:8000/api/v1/operations
DELETE/api/v1/operations/{operation_id}cancel_operation
200dict[str, object]

Cancel operation

处理器cancel_operation
签名async cancel_operation(operation_id: str=Path(min_length=36, max_length=36, pattern='^[0-9a-f-]{36}$')) -> JSONResponse
源码L2797
REQUEST
curl -X DELETE \
  http://127.0.0.1:8000/api/v1/operations/{operation_id}
GET/api/v1/operations/{operation_id}get_operation
200dict[str, object]

Get operation

处理器get_operation
签名async get_operation(operation_id: str=Path(min_length=36, max_length=36, pattern='^[0-9a-f-]{36}$')) -> JSONResponse
源码L2787
REQUEST
curl -X GET \
  http://127.0.0.1:8000/api/v1/operations/{operation_id}