At a glance:
This endpoint allows you to generate a unique collection_id. You would use this collection_id to insert, query and delete a resource.

What is a Collection?

A collection in the WetroCloud API acts as a container for resources such as text, files and the other supported resource types. Every collection is identified by a unique collection_id.

How to Create a Collection

Before you begin!
Visit the Wetrocloud console to get your API key. If you have trouble obtaining it, refer to this guide.

To create a collection, make a POST request to the /v1/collection/create/ endpoint. This operation is simple.

Required Parameters

ParameterTypeDescription
collection_idStringThe unique ID for collection.

Request Example

from wetro import Wetrocloud

# Initialize the Wetrocloud client
client = Wetrocloud(api_key="your_api_key")

# Create a collection
collection = client.collection.create_collection(
  collection_id="my_unique_collection_id"
)

print(collection)

Successful Response

If the request is valid, the response will include:

  • A unique collection_id for your new collection.
  • A success confirmation.

Example Response

{
  "collection_id": "my_unique_collection_id",
  "success": true
}