GoodMemGoodMem
ReferenceAPIREST APIAdmin

Request the server to enter drain mode

POST /v1/admin:drain: Initiates drain mode and optionally waits for the server to quiesce.

POST
/v1/admin:drain

Initiates drain mode and optionally waits for the server to quiesce.

Authorization

ApiKeyAuth
headerx-api-key<token>

Header Parameters

GoodMem-Timeout-Ms?integer

Optional waiting budget in milliseconds, measured from REST servlet ingress and shared across all internal gRPC calls. Supply one decimal integer from 1 to 86400000. Omission adds no deadline. Existing shorter deadlines still apply. Expiry returns HTTP 504 before streaming starts; after streaming starts, no successful completion event is sent. Use SSE or opt into GoodMem-Stream-Terminal for an explicit terminal outcome. Retrieval work is cooperatively cancelled. An accepted mutation may still commit after timeout or disconnect; a failed response does not imply rollback.

Formatint64
Range1 <= value <= 86400000

Request Body

application/json
  1. body
timeoutSec?|

Maximum seconds to wait for the server to quiesce before returning.

Formatint32
Default900
reason?|

Human-readable reason for initiating drain mode.

waitForQuiesce?|

If true, wait for in-flight requests to complete and the server to reach QUIESCED before responding.

Response Body

Drain request acknowledged

application/json
  1. response
state?string

Lifecycle state reported after the drain request was processed.

Value in"STARTING""READY""DRAINING""QUIESCED"
quiesced*boolean

Whether the server has reached the QUIESCED lifecycle state.

message?string

Human-readable status message describing the drain outcome.

Example Request
curl -X POST 'https://your-goodmem-server.example.com/v1/admin:drain' \  -H 'GoodMem-Timeout-Ms: 30000' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "state": "STARTING",  "quiesced": true,  "message": "string"}