Remove Collection From Copilot
POST https://api.credal.ai/api/v0/copilots/removeCollectionFromCopilot Content-Type: application/json
Unlink a collection with a agent. The API Key used must be added to both the collection and the agent beforehand.
Reference: https://docs.credal.ai/api-reference/api-reference/copilots/remove-collection-from-copilot
Authentication
Section titled “Authentication”Authorizationheader (bearer token, required) — Bearer authentication of the formBearer <token>, where token is your auth token.
Request
Section titled “Request”Body (application/json)
Section titled “Body (application/json)”This endpoint expects an object.
copilotId(UUID, required) — Credal-generated agent ID to add the collection to.collectionId(UUID, required) — Credal-generated collection ID to add.
Examples
Section titled “Examples”Request
{
"copilotId": "82e4b12a-6990-45d4-8ebd-85c00e030c24",
"collectionId": "def1055f-83c5-43d6-b558-f7a38e7b299e"
}SDK Code
import { CredalClient } from "@credal/sdk";
async function main() {
const client = new CredalClient({
apiKey: "YOUR_TOKEN_HERE",
});
await client.copilots.removeCollectionFromCopilot({
copilotId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
collectionId: "def1055f-83c5-43d6-b558-f7a38e7b299e",
});
}
main();
from credal import CredalV0
import uuid
client = CredalV0(
api_key="YOUR_TOKEN_HERE",
)
client.copilots.remove_collection_from_copilot(
copilot_id=uuid.UUID("82e4b12a-6990-45d4-8ebd-85c00e030c24"),
collection_id=uuid.UUID("def1055f-83c5-43d6-b558-f7a38e7b299e"),
)