Skip to main content
Retrieves data or executes operations on a specified endpoint using the Rapida API.
For full setup and authentication options, see the Installation guide: /api-reference/introduction.

Parameters

connectionConfig
ConnectionConfig
required
Configuration for the client connection.
request
GetEndpointRequest
required

Usage

from rapida import (
    ConnectionConfig,
    GetEndpointRequest,
    get_endpoint
)
from pprint import pprint
connection_config = ConnectionConfig.default_connection_config(
    ConnectionConfig.with_sdk("{your-rapida-api-key}")
)
response = get_endpoint(
    client_cfg=connection_config,
    request=GetEndpointRequest(id=2223006263292198912),
)
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"))).WithLocal()

	// Provide the endpoint ID to fetch endpoint details
	response, err := clients.GetEndpoint(context.Background(), connectionConfig, &rapida_proto.GetEndpointRequest{
		Id: 2223006263292198912,
	})

	if err != nil {
		fmt.Printf("Error while fetching endpoint details: %+v\n", err)
		return
	}

	// Print the retrieved endpoint details
	fmt.Printf("Endpoint details: Code: %d, Success: %t, Endpoint ID: %d\n", response.Code, response.Success, response.Data.Id)
}
import {
  ConnectionConfig,
  GetEndpoint,
  GetEndpointRequest,
} from "@rapidaai/nodejs";

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

async function getEndpoint(connectionCfg) {
  const request = new GetEndpointRequest();
  // endpointId
  request.setId(2223006263292198912);

  const response = await GetEndpoint(connectionCfg, request);
  if (response.getError()) {
    console.error(
      "Error fetching endpoint details:",
      response.getError()?.getHumanmessage()
    );
  } else {
    console.log("Endpoint Details:", response.getData());
  }
}

Response

code
int32
Numeric status code for the operation.
success
boolean
Indicates whether the operation was successful.
data
object
Detailed information about the endpoint.
error
object
Error information, if applicable.