Lists Webhooks.
rpc ListWebhooks
ListWebhooks
webhook_api.v1.ListWebhooks
webhook_api.v1.ListWebhooks
Lists Webhooks.
requests ListWebhooksRequest
ListWebhooksRequest
webhook_api.v1.ListWebhooksRequest
webhook_api.v1.ListWebhooksRequest
Field | Type | Description |
---|---|---|
api_key | string | API Key as a JWT |
page | int32 | Page number for pagination. |
page_size | int32 | Size of the page for pagination. |
resp, _ := webhookManagerService.ListWebhooks(ctx, &v1.ListWebhooksRequest{
ApiKey: "API_KEY",
Page: 0,
PageSize: 10000,
})
fmt.Println(resp)
const listwebhooksrequest = new ListWebhooksRequest();
listwebhooksrequest.setApiKey("API_KEY");
listwebhooksrequest.setPage(0);
listwebhooksrequest.setPageSize(10000);
service.listWebhooks(listwebhooksrequest, (err, value:ListWebhooksResponse|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 listWebhooksRequest = new ListWebhooksRequest{
ApiKey = "API_KEY",
Page = 0,
PageSize = 10000,
};
var reply = client.ListWebhooks(listWebhooksRequest, 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.ListWebhooksRequest;
import webhook_api.v1.Webhook.ListWebhooksResponse;
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);
ListWebhooksRequest req_ListWebhooksRequest =
ListWebhooksRequest.newBuilder()
.setApiKey("API_KEY")
.setPage(0)
.setPageSize(10000)
.build();
ListWebhooksResponse resp = blockStub.listWebhooks(req_ListWebhooksRequest);
System.out.println(resp);
channel.shutdown();
}
}
const listwebhooksrequest = new ListWebhooksRequest();
listwebhooksrequest.setApiKey("API_KEY");
listwebhooksrequest.setPage(0);
listwebhooksrequest.setPageSize(10000);
service.listWebhooks(listwebhooksrequest, (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::ListWebhooksRequest;
#[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(
ListWebhooksRequest{
api_key: String::from("API_KEY"),
page: 0,
page_size: 10000
});
// sending request and waiting for response
let response = client.list_webhooks(request).await?.into_inner();
println!("RESPONSE={:?}", response);
Ok(())
}
package app
import io.grpc.ManagedChannelBuilder
import webhook_api.v1.Webhook.ListWebhooksRequest
import webhook_api.v1.Webhook.ListWebhooksResponse
import webhook_api.v1.WebhookManagerServiceGrpc
fun main() {
val channel = ManagedChannelBuilder
.forAddress("YOUR_WEBHOOK_URL", 443)
.usePlaintext()
.build()
var blockStub = WebhookManagerServiceGrpc.newBlockingStub(channel)
val req_ListWebhooksRequest = ListWebhooksRequest.newBuilder()
.setApiKey("API_KEY")
.setPage(0)
.setPageSize(10000)
.build()
val resp = blockStub.listWebhooks(req_ListWebhooksRequest)
println(resp)
channel.shutdown()
}
returns ListWebhooksResponse
ListWebhooksResponse
webhook_api.v1.ListWebhooksResponse
webhook_api.v1.ListWebhooksResponse
Field | Type | Description |
---|---|---|
webhooks | Webhook repeated | List of webhooks. |
total_owned_webhooks | uint32 | Total number of webhooks returned. |
{
"webhooks": [
{
"id": "ID1",
"owner_id": "eyJwtHeader.eyJwtPayload.Secret1",
"name": "NAME1",
"webhook_url": "WEBHOOK_URL1",
"supported_events": [
0,
1
],
"delivery_method": 0
},
{
"id": "ID2",
"owner_id": "eyJwtHeader.eyJwtPayload.Secret2",
"name": "NAME2",
"webhook_url": "WEBHOOK_URL2",
"supported_events": [
0,
1
],
"delivery_method": 0
}
],
"total_owned_webhooks": 2
}