Skip to main content

Open Circuit Breaker

Endpoint: POST /api/registry/service/{name}/circuit-breaker/open

Manually forces the circuit breaker to the open state, blocking all requests to the service.

Note

The circuit breaker is initialized only after at least one request has been made to the service. If the service does not exist or the circuit breaker has not been initialized yet, this endpoint returns 404.

Path parameters

ParameterDescriptionTypeRequired/ Optional
nameThe name of the service whose circuit breaker is to be opened.stringRequired.

Response

Returns a 200 OK with the circuit breaker status, including the service name, previous and current states, transition timestamp, and a status message.

Examples

Open circuit breaker

Request

curl -X 'POST' \
'https://<YOUR-SERVER-URL>/api/registry/service/petstore/circuit-breaker/open' \
-H 'accept: application/json' \
-H 'X-Authorization: <TOKEN>'

Response

{
"service": "petstore",
"previousState": "CLOSED",
"currentState": "OPEN",
"transitionTimestamp": 0,
"message": "Circuit breaker transitioned from CLOSED to OPEN"
}