Update a channel
PATCH
/v1/channels/{id}
const url = 'http://api.disclosebot.localdev:3000/v1/channels/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"data":{"type":"channel","attributes":{"name":"example","short_description":"example","enabled":true,"prefilter_query":{"q":{"additionalProperty":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"]},"results":{"additionalProperty":{"additionalProperty":"example"}}},"prefilter_saved_search_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://api.disclosebot.localdev:3000/v1/channels/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "data": { "type": "channel", "attributes": { "name": "example", "short_description": "example", "enabled": true, "prefilter_query": { "q": { "additionalProperty": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }, "results": { "additionalProperty": { "additionalProperty": "example" } } }, "prefilter_saved_search_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } } }'Updates the fields and the pre-filter. enabled: true enables the channel, enabled: false disables it. The workflow is never changed here; commit a workflow version instead.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
Request Body required
Section titled “Request Body required ” Media type application/json
object
data
required
object
type
required
string
attributes
object
name
string
short_description
string
enabled
True enables, false disables
boolean
prefilter_query
A custom pre-filter; send null with a prefilter_saved_search_id
object
q
object
key
additional properties
One of:
string
Array<string>
results
object
key
additional properties
object
key
additional properties
string
prefilter_saved_search_id
A saved search the pre-filter reads live; send null with a prefilter_query
string format: uuid
Responses
Section titled “ Responses ”Enabled with enabled true
Media type application/json
object
data
required
object
id
required
string format: uuid
type
required
string
attributes
required
object
name
required
string
short_description
string
enabled
required
boolean
enabled_at
string format: date-time
prefilter_query
The custom pre-filter; null when the pre-filter references a saved search or there is none
object
q
object
key
additional properties
One of:
string
Array<string>
results
object
key
additional properties
object
key
additional properties
string
prefilter_saved_search_id
The saved search the pre-filter reads; its query applies as it is now. Never set together with prefilter_query
string format: uuid
running_version_number
integer
steps_summary
Array<string>
created_at
required
string format: date-time
updated_at
required
string format: date-time
relationships
object
organization
object
workflow
object
prefilter_saved_search
object
Example
{ "data": { "type": "channel" }}Unauthorized
Another organisation
Name taken