For more authentication options, see: https://doc.rapida.ai/api-reference/authentication
Parameters
Configuration for the client connection.
Show child attributes
Show child attributes
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
Numeric status code for the operation.
Indicates whether the operation was successful.
Array of endpoint objects returned by the request.
Show child attributes
Show child attributes
Unique identifier for the endpoint.
Operational status of the endpoint.
Visibility status of the endpoint.
Source of the endpoint.
Identifier mapping to the endpoint’s source.
Associated project identifier.
Associated organization identifier.
Model identifier tied to the endpoint provider.
Selected language configuration for the endpoint.
Name assigned to the endpoint.
Description of the endpoint’s purpose.
Timestamp of endpoint creation.
Timestamp of last endpoint update.
Identifier of the creator.
Identifier of the last updater.
Pagination information for the response.
Show child attributes
Show child attributes
Total number of endpoints available.
Total number of pages available.
Current page number (0-based).
Number of items per page.
Indicates if there are more pages available.
Indicates if there are previous pages available.