Commit a workflow version
const url = 'http://api.disclosebot.localdev:3000/v1/channels/example/workflow_versions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"data":{"type":"workflow_version","attributes":{"definition":{"steps":{"additionalProperty":{"kind":"triage","needs":["example"],"task":"summary","engine":"ai","scale":"standard","instructions":"example","method":"prompt","lookback_days":1,"public_key_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","integration":{"type":"Webhook","id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"},"cloaked":"send","only_when":{"additionalProperty":["example"]}}}}}}}'};
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://api.disclosebot.localdev:3000/v1/channels/example/workflow_versions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "data": { "type": "workflow_version", "attributes": { "definition": { "steps": { "additionalProperty": { "kind": "triage", "needs": [ "example" ], "task": "summary", "engine": "ai", "scale": "standard", "instructions": "example", "method": "prompt", "lookback_days": 1, "public_key_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "integration": { "type": "Webhook", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }, "cloaked": "send", "only_when": { "additionalProperty": [ "example" ] } } } } } } }'Records the definition as the next version and makes it the running version. Refused with 409 when it equals the running version, and with 422 when the definition fails the checks.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”object
object
object
The flat workflow definition: one entry per step keyed by name
object
object
One step of a workflow definition; the fields depend on kind
object
Names of the steps this step runs after
Triage only
Triage only; rule is available for scope and duplicate
Triage, severity only
Triage, severity with the custom scale
Triage, duplicate with the ai engine
Triage, duplicate only
Transmit only; the body is encrypted to this key before delivery, and sent as it stands without one
Transmit only
object
Transmit only; what to do with a report the reporter encrypted in the browser: send its ciphertext as it stands, or send no body
Transmit only; result key to the allowed values
object
Responses
Section titled “ Responses ”Committed
object
object
object
The flat workflow definition: one entry per step keyed by name
object
object
One step of a workflow definition; the fields depend on kind
object
Names of the steps this step runs after
Triage only
Triage only; rule is available for scope and duplicate
Triage, severity only
Triage, severity with the custom scale
Triage, duplicate with the ai engine
Triage, duplicate only
Transmit only; the body is encrypted to this key before delivery, and sent as it stands without one
Transmit only
object
Transmit only; what to do with a report the reporter encrypted in the browser: send its ciphertext as it stands, or send no body
Transmit only; result key to the allowed values
object
object
object
Example
{ "data": { "type": "workflow_version", "attributes": { "definition": { "steps": { "additionalProperty": { "kind": "triage", "task": "summary", "engine": "ai", "scale": "standard", "method": "prompt", "integration": { "type": "Webhook" }, "cloaked": "send" } } } } }}Unauthorized
Another organisation
No changes against the running version
Check errors