get https://api.uniblock.dev/uni/v1/webhook/
Get a webhook.
Parameters
- id (string): A unique identifier for the webhook.
Response
The /webhook/{id}
endpoint returns detailed information about a specific webhook associated with your project. Below is the schema of the JSON response object:
- id (string): A unique identifier for the webhook.
- chainId (string): The blockchain chain ID that the webhook is associated with.
- provider (string): The name of the service provider for the webhook.
- projectId (string): A unique identifier for the project to which the webhook is linked.
- contractAddress (string, nullable): The smart contract address associated with the webhook, if applicable.
- addresses (array): An array of additional relevant addresses for the webhook.
- abi (string, nullable): The ABI (Application Binary Interface) relevant to the webhook, if applicable.
- type (string): The type of the webhook, typically indicating the kind of events it listens to.
- filter (object): A filter object specifying the conditions under which the webhook triggers.
- OR (array): An array of filter conditions, where at least one condition must be met for the webhook to trigger.
- leaf (object): A condition specifying a field, a value, and an operator.
- field (string): The name of the field to filter on.
- value (string): The value to match against.
- operator (string): The operator to apply (e.g., "eq" for equals).
- leaf (object): A condition specifying a field, a value, and an operator.
- OR (array): An array of filter conditions, where at least one condition must be met for the webhook to trigger.
- name (string): The name of the webhook.
- description (string): A description of what the webhook monitors or achieves.
- metadata (string, nullable): Additional metadata associated with the webhook.
- webhookUrl (string): The URL to which the webhook sends data.
- createdAt (string): The date and time at which the webhook was created.
- updatedAt (string): The date and time at which the webhook was last updated.
Example
Here is an example of a response from the /webhook/{id}
endpoint:
{
"id": "1152b1ec-619e-4fbc-a124-b431a2b14bd3",
"chainId": "1",
"provider": "Moralis",
"projectId": "9b9d3972-b4e6-4638-91d0-250a38d6a3e2",
"contractAddress": null,
"addresses": [],
"abi": null,
"type": "ContractEvent",
"filter": {
"OR": [
{
"leaf": {
"field": "topic0",
"value": "0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31",
"operator": "eq"
}
}
]
},
"name": "Azuki NFT Activities",
"description": "Get all events emitted by the Azuki NFT contract",
"metadata": null,
"webhookUrl": "https://webhook.site/bde27238-01ee-4cb2-8ae8-fb66bc898690",
"createdAt": "2024-04-29T16:35:10.629Z",
"updatedAt": "2024-04-29T16:35:10.629Z"
}