-
Notifications
You must be signed in to change notification settings - Fork 15
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
document webhook endpoints #242
Conversation
✅ Deploy Preview for grist-help-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
7d709c4
to
9fa27da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in GET there is:
[
{
"id": "xxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx",
"fields": {
"name": "new-project-email",
"memo": "Send an email when a project is added",
"url": "https://example.com/webhook/123",
"enabled": true,
"eventTypes": [
"add",
"update"
],
"isReadyColumn": null,
"tableId": "Projects",
"unsubscribeKey": "string"
},
"usage": {
"numWaiting": 0,
"status": "idle",
"updatedTime": 1685637500424,
"lastSuccessTime": 1685637500424,
"lastFailureTime": 1685637500424,
"lastErrorMessage": null,
"lastHttpStatus": 200,
"lastEventBatch": {
"$ref": null,
"size": 1,
"attempts": 1,
"errorMessage": null,
"httpStatus": 200,
"status": "success"
}
}
}
]
and it should be:
{
"webhooks": [
{
"id": "xxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx",
"fields": {
"name": "new-project-email",
"memo": "Send an email when a project is added",
"url": "https://example.com/webhook/123",
"enabled": true,
"eventTypes": [
"add",
"update"
],
"isReadyColumn": null,
"tableId": "Projects",
"unsubscribeKey": "string"
},
"usage": {
"numWaiting": 0,
"status": "idle",
"updatedTime": 1685637500424,
"lastSuccessTime": 1685637500424,
"lastFailureTime": 1685637500424,
"lastErrorMessage": null,
"lastHttpStatus": 200,
"lastEventBatch": {
"$ref": null,
"size": 1,
"attempts": 1,
"errorMessage": null,
"httpStatus": 200,
"status": "success"
}
}
}
]
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in POST:
there is:
{
"webhooks": [
{
"name": "new-project-email",
"memo": "Send an email when a project is added",
"url": "https://example.com/webhook/123",
"enabled": true,
"eventTypes": [
"add",
"update"
],
"isReadyColumn": null,
"tableId": "Projects"
}
]
}
and should be:
"webhooks": [
{
"fields": {
"name": "new-project-email",
"memo": "Send an email when a project is added",
"url": "https://example.com/webhook/123",
"enabled": true,
"eventTypes": [
"add",
"update"
],
"isReadyColumn": null,
"tableId": "Projects"
}
]
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it's ok for me, thanks :)
Start documenting endpoints related to webhooks, replacing the older unofficial _subscribe/_unsubscribe (see gristlabs/grist-core#76 (comment))