Replace the active override of a scope (optional TTL)
const url = 'http://localhost:3000/capture/override';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"connectionId":"example","config":{"rates":{"additionalProperty":1},"rules":[{"match":"example","status":"delivered","delayMs":1,"smtpCode":1}],"latency":{"minMs":1,"maxMs":1},"chaos":{"errorRate":1,"httpCodes":[500],"smtpCodes":[451]},"rateLimit":{"limit":1,"windowSeconds":1,"burst":1}},"ttl":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/capture/override \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "connectionId": "example", "config": { "rates": { "additionalProperty": 1 }, "rules": [ { "match": "example", "status": "delivered", "delayMs": 1, "smtpCode": 1 } ], "latency": { "minMs": 1, "maxMs": 1 }, "chaos": { "errorRate": 1, "httpCodes": [ 500 ], "smtpCodes": [ 451 ] }, "rateLimit": { "limit": 1, "windowSeconds": 1, "burst": 1 } }, "ttl": 1 }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
object
object
object
object
object
Responses
Section titled “Responses”The new state.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Example
{ "workspace": { "config": { "rules": [ { "status": "delivered" } ], "chaos": { "httpCodes": [ 500 ], "smtpCodes": [ 451 ] }, "rateLimit": { "windowSeconds": 1 } }, "activatedVia": "simulation" }, "connections": [ { "config": { "rules": [ { "status": "delivered" } ], "chaos": { "httpCodes": [ 500 ], "smtpCodes": [ 451 ] }, "rateLimit": { "windowSeconds": 1 } }, "activatedVia": "simulation" } ], "effective": { "additionalProperty": { "rates": { "delivered": 100 }, "rules": [], "latency": { "minMs": 0, "maxMs": 0 }, "openRate": 0, "clickRate": 0 } }}Headers
Section titled “Headers”Id of the request (req_…), also the id of its request log row.
Id of the request (req_…), also the id of its request log row.
Error: validation_error
object
object
Example
{ "error": { "code": "unauthorized" }}Headers
Section titled “Headers”Id of the request (req_…), also the id of its request log row.
Id of the request (req_…), also the id of its request log row.
Error: unauthorized
object
object
Example
{ "error": { "code": "unauthorized" }}Headers
Section titled “Headers”Id of the request (req_…), also the id of its request log row.
Id of the request (req_…), also the id of its request log row.
Sent with every 401.
Sent with every 401.
Error: forbidden
object
object
Example
{ "error": { "code": "unauthorized" }}Headers
Section titled “Headers”Id of the request (req_…), also the id of its request log row.
Id of the request (req_…), also the id of its request log row.
Error: conflict
object
object
Example
{ "error": { "code": "unauthorized" }}Headers
Section titled “Headers”Id of the request (req_…), also the id of its request log row.
Id of the request (req_…), also the id of its request log row.
Error: payload_too_large
object
object
Example
{ "error": { "code": "unauthorized" }}Headers
Section titled “Headers”Id of the request (req_…), also the id of its request log row.
Id of the request (req_…), also the id of its request log row.
Error: validation_error
object
object
Example
{ "error": { "code": "unauthorized" }}Headers
Section titled “Headers”Id of the request (req_…), also the id of its request log row.
Id of the request (req_…), also the id of its request log row.
Error: internal_error
object
object
Example
{ "error": { "code": "unauthorized" }}Headers
Section titled “Headers”Id of the request (req_…), also the id of its request log row.
Id of the request (req_…), also the id of its request log row.