Webhooks
Returns detailed information for all registered Webhooks.
OK
GET /webhooks HTTP/1.1
Host: api.onomondo.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
OK
[
{
"id": "46c5e0e3-2739-4b6a-8f78-dc4a936d5861",
"url": "https://api.example.com/sms",
"label": "device sms error reporting",
"exclude_types": [
"usage",
"usage-sms",
"network-registration",
"network-deregistration",
"network-authentication",
"location"
],
"active": true,
"tags": [
{
"name": "Containers",
"id": "38d3b4a7-c66a-4d73-8382-f145bcc09ad5",
"can_write": false,
"color": null
}
]
},
{
"id": "76639595-013e-4f98-b717-8952e73f389a",
"url": "https://api.example.com/locations",
"label": "coordinate mapping for devices",
"exclude_types": [
"usage",
"usage-sms",
"network-registration",
"network-deregistration",
"network-authentication",
"sms"
],
"active": true,
"tags": [
{
"name": "getting-started product",
"id": "4c21c1ce-0e3d-445f-8b3a-9d918a9acd89",
"can_write": false,
"color": "#AB7D63"
}
]
},
{
"id": "9372355b-69c4-4622-8f29-d75b72702565",
"url": "https://api.example.com/connections",
"label": "Monitoring test connections",
"exclude_types": [
"usage",
"usage-sms",
"network-authentication",
"sms",
"location"
],
"active": true,
"tags": [
{
"name": "Developer",
"id": "a5023f47-1db8-425e-b664-dc0b8921f644",
"can_write": true,
"color": "#5ba571"
}
]
}
]Returns detailed information for a specific Webhook.
46c5e0e3-2739-4b6a-8f78-dc4a936d5861OK
GET /webhooks/{webhook_id} HTTP/1.1
Host: api.onomondo.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
OK
{
"id": "46c5e0e3-2739-4b6a-8f78-dc4a936d5861",
"url": "https://api.example.com/sms",
"label": "device sms error reporting",
"exclude_types": [
"usage",
"usage-sms",
"network-registration",
"network-deregistration",
"network-authentication",
"location"
],
"active": true,
"tags": [
{
"name": "Containers",
"id": "38d3b4a7-c66a-4d73-8382-f145bcc09ad5",
"can_write": false,
"color": null
}
]
}Create a Webhook to receive events from your organization. Webhooks can be filtered as to what they receive by applying filtering using Tags and/or excluding event types.
The HTTPS endpoint that will receive the events.
https://api.example.com/webhooks/endpointPattern: ^https://When true, the endpoint will start receiving events.
truePlain text name for the webhook. Must be unique if provided.
Production WebhookArray of Tag IDs to filter events. Only SIMs with these Tags will trigger events. Empty array includes all Tags.
["prod-devices","critical-alerts"]OK
POST /webhooks HTTP/1.1
Host: api.onomondo.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 127
{
"url": "https://api.example.com/webhooks/all-events",
"active": true,
"label": "Global Event Webhook",
"tags": [],
"exclude_types": []
}OK
{
"id": "a6693cbb-e29c-4564-9574-494e662931cc",
"url": "https://api.example.com/global",
"label": "Global",
"exclude_types": [],
"active": true,
"tags": []
}Modify a specific Webhook.
When updating arrays, the whole array will be replaced. To keep existing Tags or exclude_types you will need to include all properties in the array, not just the additional ones.
a6693cbb-e29c-4564-9574-494e662931ccThe HTTPS endpoint that will receive the events.
https://api.example.com/webhooks/endpointPattern: ^https://When true, the endpoint will start receiving events.
truePlain text name for the webhook. Must be unique if provided.
Production WebhookArray of Tag IDs to filter events. Only SIMs with these Tags will trigger events. Empty array includes all Tags.
["prod-devices","critical-alerts"]OK
PATCH /webhooks/{webhook_id} HTTP/1.1
Host: api.onomondo.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 138
{
"url": "https://new-api.example.com/webhooks/all-events",
"active": "true,",
"label": "New Global Event Webhook",
"tags": [],
"exclude_types": []
}OK
{
"id": "a6693cbb-e29c-4564-9574-494e662931cc",
"url": "https://api.example.com/global",
"label": "Global",
"exclude_types": [],
"active": true,
"tags": []
}Removes a specific Webhook. If you think you will want to use it again you can always set the "active": false with the PATCH call instead. This will keep the Webhook but prevent it from sending any events to the endpoint.
46c5e0e3-2739-4b6a-8f78-dc4a936d5861OK
DELETE /webhooks/{webhook_id} HTTP/1.1
Host: api.onomondo.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
OK
{
"message": "ok"
}Last updated