Skip to content

Commit

Permalink
Add Flow and Source filter options for webhook events
Browse files Browse the repository at this point in the history
Allows Flow related events to be filtered using a list of allowed IDs
and similarly Source related events.

sem-ver: feature
  • Loading branch information
philipnbbc committed Aug 23, 2024
1 parent 9f820f7 commit c59e583
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
16 changes: 16 additions & 0 deletions api/schemas/webhook-post.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@
"items": {
"type": "string"
}
},
"flow_ids": {
"description": "Limit Flow related events to the given list of Flow IDs. Non-Flow related events are not affected",
"type": "array",
"items": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
}
},
"source_ids": {
"description": "Limit Source related events to the given list of Source IDs. Non-Source related events are not affected",
"type": "array",
"items": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
}
}
}
}
18 changes: 17 additions & 1 deletion api/schemas/webhook.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,27 @@
"type": "string"
},
"events": {
"description": "List of event types to receive",
"description": "Filter events to those with event type in this list",
"type": "array",
"items": {
"type": "string"
}
},
"flow_ids": {
"description": "Limit Flow related events to the given list of Flow IDs. Non-Flow related events are not affected",
"type": "array",
"items": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
}
},
"source_ids": {
"description": "Limit Source related events to the given list of Source IDs. Non-Source related events are not affected",
"type": "array",
"items": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
}
}
}
}

0 comments on commit c59e583

Please sign in to comment.