> ## 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 Endpoint Log

Retrieves detailed log information for a specific endpoint execution 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="GetEndpointLogRequest" required>
  <Expandable>
    <ParamField body="endpointId" type="uint64" required>
      The unique identifier of the endpoint for which to retrieve log information.
    </ParamField>

    <ParamField body="id" type="uint64" required>
      The unique identifier of the specific endpoint log entry to retrieve.
    </ParamField>
  </Expandable>
</ParamField>

## Usage

<CodeGroup>
  ```python Python theme={null}
  from rapida import (
      ConnectionConfig,
      GetEndpointLogRequest,
      get_endpoint_log
  )
  from pprint import pprint
  connection_config = ConnectionConfig.default_connection_config(
      ConnectionConfig.with_sdk("{your-rapida-api-key}")
  )
  response = get_endpoint_log(
      client_cfg=connection_config,
      request=GetEndpointLogRequest(
          id=2230958607199895552,
          endpointId=2223006263292198912,
      ),
  )
  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"))).WithLocal()

  	// Retrieve endpoint log by endpoint ID and log ID
  	response, err := clients.GetEndpointLog(context.Background(), connectionConfig, &rapida_proto.GetEndpointLogRequest{
  		EndpointId: "ENDPOINT_ID",
  		Id:         "ENDPOINT_LOG_ID",
  	})

  	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,
    GetEndpointLog,
    GetEndpointLogRequest,
  } from "@rapidaai/nodejs";

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

  async function getEndpointLog(connectionCfg) {
    const request = new GetEndpointLogRequest();
    request.setId(2223006263292198912);
    request.setEndpointid(2223006263292198912);
    const response = await GetEndpointLog(connectionCfg, request);

    if (response.getError()) {
      console.error(
        "Error fetching endpoint log:",
        response.getError()?.getHumanmessage()
      );
    } else {
      console.log("Endpoint Log Details:", response.getData());
    }
  }
  ```
</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="EndpointLog">
  Detailed log information for the endpoint execution.

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

    <ParamField body="endpointId" type="uint64">
      The identifier of the endpoint this log belongs to.
    </ParamField>

    <ParamField body="source" type="string">
      Source system or origin of the endpoint execution.
    </ParamField>

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

    <ParamField body="projectId" type="uint64">
      Associated project identifier.
    </ParamField>

    <ParamField body="organizationId" type="uint64">
      Associated organization identifier.
    </ParamField>

    <ParamField body="endpointProviderModelId" type="uint64">
      Model identifier tied to the endpoint provider.
    </ParamField>

    <ParamField body="timeTaken" type="uint64">
      Time taken for the endpoint execution in milliseconds.
    </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="metrics" type="Metric[]">
      Array of performance and execution metrics.

      <Expandable>
        <ParamField body="name" type="string">
          Name of the metric.
        </ParamField>

        <ParamField body="value" type="string">
          Value of the metric.
        </ParamField>

        <ParamField body="description" type="string">
          Description of what the metric measures.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="metadata" type="Metadata[]">
      Array of metadata associated with the endpoint execution.

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

        <ParamField body="key" type="string">
          The metadata key name.
        </ParamField>

        <ParamField body="value" type="string">
          The metadata value.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="arguments" type="Argument[]">
      Array of arguments passed to the endpoint during execution.

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

        <ParamField body="name" type="string">
          Name of the argument.
        </ParamField>

        <ParamField body="value" type="string">
          Value of the argument.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="options" type="Metadata[]">
      Array of execution options used for the endpoint.

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

        <ParamField body="key" type="string">
          The option key name.
        </ParamField>

        <ParamField body="value" type="string">
          The option value.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

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

  <Expandable>
    <ResponseField name="errorCode" type="string">
      Machine-readable error code.
    </ResponseField>

    <ResponseField name="errorMessage" type="string">
      Detailed error message.
    </ResponseField>
  </Expandable>
</ParamField>
