-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebHooks implementation #45
Comments
Webhooks are currently not implemented in this TAPICC implementation. In general, webhooks usually are making a POST request to the webhook URL. The update action could also send a diff of the changes between the old object, and the updated one.
I think the webhooks should not care about what data has been updated, and it should just trigger on the specific event without complicated conditions (at least for now, but can be implemented later when needed). |
I think it makes sense, I have removed webhooks for now from swagger. |
I just had a call with Jim, and I realised there could be third system which would for example want to know about when a Job was created. That would be a good use case for webhooks, so I am reopening this and putting back webhooks to swagger. |
The webhook defined are not linked to a specific job or task or asset.
So how do we know which one to call when for example a taskUpdated event occurs?
Let's say a client creates 2 jobs, with each 2 assets which have 1 tasks. that gives us 4 tasks:
Let's say we create one webhook for that client:
Let say task 211 is updated:
The TAPICC server would go through the list of all webhooks for that client, find the ones for taskUpdated and fire them. Most likely there will be only one webhook for taskUpdated per client (but it's not specified anywhere).
For the client to be able to do anything meaningful either:
https://myclient.com/tappic/callbacks/taskupdated?jobId={jobId}&taskId={taskId}
which the server would send ashttps://myclient.com/tappic/callbacks/taskupdated?jobId=2&taskId=211
taskUpdated
is a rather generic event.Also we would need to decide what kind of call is to be send: a POST, PUT or GET. Or have that information in the webhook properties.
Another question: Are the event types too generic?
Would it make sense to have only types of event corresponding to changes meaningful for the client? (e.g. when a task is paused, the client may not care about it: the lone task event that most clients will be watching for is when the task is done or fails)
The text was updated successfully, but these errors were encountered: