Skip to content

Commit 3a3e09b

Browse files
Update DeleteCollection (#65)
1 parent e2c6599 commit 3a3e09b

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

api-reference/go/datasets/Collections.Delete.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ icon: layer-group
88
func (collectionClient) Delete(
99
ctx context.Context,
1010
datasetID uuid.UUID,
11-
name string,
11+
collectionID uuid.UUID,
1212
) error
1313
```
1414

15-
Delete a collection by its name.
15+
Delete a collection by its id.
1616

1717
## Parameters
1818

1919
<ParamField path="datasetID" type="uuid.UUID">
2020
The id of the dataset
2121
</ParamField>
22-
<ParamField path="name" type="string">
23-
The name of the collection
22+
<ParamField path="collectionID" type="uuid.UUID">
23+
The id of the collection
2424
</ParamField>
2525

2626
## Returns
@@ -31,7 +31,7 @@ An error if the collection could not be deleted.
3131
```go Go
3232
err := client.Collections.Delete(ctx,
3333
datasetID,
34-
"My-collection",
34+
collectionID,
3535
)
3636
```
3737
</RequestExample>

api-reference/python/tilebox.datasets/Dataset.delete_collection.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ icon: database
44
---
55

66
```python
7-
def Dataset.delete_collection(name: str) -> None
7+
def Dataset.delete_collection(collection: str | UUID | CollectionClient) -> None
88
```
99

1010
Delete a collection in the dataset.
1111

1212
## Parameters
1313

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

1818
<RequestExample>

datasets/concepts/collections.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,16 @@ Collections can be deleted from a dataset using the `delete_collection` method.
155155

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

158+
<Warning>
159+
Deleting a collection will delete all data points in the collection.
160+
</Warning>
161+
158162
<CodeGroup>
159163
```python Python
160-
dataset.delete_collection("My-collection")
164+
dataset.delete_collection(collection)
161165
```
162166
```go Go
163-
err := client.Collections.Delete(ctx, dataset.ID, "My-collection")
167+
err := client.Collections.Delete(ctx, dataset.ID, collection.ID)
164168
```
165169
</CodeGroup>
166170

0 commit comments

Comments
 (0)