Propose a webhook endpoint; it receives nothing until approved
const url = 'https://deck.example.com/api/v1/hooks';const options = { method: 'POST', headers: {cookie: 'qd_auth=<qd_auth>', 'Content-Type': 'application/json'}, body: '{"kind":"generic","label":"example","to":"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 https://deck.example.com/api/v1/hooks \ --header 'Content-Type: application/json' \ --cookie qd_auth=<qd_auth> \ --data '{ "kind": "generic", "label": "example", "to": "example" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”quietdeck hooks create: an agent proposes an endpoint; it receives nothing until the person approves it.
quietdeck hooks create: an agent proposes an endpoint; it receives nothing until the person approves it.
object
What it’s for, as the person reads it (“Ops alerts”).
The session its events go to, as <tab>@<node> (“alerts@server”).
Responses
Section titled “Responses”What hooks create answers: the endpoint and its URL, shown this once.
What hooks create answers: the endpoint and its URL, shown this once.
object
One endpoint, as Settings and hooks list show it. The secret is never shown again after creation.
object
None until the person approves it: until then it receives nothing (404).
Who proposed it (<tab>@<node>), when an agent did.
<tab>@<node>.
Example
{ "endpoint": { "kind": "generic", "last_failure": null }}default
Section titled “default”An error, with its message.
Every error the REST API returns, with an HTTP status.
object
Example generated
{ "error": "example"}