Returns a resource object of type webhook.
1GET https://site-api.datocms.com/webhooks/:webhook_id HTTP/1.12Authorization: Bearer YOUR-API-TOKEN3Accept: application/json4X-Api-Version: 3
1curl -g 'https://site-api.datocms.com/webhooks/:webhook_id' \2 \3 -H "Authorization: Bearer YOUR-API-TOKEN" \4 -H "Accept: application/json" \5 -H "X-Api-Version: 3"
1await fetch("https://site-api.datocms.com/webhooks/:webhook_id", {2 headers: {3 Authorization: "Bearer YOUR-API-TOKEN",4 Accept: "application/json",5 "X-Api-Version": "3",6 },7});
1HTTP/1.1 200 OK2Content-Type: application/json3Cache-Control: cache-control: max-age=0, private, must-revalidate4X-RateLimit-Limit: 305X-RateLimit-Remaining: 286 7{8 "data": {9 "type": "webhook",10 "id": "312",11 "attributes": {12 "name": "Item type creation/update",13 "url": "https://www.example.com/webhook",14 "enabled": true,15 "headers": {16 "X-Foo": "Bar"17 },18 "events": [19 {20 "entity_type": "item",21 "event_types": [22 "update"23 ]24 }25 ],26 "http_basic_user": "user",27 "http_basic_password": "password",28 "custom_payload": "{ \"message\": \"{{event_type}} event triggered on {{entity_type}}!\", \"entity_id\": \"{{#entity}}{{id}}{{/entity}}\"] }",29 "payload_api_version": "3",30 "nested_items_in_payload": true,31 "auto_retry": true32 }33 }34}