List Webhooks
Retrieve a list of all webhooks configured for your account.
First, obtain an access token to get started here.
Retrieve a list of all webhooks configured for your account, including their unique IDs, names, event types and endpoint configurations. This query enables you to inspect and verify your existing webhook settings, ensuring seamless integration with your applications and services. Use this query to fetch webhook details, troubleshoot issues or prepare for updates and modifications.
Schema
"""
Enum representing the different types of events that can be tracked with a webhook.
"""
enum EventType {
"""
Event type for floor occupancy updates.
"""
FLOOR_OCCUPANCY
"""
Event type for room occupancy updates.
"""
ROOM_OCCUPANCY
"""
Event type for zone occupancy updates.
"""
ZONE_OCCUPANCY
"""
Event type for detection coordinate updates.
"""
DETECTIONS
"""
Event type for traffic (enter/exits) updates.
"""
TRAFFIC
}
"""
A type representing API credentials.
"""
type ApiKey {
"""
This key represents the type of header key, often specifying the header name to be used in authentication, such as 'x-api-key'.
"""
key: String!
"""
The actual API key value used for authentication in requests.
"""
value: String!
}
"""
A type representing basic authentication configuration.
"""
type BasicAuth {
"""
The username for basic authentication.
"""
username: String!
"""
The password associated with the username for basic authentication.
"""
password: String!
}
"""
Configuration settings for the endpoint where the webhook sends data.
"""
type EndpointConfig {
"""
The URL of the webhook endpoint where events will be sent. Only HTTPS URLs are supported.
"""
url: String!
"""
The HTTP timeout in seconds for the request to complete. Acceptable values are between 1 and 15.
"""
httpTimeout: Int!
"""
Optional API key configuration for header-based authentication.
"""
apiKey: ApiKey
"""
Optional basic authentication configuration, including username and password.
"""
basicAuth: BasicAuth
}
"""
Represents a webhook subscription, containing information on the events it tracks and the endpoint configuration.
"""
type Webhook {
"""
A unique identifier for the webhook subscription.
"""
id: ID!
"""
A user-defined name for the webhook, useful for identifying the webhook purpose.
"""
name: String!
"""
A list of event types that the webhook subscribes to, such as FLOOR_OCCUPANCY, ROOM_OCCUPANCY, etc.
"""
eventTypes: [EventType!]!
"""
Configuration details for the endpoint, including URL, timeout, and authentication options.
"""
endpointConfig: EndpointConfig!
}
# Type for webhooks response
type WebhooksResponse {
# Array of webhooks
data: [Webhook!]!
}
Query
query {
webhooks {
id
name
event_types
endpoint_config {
url
http_timeout
api_key {
key
value
}
basic_auth {
username
password
}
}
}
}
Response (Example)
{
"data": {
"webhooks": {
"data": [
{
"id": "webhook_2oXTcK8Gn53tURQUokTyLFmJyQr",
"name": "My Webhook",
"event_types": ["FLOOR_OCCUPANCY"],
"endpoint_config": {
"url": "https://customer.api.com/webhooks",
"http_timeout": 10,
"api_key": {
"key": "x-api-key",
"value": "akfsdl;jf;alksjdfiuhwiefhsks"
},
"basic_auth": {
"username": "bob",
"password": "letmein"
}
}
},
{
"id": "webhook_2oXTcNHRxrA7hhPv2vSh1wWS6xc",
"name": "Another Webhook",
"event_types": ["ROOM_OCCUPANCY", "DETECTIONS"],
"endpoint_config": {
"url": "https://another.customer.api.com/webhooks",
"http_timeout": 15,
"api_key": null,
"basic_auth": null
}
}
]
}
}
}
Last updated