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
Copy file name to clipboardExpand all lines: docs/Apis/HealthApi.md
+27-2Lines changed: 27 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,8 @@ All URIs are relative to *http://localhost*
4
4
5
5
| Method | HTTP request | Description |
6
6
|------------- | ------------- | -------------|
7
-
|[**health**](HealthApi.md#health)|**GET** /v1/health | Health routes implementation |
7
+
|[**health**](HealthApi.md#health)|**GET** /api/v1/health | Health routes implementation |
8
+
|[**readiness**](HealthApi.md#readiness)|**GET** /api/v1/ready | Readiness endpoint that checks system resources, Redis, Queue, and plugins. |
8
9
9
10
10
11
<aname="health"></a>
@@ -13,7 +14,7 @@ All URIs are relative to *http://localhost*
13
14
14
15
Health routes implementation
15
16
16
-
Note: OpenAPI documentation for these endpoints can be found in the `openapi.rs` file Handles the `/health` endpoint. Returns an `HttpResponse` with a status of `200 OK` and a body of `\"OK\"`.
17
+
Note: OpenAPI documentation for these endpoints can be found in the `openapi.rs` file Handles the `/health` endpoint. Returns an `HttpResponse` with a status of `200 OK` and a body of `\"OK\"`. This endpoint is used for liveness probes in container orchestration platforms.
17
18
18
19
### Parameters
19
20
This endpoint does not need any parameter.
@@ -31,3 +32,27 @@ No authorization required
31
32
-**Content-Type**: Not defined
32
33
-**Accept**: text/plain
33
34
35
+
<aname="readiness"></a>
36
+
# **readiness**
37
+
> ReadinessResponse readiness()
38
+
39
+
Readiness endpoint that checks system resources, Redis, Queue, and plugins.
40
+
41
+
Returns 200 OK if the service is ready to accept traffic, or 503 Service Unavailable if not. This endpoint is used for readiness probes in container orchestration platforms like AWS ECS or Kubernetes. ## Health Check Components - **System**: File descriptor usage, CLOSE_WAIT socket count - **Redis**: Primary and reader pool connectivity - **Queue**: Queue's Redis connections (separate from app's Redis) - **Plugins**: Plugin pool health, circuit breaker state, and connection metrics (if enabled) ## Status Levels - `healthy`: All components operational - `degraded`: Some components degraded but service can function (e.g., reader pool down) - `unhealthy`: Critical components failed, service unavailable ## Plugin Connection Metrics When plugins are enabled, the following connection metrics are exposed: - `shared_socket_available_slots`: Number of additional concurrent plugin executions that can start - `shared_socket_active_connections`: Current number of active plugin execution connections - `shared_socket_registered_executions`: Number of plugin executions currently registered (awaiting response) - `connection_pool_available_slots`: Available connections to the pool server - `connection_pool_active_connections`: Active connections to the pool server These metrics help diagnose connection pool exhaustion and plugin capacity issues. ## Caching Health check results are cached for 10 seconds to prevent excessive load from frequent health checks. Multiple requests within the TTL return the same cached response.
|[**updateNetwork**](NetworksApi.md#updateNetwork)|**PATCH** /api/v1/networks/{network_id} | Updates a network's configuration. Currently supports updating RPC URLs only. Can be extended to support other fields. |
Execute a plugin with optional wildcard route routing
15
19
16
-
Logs and traces are only returned when the plugin is configured with `emit_logs` / `emit_traces`. Plugin-provided errors are normalized into a consistent payload (`code`, `details`) and a derived message so downstream clients receive a stable shape regardless of how the handler threw.
20
+
Logs and traces are only returned when the plugin is configured with `emit_logs` / `emit_traces`. Plugin-provided errors are normalized into a consistent payload (`code`, `details`) and a derived message so downstream clients receive a stable shape regardless of how the handler threw. The endpoint supports wildcard route routing, allowing plugins to implement custom routing logic: - `/api/v1/plugins/{plugin_id}/call` - Default endpoint (route = \"\") - `/api/v1/plugins/{plugin_id}/call?route=/verify` - Custom route via query parameter - `/api/v1/plugins/{plugin_id}/call/verify` - Custom route via URL path (route = \"/verify\") The route is passed to the plugin handler via the `context.route` field. You can specify a custom route either by appending it to the URL path or by using the `route` query parameter.
|**route**|**String**| Optional route suffix for custom routing (e.g., '/verify'). Alternative to appending the route to the URL path. |[optional][default to null]|
24
29
25
30
### Return type
26
31
@@ -35,3 +40,110 @@ Execute a plugin and receive the sanitized result
Execute a plugin via GET (must be enabled per plugin)
48
+
49
+
This endpoint is disabled by default. To enable it for a given plugin, set `allow_get_invocation: true` in the plugin configuration. When invoked via GET: - `params` is an empty object (`{}`) - query parameters are passed to the plugin handler via `context.query` - wildcard route routing is supported the same way as POST (see `doc_call_plugin`) - Use the `route` query parameter or append the route to the URL path
|**plugin\_id**|**String**| The unique identifier of the plugin |[default to null]|
56
+
|**route**|**String**| Optional route suffix for custom routing (e.g., '/verify'). Alternative to appending the route to the URL path. |[optional][default to null]|
Updates mutable plugin fields such as timeout, emit_logs, emit_traces, raw_response, allow_get_invocation, config, and forward_logs. The plugin id and path cannot be changed after creation. All fields are optional - only the provided fields will be updated. To clear the `config` field, pass `\"config\": null`.
|**data**|[**ApiResponse_NetworkResponse_data**](ApiResponse_NetworkResponse_data.md)||[optional][default to null]|
7
+
|**error**|**String**||[optional][default to null]|
8
+
|**metadata**|[**PluginMetadata**](PluginMetadata.md)||[optional][default to null]|
9
+
|**pagination**|[**PaginationMeta**](PaginationMeta.md)||[optional][default to null]|
10
+
|**success**|**Boolean**||[default to null]|
11
+
12
+
[[Back to Model list]](../README.md#documentation-for-models)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to README]](../README.md)
0 commit comments