Update datastore
/datastore/{id}
Path Parameters
The ID of the datastore to update.
Request Body
Updated config object. Partial updates are accepted; fields not supplied are left unchanged. Shape still depends on type. An update that moves api_url (mongo_data_api), base_url (qdrant) or index_host (pinecone) to another site must send api_key with it, or it is refused with a 400; so must one that changes base_url or account_name (azure_blob_storage, with sas_token or account_key) or account (snowflake, with private_key). api_key sent back as ******** keeps the stored key, so it is refused too.
Mongo Data Api · 4 properties
Atlas Data API key. Treat as a secret.
Base URL of your Atlas Data API endpoint.
Name of the Atlas cluster (the Data API "data source").
Google Cloud Storage · 2 properties
Service-account JSON used to authenticate against Google Cloud Storage.
11 properties
S3 · 5 properties
Optional override for non-AWS S3 endpoints (e.g. R2, MinIO). Must be a public https URL without a query string or fragment; a private, loopback or link-local address is refused with a 400. Checked on create, and on update when it changes.
Secret access key. Treat as a secret.
Qdrant · 4 properties
Qdrant API key. Treat as a secret.
The Qdrant instance's URL. Must be a public https URL without a query string or fragment; a private, loopback or link-local address is refused with a 400. Checked on create, and on update when it changes.
Azure Blob Storage · 6 properties
Base64 storage account key, used for Shared Key authorization. Required when auth_type is account_key. Treat as a secret.
Storage account name.
How requests are authorized. The matching secret field is required.
sas_tokenaccount_key
Optional public https endpoint that replaces https://{account_name}.blob.core.windows.net, for example a sovereign cloud.
Blob container name (3-63 lowercase letters, digits and single hyphens).
Shared access signature for the container, with read, write and list permissions. Required when auth_type is sas_token. Treat as a secret.
Postgres · 1 property
postgres://user:password@host:port/database connection string with a public host. TLS is required unless the string sets sslmode=disable; other query options are ignored. The password can be pasted as-is or URL-encoded. With TLS, the server's certificate must chain to a public CA, because Cloudflare Workers cannot trust a private one; Supabase signs with its own CA, so a Supabase connection currently needs sslmode=disable. A connection that is not established within 15 seconds fails. Treat as a secret.
Pinecone · 2 properties
Pinecone API key. Treat as a secret.
The index host from the Pinecone console, for example https://docs-abc123.svc.aped-4627-b74a.pinecone.io.
Big Query · 3 properties
Service-account JSON used to authenticate against Google Cloud Storage.
11 properties
Dataset to write to. The service account needs the BigQuery Data Editor role on it.
Project that holds the dataset. Defaults to the service account's project_id.
Snowflake · 7 properties
Account identifier in orgname-account_name form, or a legacy account locator such as xy12345.us-east-2.aws.
Default database. Case-sensitive, as returned by SHOW DATABASES.
Unencrypted RSA private key in PEM form, PKCS#8 (-----BEGIN PRIVATE KEY-----) or PKCS#1 (-----BEGIN RSA PRIVATE KEY-----). Treat as a secret.
Optional role. Defaults to the user's default role.
Default schema. Case-sensitive, as returned by SHOW SCHEMAS.
Snowflake user that holds the public key (RSA_PUBLIC_KEY).
Warehouse to run statements on. Case-sensitive, as returned by SHOW WAREHOUSES.
New label for this datastore.
Optional list of datastore methods to run against the connection before it is saved. If any of them fails, the request is refused with a 400 and the per-method results. s3, google_cloud_storage and azure_blob_storage support listObjects and uploadObject (uploadObject writes a small test file); postgres, pinecone, bigquery and snowflake support testConnection. Other names, and other datastore types, are not checked.
["listObjects"]Response Body
Config object for the datastore connection (minus sensitive fields). The shape depends on type.
{
"data_source": "Cluster0",
"database": "my_db",
"api_url": "https://data.mongodb-api.com/app/..."
}Mongo Data Api · 4 properties
Atlas Data API key. Treat as a secret.
Base URL of your Atlas Data API endpoint.
Name of the Atlas cluster (the Data API "data source").
Google Cloud Storage · 2 properties
Service-account JSON used to authenticate against Google Cloud Storage.
11 properties
S3 · 5 properties
Optional override for non-AWS S3 endpoints (e.g. R2, MinIO). Must be a public https URL without a query string or fragment; a private, loopback or link-local address is refused with a 400. Checked on create, and on update when it changes.
Secret access key. Treat as a secret.
Qdrant · 4 properties
Qdrant API key. Treat as a secret.
The Qdrant instance's URL. Must be a public https URL without a query string or fragment; a private, loopback or link-local address is refused with a 400. Checked on create, and on update when it changes.
Azure Blob Storage · 6 properties
Base64 storage account key, used for Shared Key authorization. Required when auth_type is account_key. Treat as a secret.
Storage account name.
How requests are authorized. The matching secret field is required.
sas_tokenaccount_key
Optional public https endpoint that replaces https://{account_name}.blob.core.windows.net, for example a sovereign cloud.
Blob container name (3-63 lowercase letters, digits and single hyphens).
Shared access signature for the container, with read, write and list permissions. Required when auth_type is sas_token. Treat as a secret.
Postgres · 1 property
postgres://user:password@host:port/database connection string with a public host. TLS is required unless the string sets sslmode=disable; other query options are ignored. The password can be pasted as-is or URL-encoded. With TLS, the server's certificate must chain to a public CA, because Cloudflare Workers cannot trust a private one; Supabase signs with its own CA, so a Supabase connection currently needs sslmode=disable. A connection that is not established within 15 seconds fails. Treat as a secret.
Pinecone · 2 properties
Pinecone API key. Treat as a secret.
The index host from the Pinecone console, for example https://docs-abc123.svc.aped-4627-b74a.pinecone.io.
Big Query · 3 properties
Service-account JSON used to authenticate against Google Cloud Storage.
11 properties
Dataset to write to. The service account needs the BigQuery Data Editor role on it.
Project that holds the dataset. Defaults to the service account's project_id.
Snowflake · 7 properties
Account identifier in orgname-account_name form, or a legacy account locator such as xy12345.us-east-2.aws.
Default database. Case-sensitive, as returned by SHOW DATABASES.
Unencrypted RSA private key in PEM form, PKCS#8 (-----BEGIN PRIVATE KEY-----) or PKCS#1 (-----BEGIN RSA PRIVATE KEY-----). Treat as a secret.
Optional role. Defaults to the user's default role.
Default schema. Case-sensitive, as returned by SHOW SCHEMAS.
Snowflake user that holds the public key (RSA_PUBLIC_KEY).
Warehouse to run statements on. Case-sensitive, as returned by SHOW WAREHOUSES.
Timestamp when the datastore record was created.
The environment to which this datastore belongs.
The unique ID of the datastore.
A friendly label for identifying this datastore.
The datastore's backend type. Determines the shape of config.
mongo_data_apigoogle_cloud_storages3qdrantazure_blob_storagepostgrespineconebigquerysnowflake
Timestamp when the datastore record was last updated.
truto datastores update '<id>' \
-b '{
"label": "your_label",
"validation_methods": [
"listObjects"
]
}' \
-o jsonimport Truto from '@truto/truto-ts-sdk';
const truto = new Truto({
token: '<your_api_token>',
});
const body = {
"label": "your_label",
"validation_methods": [
"listObjects"
]
};
const result = await truto.datastore.update('<id>', body);
console.log(result);import asyncio
from truto_python_sdk import TrutoApi
truto_api = TrutoApi(token="<your_api_token>")
async def main():
body = {
"label": "your_label",
"validation_methods": [
"listObjects"
]
}
result = await truto_api.datastores.update("<id>", body)
print(result)
asyncio.run(main())curl -X PATCH 'https://api.truto.one/datastore/{id}' \
-H 'Authorization: Bearer <your_api_token>' \
-H 'Content-Type: application/json' \
-d '{
"label": "your_label",
"validation_methods": [
"listObjects"
]
}'const body = {
"label": "your_label",
"validation_methods": [
"listObjects"
]
};
const response = await fetch('https://api.truto.one/datastore/{id}', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer <your_api_token>',
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import requests
url = "https://api.truto.one/datastore/{id}"
headers = {
"Authorization": "Bearer <your_api_token>",
"Content-Type": "application/json",
}
params = {
}
payload = {
"label": "your_label",
"validation_methods": [
"listObjects"
]
}
response = requests.patch(url, headers=headers, params=params, json=payload)
print(response.json())