Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions api-reference/go/datasets/Collections.Delete.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ icon: layer-group
func (collectionClient) Delete(
ctx context.Context,
datasetID uuid.UUID,
name string,
collectionID uuid.UUID,
) error
```

Delete a collection by its name.
Delete a collection by its id.

## Parameters

<ParamField path="datasetID" type="uuid.UUID">
The id of the dataset
</ParamField>
<ParamField path="name" type="string">
The name of the collection
<ParamField path="collectionID" type="uuid.UUID">
The id of the collection
</ParamField>

## Returns
Expand All @@ -31,7 +31,7 @@ An error if the collection could not be deleted.
```go Go
err := client.Collections.Delete(ctx,
datasetID,
"My-collection",
collectionID,
)
```
</RequestExample>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ icon: database
---

```python
def Dataset.delete_collection(name: str) -> None
def Dataset.delete_collection(collection: str | UUID | CollectionClient) -> None
```

Delete a collection in the dataset.

## Parameters

<ParamField path="name" type="string">
The name of the collection
<ParamField path="collection" type="str | UUID | CollectionClient">
The collection to delete. Can be specified by name, id, or as a collection object.
</ParamField>

<RequestExample>
Expand Down
8 changes: 6 additions & 2 deletions datasets/concepts/collections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,16 @@ Collections can be deleted from a dataset using the `delete_collection` method.

To delete a collection, you need to have write permission on the dataset.

<Warning>
Deleting a collection will delete all data points in the collection.
</Warning>

<CodeGroup>
```python Python
dataset.delete_collection("My-collection")
dataset.delete_collection(collection)
```
```go Go
err := client.Collections.Delete(ctx, dataset.ID, "My-collection")
err := client.Collections.Delete(ctx, dataset.ID, collection.ID)
```
</CodeGroup>

Expand Down