Deletes a Webhook.
rpc DeleteWebhook
DeleteWebhook
webhook_api.v1.DeleteWebhook
webhook_api.v1.DeleteWebhook
Deletes a Webhook.
requests DeleteWebhookRequest
DeleteWebhookRequest
webhook_api.v1.DeleteWebhookRequest
webhook_api.v1.DeleteWebhookRequest
Field | Type | Description |
---|---|---|
api_key | string | API Key, JWT. |
webhook_id | string | Webhook ID. |
resp, _ := webhookManagerService.DeleteWebhook(ctx, &v1.DeleteWebhookRequest{
ApiKey: "API_KEY",
WebhookId: "WEBHOOK_ID",
})
fmt.Println(resp)
const deletewebhookrequest = new DeleteWebhookRequest();
deletewebhookrequest.setApiKey("API_KEY");
deletewebhookrequest.setWebhookId("WEBHOOK_ID");
service.deleteWebhook(deletewebhookrequest, (err, value:DeleteWebhookResponse|null) => {
const resp = JSON.stringify(err ? err : value);
console.log("received ", resp);
})
using System;
using Grpc.Core;
using WebhookApi.V1;
namespace main
{
class Program
{
static void Main(string[] args)
{
Channel channel = new Channel("YOUR_WEBHOOK_URL:443", ChannelCredentials.Insecure);
var client = new WebhookManagerService.WebhookManagerServiceClient(channel);
var headers = new Metadata();
var deleteWebhookRequest = new DeleteWebhookRequest{
ApiKey = "API_KEY",
WebhookId = "WEBHOOK_ID",
};
var reply = client.DeleteWebhook(deleteWebhookRequest, headers);
Console.WriteLine("Response: " + reply);
channel.ShutdownAsync().Wait();
}
}
}
package demo;
import io.grpc.Channel;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import webhook_api.v1.Webhook.DeleteWebhookRequest;
import webhook_api.v1.Webhook.DeleteWebhookResponse;
import webhook_api.v1.WebhookManagerServiceGrpc;
public class App {
public static void main(String[] args) {
ManagedChannel channel = ManagedChannelBuilder
.forAddress("YOUR_WEBHOOK_URL", 443)
.usePlaintext()
.build();
WebhookManagerServiceGrpc.WebhookManagerServiceBlockingStub blockStub =
WebhookManagerServiceGrpc.newBlockingStub(channel);
DeleteWebhookRequest req_DeleteWebhookRequest =
DeleteWebhookRequest.newBuilder()
.setApiKey("API_KEY")
.setWebhookId("WEBHOOK_ID")
.build();
DeleteWebhookResponse resp = blockStub.deleteWebhook(req_DeleteWebhookRequest);
System.out.println(resp);
channel.shutdown();
}
}
const deletewebhookrequest = new DeleteWebhookRequest();
deletewebhookrequest.setApiKey("API_KEY");
deletewebhookrequest.setWebhookId("WEBHOOK_ID");
service.deleteWebhook(deletewebhookrequest, (err, value) => {
const resp = JSON.stringify(err ? err : value);
console.log("received ", resp);
})
extern crate grpc-sdks;
use tonic::transport::Channel;
use grpc-sdks::webhook_api::v1::webhook_manager_service_client::WebhookManagerServiceClient;
use grpc-sdks::webhook_api::v1::DeleteWebhookRequest;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let channel = Channel::from_static("YOUR_WEBHOOK_URL")
.connect()
.await?;
let mut client = WebhookManagerServiceClient::new(channel);
let request = tonic::Request::new(
DeleteWebhookRequest{
api_key: String::from("API_KEY"),
webhook_id: String::from("WEBHOOK_ID")
});
// sending request and waiting for response
let response = client.delete_webhook(request).await?.into_inner();
println!("RESPONSE={:?}", response);
Ok(())
}
package app
import io.grpc.ManagedChannelBuilder
import webhook_api.v1.Webhook.DeleteWebhookRequest
import webhook_api.v1.Webhook.DeleteWebhookResponse
import webhook_api.v1.WebhookManagerServiceGrpc
fun main() {
val channel = ManagedChannelBuilder
.forAddress("YOUR_WEBHOOK_URL", 443)
.usePlaintext()
.build()
var blockStub = WebhookManagerServiceGrpc.newBlockingStub(channel)
val req_DeleteWebhookRequest = DeleteWebhookRequest.newBuilder()
.setApiKey("API_KEY")
.setWebhookId("WEBHOOK_ID")
.build()
val resp = blockStub.deleteWebhook(req_DeleteWebhookRequest)
println(resp)
channel.shutdown()
}
returns DeleteWebhookResponse
DeleteWebhookResponse
webhook_api.v1.DeleteWebhookResponse
webhook_api.v1.DeleteWebhookResponse
{}