Toggle Source
PUT
/api/settings/sources/{source_id}
const url = 'http://localhost:8000/api/settings/sources/example?enabled=true';const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url 'http://localhost:8000/api/settings/sources/example?enabled=true' \ --header 'Authorization: Bearer <token>'Enable or disable a data source.
Operator intent is authoritative: enabling a source also force-enables its health row (clears any auto_disabled state and pins manual_override) so the health layer can never auto-disable a source the operator just enabled.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”source_id
required
Source Id
string
Query Parameters
Section titled “Query Parameters”enabled
Enabled
boolean
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Examplegenerated
exampleValidation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}