Endpoints

EndpointMethodDescription
/create/POSTUsed to create a new collection where your resources will be organized.
/collection/GETReturns a list of all existing collections.
/insert/POSTAllows you to add resources, such as documents or files, into a specified collection.
/query/POSTEnables you to search or retrieve information from your collections based on specific prompts.
/delete/DELETERemoves an entire collection and its associated resources.
/category/POSTCategorizes your data according to specific rules or schema definitions.

Response Formats by Endpoint

The WetroCloud API returns responses in a consistent JSON format. Each endpoint includes fields relevant to the specific operation.

Create Endpoint (/create/)

Used to create a new collection. The response includes the unique ID of the collection and a success status.

{
  "collection_id": "string", // A unique identifier, typically a UUID
  "success": boolean
}

Insert Endpoint (/insert/)

Adds resources to a collection. The response confirms success and tracks token usage.

{
  "success": boolean,
  "tokens": integer
}

Query Endpoint (/query/)

Fetches information from a collection based on a query. The response contains the result, token usage, and success status.

{
  "success": boolean,
  "response": "string",
  "tokens": integer
}

Delete Endpoint (/delete/)

Removes a collection and returns the operation status with a message.

{
  "success": boolean,
  "message": "string"
}

Categorize Endpoint (/category/)

Categorizes data according to rules or schemas. The response provides the assigned label, token usage, and success status.

{
  "response": // This structure is defined by the schema,
  "tokens": integer,
  "success": boolean
}