Sorry, no results found for "".
Returns a resource object of type webhook
1import { buildClient } from "@datocms/cma-client-node";2 3async function run() {4 const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });5 6 const webhookId = "312";7 8 const webhook = await client.webhooks.find(webhookId);9 10 // Check the 'Returned output' tab for the result ☝️11 console.log(webhook);12}13 14run();
1{2 id: "312",3 name: "Item type creation/update",4 url: "https://www.example.com/webhook",5 enabled: true,6 headers: { "X-Foo": "Bar" },7 events: [{ entity_type: "item", event_types: ["update"] }],8 http_basic_user: "user",9 http_basic_password: "password",10 custom_payload: '{ "message": "{{event_type}} event triggered on {{entity_type}}!", "entity_id": "{{#entity}}{{id}}{{/entity}}"] }',11 payload_api_version: "3",12 nested_items_in_payload: true,13 auto_retry: true,14}