Skip to content
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

🚀 Feature: [Webhooks] Server Side SDK Support #6331

Open
2 tasks done
ItzNotABug opened this issue Sep 26, 2023 · 2 comments
Open
2 tasks done

🚀 Feature: [Webhooks] Server Side SDK Support #6331

ItzNotABug opened this issue Sep 26, 2023 · 2 comments

Comments

@ItzNotABug
Copy link
Contributor

ItzNotABug commented Sep 26, 2023

🔖 Feature description

Since Webhooks are also a part of Projects we create on console, they should be configurable by Rest APIs or Server SDKs just like other features.

It is currently not possible to manage Webhooks via Rest APIs, Server SDKs without using cookies of a signed in admin which is a hassle and I would not recommended that at all.

🎤 Pitch

Example of SDK -

// import
const sdk = require('node-appwrite');

// create instance
const webhooks = new sdk.Webhooks(client);

// list all created webhooks
const listOfWebhooks = await webhooks.list();

// create a new webhook with below configs
const newWebhook = await webhooks.create(id, name, post_url, events, auth, verifySslTls);

// update a webhook based on an id
const updatedWebhook = await webhooks.update(id, name, post_url, events, auth, verifySslTls);

// delete a webhook based on a given id
const deletedWebhook = await webhooks.delete(id);

Webhook Object -

{
    "$id": "sSd6fzzQn8AiNKJs2o0k",
    "$createdAt": "2023-03-13T07:31:01.174814Z",
    "$updatedAt": "2023-06-09T07:31:01.174858Z",
    "name": "Test Webhook",
    "url": "https:ex.app/post",
    "events": [],
    "security": false,
    "httpUser": "",
    "httpPass": "",
    "signatureKey": ""
}

Note: Not sure if signatureKey should be added in the object.

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@stnguyen90
Copy link
Contributor

@ItzNotABug, thanks for creating this issue! 🙏🏼 Managing webhooks is a project management operation, so it's in a separate Console API (vs Server or Client API). We have a Console SDK, but it's not for public consumption.

@ItzNotABug
Copy link
Contributor Author

@stnguyen90 Agree that Webhooks are a project management op. but since they are a part of the project and also a feature like others, I believe that the Server Side SDKs should provide an API to manage them.

The point is that Server Side SDKs allow the admins, teams to manage the project and its components, hence this suggestion.

Not required on the client side though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants