For more authentication options, see: https://doc.rapida.ai/api-reference/authentication
Parameters
ConnectionConfig
required
Configuration for the client connection.
GetAllAssistantWebhookRequest
required
Show child attributes
Show child attributes
uint64
Filter results by a specific webhook ID.
uint64
Filter results by a specific assistant ID.
Paginate
Usage
from rapida import (
ConnectionConfig,
GetAllAssistantWebhookRequest,
get_all_assistant_webhook,
)
from pprint import pprint
connection_config = ConnectionConfig.default_connection_config(
ConnectionConfig.with_sdk("{rapida-api-key}")
)
response = get_all_assistant_webhook(
client_cfg=connection_config,
request=GetAllAssistantWebhookRequest(
assistantId="{assistant_id}",
paginate=Paginate(page=0, pageSize=20),
# criterias=[Criteria(key="KEY", value="VALUE", logic="should")],
),
)
pprint(response)
package main
import (
"context"
"fmt"
"os"
clients "github.com/rapidaai/rapida-go/rapida/clients"
rapida_proto "github.com/rapidaai/rapida-go/rapida/clients/protos"
connections "github.com/rapidaai/rapida-go/rapida/connections"
)
func main() {
// Configure client connection using RAPIDA_PROJECT_CREDENTIAL environment variable
connectionConfig := connections.
DefaultconnectionConfig(connections.WithSDK(os.Getenv("RAPIDA_PROJECT_CREDENTIAL")))
// Retrieve all assistant webhooks with pagination
response, err := clients.GetAllAssistantWebhook(context.Background(), connectionConfig, &rapida_proto.GetAllAssistantWebhookRequest{
AssistantId: 3456789876541212,
Paginate: &rapida_proto.Paginate{
Page: 0,
PageSize: 20,
},
// Optional: Add filtering criteria
// Criterias: []*rapida_proto.Criteria{{
// Key: "status",
// Value: "active",
// Logic: "must",
// }},
})
if err != nil {
fmt.Printf("Error while making call using rapida: %+v\n", err)
return
}
// Print the response
fmt.Printf("Rapida calling response: %+v\n", response)
}
import {
ConnectionConfig,
GetAllAssistantWebhook,
GetAllAssistantWebhookRequest,
} from "@rapidaai/nodejs";
(async () => {
const connectionCfg = ConnectionConfig.DefaultConnectionConfig(
ConnectionConfig.WithSDK({
ApiKey: process.env.RAPIDA_PROJECT_CREDENTIAL,
})
);
getAllAssistantWebhook(connectionCfg, 45678903456789);
})();
async function getAllAssistantWebhook(connectionCfg, assistantId, page = 0, pageSize = 20) {
const pagination = new Paginate();
pagination.setPage(page);
pagination.setPageSize(pageSize);
const request = new GetAllAssistantWebhookRequest();
request.setAssistantId(assistantId);
request.setPaginate(pagination);
try {
const response = await GetAllAssistantWebhook(connectionCfg, request);
console.log("All Assistant Webhooks Response:", response.toObject());
} catch (error) {
console.error("Error with GetAllAssistantWebhook call:", error);
}
}
Response
int32
Numeric status code for the operation.
boolean
Indicates whether the operation was successful.
AssistantWebhook[]
Array of assistant webhooks.
Show child attributes
Show child attributes
uint64
Unique identifier for the webhook.
string[]
Array of call, WebRTC, or conversation event names that trigger this webhook.
string
Description of the webhook’s purpose.
string
Webhook provider. HTTP webhooks use
http.Metadata[]
Delivery options for the webhook.
Show child attributes
Show child attributes
string
HTTP method used for delivery. Supported values are
POST, PUT, and PATCH.string
Target URL where webhook requests are sent.
string
JSON object containing HTTP headers included with each request.
string
JSON array of response status entries used by the delivery retry policy.
string
Maximum number of retry attempts after a retryable failure.
string
Maximum time in seconds to wait for the webhook endpoint to respond.
uint32
Execution priority of the webhook.
uint64
Associated assistant identifier.
string
Current status of the webhook.
uint64
Identifier of the webhook creator.
User
User object of the webhook creator.
uint64
Identifier of the last updater.
User
User object of the last updater.
timestamp
Timestamp when the webhook was created.
timestamp
Timestamp when the webhook was last updated.
object
Paginated
Pagination information for the results.