For more authentication options, see: https://doc.rapida.ai/api-reference/authentication
Parameters
Configuration for the client connection.
Show child attributes
Show child attributes
Filter results by a specific webhook ID.
Filter results by a specific assistant ID.
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
Numeric status code for the operation.
Indicates whether the operation was successful.
Array of assistant webhooks.
Show child attributes
Show child attributes
Unique identifier for the webhook.
Array of call, WebRTC, or conversation event names that trigger this webhook.
Description of the webhook’s purpose.
Webhook provider. HTTP webhooks use
http.Delivery options for the webhook.
Show child attributes
Show child attributes
HTTP method used for delivery. Supported values are
POST, PUT, and PATCH.Target URL where webhook requests are sent.
JSON object containing HTTP headers included with each request.
JSON array of response status entries used by the delivery retry policy.
Maximum number of retry attempts after a retryable failure.
Maximum time in seconds to wait for the webhook endpoint to respond.
Execution priority of the webhook.
Associated assistant identifier.
Current status of the webhook.
Identifier of the webhook creator.
User object of the webhook creator.
Identifier of the last updater.
User object of the last updater.
Timestamp when the webhook was created.
Timestamp when the webhook was last updated.
Pagination information for the results.