For more authentication options, see: https://doc.rapida.ai/api-reference/authentication
Parameters
ConnectionConfig
required
Configuration for the client connection.
GetAllEndpointRequest
required
Show child attributes
Show child attributes
Paginate
required
Usage
from rapida import (
ConnectionConfig,
GetAllEndpointRequest,
get_all_endpoint
)
from pprint import pprint
connection_config = ConnectionConfig.default_connection_config(
ConnectionConfig.with_sdk("{your-rapida-api-key}")
)
response = get_all_endpoint(
client_cfg=connection_config,
request=GetAllEndpointRequest(
paginate=Paginate(page=0, pageSize=20),
criterias=[Criteria(key="KEY", value="VALUE", logic="should")],
),
)
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()
// Retrieve all endpoints with pagination
response, err := clients.GetAllEndpoint(context.Background(), connectionConfig, &rapida_proto.GetAllEndpointRequest{
Paginate: &rapida_proto.Paginate{
Page: 0,
PageSize: 20,
},
// Optional: Add filtering criteria
// Criterias: []*rapida_proto.Criteria{{
// Key: "key",
// Value: "value",
// Logic: "should", // or "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)
}
import {
ConnectionConfig,
GetAllEndpoints,
Paginate,
Criteria,
GetAllEndpointRequest,
} from "@rapidaai/nodejs";
(async () => {
const connectionCfg = ConnectionConfig.DefaultConnectionConfig(
ConnectionConfig.WithSDK({
ApiKey: process.env.RAPIDA_PROJECT_CREDENTIAL,
})
);
getAllEndpoints(connectionCfg)
})();
async function getAllEndpoints(connectionCfg) {
const request = new GetAllEndpointRequest();
let paginate = new Paginate();
paginate.setPage(0);
paginate.setPagesize(20);
request.setPaginate(paginate);
let criteria = new Criteria();
criteria.setKey("KEY FOR FILTER");
criteria.setValue("MATCHING _VAULE");
criteria.setLogic("should" || "must");
request.addCriterias(criteria);
const response = await GetAllEndpoints(connectionCfg, request);
if (response.getError()) {
console.error(
"Error fetching all endpoints:",
response.getError()?.getHumanmessage()
);
} else {
console.log("All Endpoints:", response.getData().toObject());
}
}
Response
int32
Numeric status code for the operation.
boolean
Indicates whether the operation was successful.
Endpoint[]
Array of endpoint objects returned by the request.
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.
object
object
Pagination information for the response.