> ## Documentation Index
> Fetch the complete documentation index at: https://doc.rapida.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get All Assistant Webhook

Retrieves a list of webhooks associated with a specific assistant using the Rapida API. This endpoint supports pagination and filtering capabilities.

<Info> For more authentication options, see: [https://doc.rapida.ai/api-reference/authentication](https://doc.rapida.ai/api-reference/authentication) </Info>

### Parameters

<ParamField body="connectionConfig" type="ConnectionConfig" required>
  Configuration for the client connection.
</ParamField>

<ParamField body="request" type="GetAllAssistantWebhookRequest" required>
  <Expandable>
    <ParamField body="webhookId" type="uint64" optional>
      Filter results by a specific webhook ID.
    </ParamField>

    <ParamField body="assistantId" type="uint64" optional>
      Filter results by a specific assistant ID.
    </ParamField>

    <ParamField body="paginate" type="Paginate" optional>
      Pagination settings for the results.

      <Expandable>
        <ParamField body="page" type="uint32">
          The page number (0-based).
        </ParamField>

        <ParamField body="pageSize" type="uint32">
          Number of items per page.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="criterias" type="Criteria[]" optional>
      Array of filtering criteria.

      <Expandable>
        <ParamField body="key" type="string">
          The field name to filter by.
        </ParamField>

        <ParamField body="value" type="string">
          The value to match against.
        </ParamField>

        <ParamField body="logic" type="string">
          The logic operator to use ("should" or "must").
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

### Usage

<CodeGroup>
  ```python Python theme={null}
  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)
  ```

  ```go Go theme={null}
  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)
  }
  ```

  ```typescript NodeJs theme={null}
  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);
    }
  }

  ```
</CodeGroup>

### Response

<ParamField body="code" type="int32">
  Numeric status code for the operation.
</ParamField>

<ParamField body="success" type="boolean">
  Indicates whether the operation was successful.
</ParamField>

<ParamField body="data" type="AssistantWebhook[]">
  Array of assistant webhooks.

  <Expandable>
    <ParamField body="id" type="uint64">
      Unique identifier for the webhook.
    </ParamField>

    <ParamField body="assistantEvents" type="string[]">
      Array of call, WebRTC, or conversation event names that trigger this webhook.
    </ParamField>

    <ParamField body="description" type="string">
      Description of the webhook's purpose.
    </ParamField>

    <ParamField body="provider" type="string">
      Webhook provider. HTTP webhooks use `http`.
    </ParamField>

    <ParamField body="options" type="Metadata[]">
      Delivery options for the webhook.

      <Expandable>
        <ResponseField name="http_method" type="string">
          HTTP method used for delivery. Supported values are `POST`, `PUT`, and `PATCH`.
        </ResponseField>

        <ResponseField name="http_url" type="string">
          Target URL where webhook requests are sent.
        </ResponseField>

        <ResponseField name="http_headers" type="string">
          JSON object containing HTTP headers included with each request.
        </ResponseField>

        <ResponseField name="retry_status_codes" type="string">
          JSON array of response status entries used by the delivery retry policy.
        </ResponseField>

        <ResponseField name="max_retry_count" type="string">
          Maximum number of retry attempts after a retryable failure.
        </ResponseField>

        <ResponseField name="timeout_seconds" type="string">
          Maximum time in seconds to wait for the webhook endpoint to respond.
        </ResponseField>
      </Expandable>
    </ParamField>

    <ParamField body="executionPriority" type="uint32">
      Execution priority of the webhook.
    </ParamField>

    <ParamField body="assistantId" type="uint64">
      Associated assistant identifier.
    </ParamField>

    <ParamField body="status" type="string">
      Current status of the webhook.
    </ParamField>

    <ParamField body="createdBy" type="uint64">
      Identifier of the webhook creator.
    </ParamField>

    <ParamField body="createdUser" type="User">
      User object of the webhook creator.
    </ParamField>

    <ParamField body="updatedBy" type="uint64">
      Identifier of the last updater.
    </ParamField>

    <ParamField body="updatedUser" type="User">
      User object of the last updater.
    </ParamField>

    <ParamField body="createdDate" type="timestamp">
      Timestamp when the webhook was created.
    </ParamField>

    <ParamField body="updatedDate" type="timestamp">
      Timestamp when the webhook was last updated.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="error" type="object">
  Error information, if applicable.

  <Expandable>
    <ResponseField name="errorCode" type="uint64">
      Numeric error code.
    </ResponseField>

    <ResponseField name="errorMessage" type="string">
      Technical error message.
    </ResponseField>

    <ResponseField name="humanMessage" type="string">
      Human-readable error description.
    </ResponseField>
  </Expandable>
</ParamField>

<ParamField body="paginated" type="Paginated">
  Pagination information for the results.
</ParamField>
