For full setup and authentication options, see the Installation guide.
Parameters
ConnectionConfig
required
Configuration for the client connection.
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
int32
Numeric status code for the operation.
boolean
Indicates whether the operation was successful.
object
Detailed information about the endpoint.
Show child attributes
Show child attributes
uint64
Unique identifier for the endpoint.
string
Operational status of the endpoint.
string
Visibility status of the endpoint.
string
Source of the endpoint.
uint64
Identifier mapping to the endpoint’s source.
uint64
Associated project identifier.
uint64
Associated organization identifier.
uint64
Model identifier tied to the endpoint provider.
string
Selected language configuration for the endpoint.
string
Name assigned to the endpoint.
string
Description of the endpoint’s purpose.
timestamp
Timestamp of endpoint creation.
timestamp
Timestamp of last endpoint update.
uint64
Identifier of the creator.
uint64
Identifier of the last updater.