> ## 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 HTTP Logs

Retrieves a paginated list of assistant HTTP logs, including webhook delivery logs, with optional filtering and ordering using the Rapida API.

<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="GetAllAssistantHTTPLogRequest" required>
  <Expandable>
    <ParamField body="projectId" type="uint64" optional>
      The project identifier for scope filtering.
    </ParamField>

    <ParamField body="paginate" type="Paginate" optional>
      Pagination configuration.

      <Expandable>
        <ParamField body="page" type="uint32">
          Page number (0-based indexing).
        </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">
          Field name to filter on.
        </ParamField>

        <ParamField body="value" type="string">
          Value to filter by.
        </ParamField>

        <ParamField body="logic" type="string">
          Filter logic: "should" or "must".
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="order" type="Ordering" optional>
      Sorting configuration.

      <Expandable>
        <ParamField body="column" type="string">
          Column name to sort by.
        </ParamField>

        <ParamField body="order" type="string">
          Sort order: "asc" or "desc".
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

### Usage

<CodeGroup>
  ```python Python theme={null}
  from rapida import (
      ConnectionConfig,
      GetAllAssistantHTTPLogRequest,
      Paginate,
      get_all_assistant_http_log,
  )
  from pprint import pprint
  connection_config = ConnectionConfig.default_connection_config(
      ConnectionConfig.with_sdk("{rapida-api-key}")
  )
  response = get_all_assistant_http_log(
      client_cfg=connection_config,
      request=GetAllAssistantHTTPLogRequest(
          projectId="{project_id}",
          paginate=Paginate(page=0, pageSize=20),
          # criterias=[Criteria(key="KEY", value="VALUE", logic="should")],
      ),
  )
  pprint(response)
  ```

  ```go Go theme={null}

  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 paginated HTTP logs
  	response, err := clients.GetAllAssistantHTTPLog(context.Background(), connectionConfig, &rapida_proto.GetAllAssistantHTTPLogRequest{
  		Paginate: &rapida_proto.Paginate{
  			Page:     0,
  			PageSize: 20,
  		},
  		// Optional: Add filtering criteria
  		// Criterias: []*rapida_proto.Criteria{{
  		// 	Key:   "status",
  		// 	Value: "success",
  		// 	Logic: "must",
  		// }},
  		// Optional: Add sorting
  		// Order: &rapida_proto.Ordering{
  		// 	Column: "createdDate",
  		// 	Order:  "desc",
  		// },
  	})

  	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,
    GetAllAssistantHTTPLog,
    GetAllAssistantHTTPLogRequest,
    Paginate,
  } from "@rapidaai/nodejs";

  (async () => {
    const connectionCfg = ConnectionConfig.DefaultConnectionConfig(
      ConnectionConfig.WithSDK({
        ApiKey: process.env.RAPIDA_PROJECT_CREDENTIAL,
      })
    );
    getAllAssistantHTTPLog(connectionCfg);
  })();


  async function getAllAssistantHTTPLog(connectionCfg, page = 0, pageSize = 20) {
    const pagination = new Paginate();
    pagination.setPage(page);
    pagination.setPageSize(pageSize);

    const request = new GetAllAssistantHTTPLogRequest();
    request.setPaginate(pagination);

    try {
      const response = await GetAllAssistantHTTPLog(connectionCfg, request);
      console.log("All Assistant HTTP Logs Response:", response.toObject());
    } catch (error) {
      console.error("Error with GetAllAssistantHTTPLog 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="AssistantHTTPLog[]">
  Array of assistant HTTP log entries.

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

    <ParamField body="sourceRefId" type="uint64">
      Source record identifier. For webhook deliveries, this is the webhook ID.
    </ParamField>

    <ParamField body="request" type="object">
      The request payload sent to the webhook.
    </ParamField>

    <ParamField body="response" type="object">
      The response received from the webhook.
    </ParamField>

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

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

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

    <ParamField body="assistantId" type="uint64">
      Identifier of the associated assistant.
    </ParamField>

    <ParamField body="projectId" type="uint64">
      Identifier of the associated project.
    </ParamField>

    <ParamField body="organizationId" type="uint64">
      Identifier of the associated organization.
    </ParamField>

    <ParamField body="assistantConversationId" type="uint64">
      Identifier of the associated conversation.
    </ParamField>

    <ParamField body="assetPrefix" type="string">
      Asset prefix used for the webhook.
    </ParamField>

    <ParamField body="sourceEvent" type="string">
      Event type that triggered the HTTP request, such as a call, WebRTC, or conversation webhook event.
    </ParamField>

    <ParamField body="responseStatus" type="uint64">
      HTTP response status code from the webhook.
    </ParamField>

    <ParamField body="timeTaken" type="uint64">
      Time taken for the webhook execution in milliseconds.
    </ParamField>

    <ParamField body="retryCount" type="uint32">
      Number of retry attempts made.
    </ParamField>

    <ParamField body="httpMethod" type="string">
      HTTP method used for the webhook request.
    </ParamField>

    <ParamField body="httpUrl" type="string">
      URL that was called for the webhook.
    </ParamField>

    <ParamField body="source" type="string">
      Source category for the HTTP log.
    </ParamField>

    <ParamField body="contextId" type="string">
      Context identifier associated with the source event, when available.
    </ParamField>

    <ParamField body="errorMessage" type="string">
      Delivery error message, when the HTTP request fails.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="paginated" type="Paginated">
  Pagination metadata.
</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">
      Detailed error message.
    </ResponseField>

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