Commands
The /commands endpoint allows you to execute various utility commands including those used to manage embeddings.
Embeddings
Get Embeddings Status
Endpoint: /commands/embeddings/<EMBEDDING_TYPE>/status
Method: GET
Requirements: User must have project:settings_read permission.
Headers
| Header | Value |
|---|---|
Authorization | Bearer <YOUR_JWT_TOKEN> |
Path Parameters
| Parameter | Data Type | Description |
|---|---|---|
| EMBEDDING_TYPE (Required) | string | The type of embedding. Can be text, image, or properties. |
Example Response
{
"status": "idle",
"embeddingRunsInProgress": 0,
"totalRunsInProgress": 0,
"embeddingsModels": [
"text-embedding-ada-002"
],
"vectorIndex": {
"status": "READY",
"name": "vsearch_text",
"type": "hnsw"
}
}
Code Example
Get Embeddings Status
curl --location --request GET \
'https://api.vertesia.io/api/v1/commands/embeddings/text/status' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>'
Activate Embeddings
Endpoint: /commands/embeddings/<EMBEDDING_TYPE>/enable
Method: POST
Requirements: User must have project:settings_write permission.
Headers
| Header | Value |
|---|---|
Authorization | Bearer <YOUR_JWT_TOKEN> |
Path Parameters
| Parameter | Data Type | Description |
|---|---|---|
| EMBEDDING_TYPE (Required) | string | The type of embedding. Can be text, image, or properties. |
Input Parameters
| Parameter | Data Type | Description |
|---|---|---|
| environment (Required) | string | The ID of the environment to use for generating embeddings. |
| max_tokens (Required) | number | The maximum number of tokens to use for generating embeddings. |
| dimensions (Required) | number | The number of dimensions to use for the embedding vectors. |
| model (Required) | string | The ID of the model to use for generating embeddings. |
Example Request
{
"environment": "<ENVIRONMENT_ID>",
"max_tokens": 500,
"dimensions": 1536,
"model": "text-embedding-ada-002"
}
Example Response
{
"status": "success",
"message": "Embeddings enabled"
}
Code Example
Activate Embeddings
curl --location --request POST \
'https://api.vertesia.io/api/v1/commands/embeddings/text/enable' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"environment": "<ENVIRONMENT_ID>",
"max_tokens": 500,
"dimensions": 1536,
"model": "text-embedding-ada-002"
}'
Deactivate Embeddings
Endpoint: /commands/embeddings/<EMBEDDING_TYPE>/disable
Method: POST
Requirements: User must have project:settings_write permission.
Headers
| Header | Value |
|---|---|
Authorization | Bearer <YOUR_JWT_TOKEN> |
Path Parameters
| Parameter | Data Type | Description |
|---|---|---|
| EMBEDDING_TYPE (Required) | string | The type of embedding. Can be text, image, or properties. |
Example Response
{
"status": "success",
"message": "Embeddings disabled"
}
Code Example
Deactivate Embeddings
curl --location --request POST \
'https://api.vertesia.io/api/v1/commands/embeddings/text/disable' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>'
Recalculate Embeddings
Endpoint: /commands/embeddings/<EMBEDDING_TYPE>/recalculate
Method: POST
Requirements: User must have project:settings_write permission.
Headers
| Header | Value |
|---|---|
Authorization | Bearer <YOUR_JWT_TOKEN> |
Path Parameters
| Parameter | Data Type | Description |
|---|---|---|
| EMBEDDING_TYPE (Required) | string | The type of embedding. Can be text, image, or properties. |
Example Response
{
"status": "success",
"message": "Embeddings recalculation started"
}
Code Example
Recalculate Embeddings
curl --location --request POST \
'https://api.vertesia.io/api/v1/commands/embeddings/text/recalculate' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>'
Onboarding
Initialize Samples
Endpoint: /commands/onboarding/init-samples
Method: POST
Requirements: User must have project:admin permission.
Headers
| Header | Value |
|---|---|
Authorization | Bearer <YOUR_JWT_TOKEN> |
Example Response
{
"status": "success",
"message": "Samples initialized"
}
Code Example
Initialize Samples
curl --location --request POST \
'https://api.vertesia.io/api/v1/commands/onboarding/init-samples' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>'
Indexing (Elasticsearch)
The Indexing API allows you to manage the optional Elasticsearch search backend for advanced search capabilities including full-text search, hybrid search, and complex aggregations.
/api/v1/indexing. For detailed search configuration guidance, see Search Configuration.Get Indexing Status
Endpoint: /indexing/status
Method: GET
Requirements: User must have project:settings_write permission.
Headers
| Header | Value |
|---|---|
Authorization | Bearer <YOUR_JWT_TOKEN> |
Example Response
{
"infrastructureEnabled": true,
"indexingEnabled": true,
"query_enabled": true,
"index": {
"exists": true,
"aliasName": "content_abc123",
"indexName": "content_abc123_v1",
"version": 1,
"createdAt": "2024-01-15T10:00:00Z",
"documentCount": 15234,
"sizeBytes": 52428800
},
"mongoDocumentCount": 15234,
"reindexInProgress": false,
"reindexProgress": null
}
Code Example
Get Indexing Status
curl --location --request GET \
'https://api.vertesia.io/api/v1/indexing/status' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>'
Enable Indexing
Endpoint: /indexing/enable-indexing
Method: POST
Requirements: User must have project:settings_write permission.
Headers
| Header | Value |
|---|---|
Authorization | Bearer <YOUR_JWT_TOKEN> |
Description
Enables Elasticsearch indexing for the project. This creates the Elasticsearch index using the project's embedding dimensions and starts syncing documents. New and updated documents will be automatically indexed. Queries are automatically enabled when indexing is enabled.
Example Response
{
"status": "ok",
"message": "Elasticsearch indexing enabled"
}
Code Example
Enable Indexing
curl --location --request POST \
'https://api.vertesia.io/api/v1/indexing/enable-indexing' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>'
Disable Indexing
Endpoint: /indexing/disable-indexing
Method: POST
Requirements: User must have project:settings_write permission.
Headers
| Header | Value |
|---|---|
Authorization | Bearer <YOUR_JWT_TOKEN> |
Description
Disables Elasticsearch indexing for the project. Documents will no longer be synced to Elasticsearch. This also disables queries.
Example Response
{
"status": "ok",
"message": "Elasticsearch indexing disabled"
}
Code Example
Disable Indexing
curl --location --request POST \
'https://api.vertesia.io/api/v1/indexing/disable-indexing' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>'
Trigger Reindex
Endpoint: /indexing/reindex
Method: POST
Requirements: User must have content:admin permission.
Headers
| Header | Value |
|---|---|
Authorization | Bearer <YOUR_JWT_TOKEN> |
Content-Type | application/json |
Input Parameters
| Parameter | Data Type | Description |
|---|---|---|
| recreateIndex | boolean | If true, drops and recreates the index before reindexing. Required when changing embedding dimensions or mappings. |
Description
Triggers a full reindex of all documents to Elasticsearch. Uses zero-downtime reindexing with alias swapping. Only one reindex can run at a time per project.
Example Request
{
"recreateIndex": false
}
Example Response
{
"status": "ok",
"message": "Full reindex started",
"details": {
"workflowId": "fullProjectReindexWorkflow:project-abc123"
}
}
Code Example
Trigger Reindex
curl --location --request POST \
'https://api.vertesia.io/api/v1/indexing/reindex' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"recreateIndex": false
}'
Namespaces
Check Namespace Availability
Endpoint: /commands/namespaces/<NAMESPACE>/is_available
Method: GET
Requirements: User must be authenticated.
Headers
| Header | Value |
|---|---|
Authorization | Bearer <YOUR_JWT_TOKEN> |
Path Parameters
| Parameter | Data Type | Description |
|---|---|---|
| NAMESPACE (Required) | string | The namespace to check. |
Example Response
{
"available": true
}
Code Example
Check Namespace Availability
curl --location --request GET \
'https://api.vertesia.io/api/v1/commands/namespaces/my-namespace/is_available' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>'
