Skip to content

Knowledge bases (partitions)

14 calls. Every request needs the Authorization header: see the overview.

GET /partitions

Every partition.

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Response: Partition[] (200)

curl -X GET "https://api.maitento.com/partitions" \
-H "Authorization: $MAITENTO_AUTH"
PUT /partitions

Creates a partition (a temporary one deletes its files after fileLifetimeHours).

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
partitionIduuidyes

Request body: PartitionCreateRequest

FieldTypeRequiredDescription
namestringyesThe partition’s name.
isTemporarybooleanCreate a temporary partition: its files are never indexed and are removed once they are fileLifetimeHours old. Cannot be changed once the partition exists.
fileLifetimeHoursinteger | nullA temporary partition’s file lifetime, in hours; null is 24. Refused on an ordinary partition.

Response: Partition (200)

curl -X PUT "https://api.maitento.com/partitions" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"name":"..."}'
DELETE /partitions/by-id/{id}

Deletes an empty partition (Tenant.Admin).

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Response: no body (204)

curl -X DELETE "https://api.maitento.com/partitions/by-id/<id>" \
-H "Authorization: $MAITENTO_AUTH"
GET /partitions/by-id/{id}

The partition with this id. Throws NotFoundError when there is none.

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Response: Partition (200)

curl -X GET "https://api.maitento.com/partitions/by-id/<id>" \
-H "Authorization: $MAITENTO_AUTH"

partitions.acknowledgeEmbeddingCredentialFailures

Section titled “partitions.acknowledgeEmbeddingCredentialFailures”
PUT /partitions/by-id/{id}/embedding-credential-failures/acknowledge

Marks a partition’s embedding-credential failures as seen.

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Response: no body (204)

curl -X PUT "https://api.maitento.com/partitions/by-id/<id>/embedding-credential-failures/acknowledge" \
-H "Authorization: $MAITENTO_AUTH"
PUT /partitions/by-id/{id}/embedding-credential-stack

Sets the credential stack a partition embeds with (Tenant.Admin), or clears it with null. Its own embedding keys are tried first, then the stack’s, in place of the tenant’s model keys and default stack; Maitento’s key is never used.

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Request body: PartitionEmbeddingCredentialStackRequest

FieldTypeRequiredDescription
credentialStackIduuid | nullThe id of one of your credential stacks, or null to clear.

Response: Partition (200)

curl -X PUT "https://api.maitento.com/partitions/by-id/<id>/embedding-credential-stack" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"credentialStackId":"..."}'
DELETE /partitions/by-id/{id}/embedding-credentials

Removes a partition’s embedding keys.

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Response: no body (204)

curl -X DELETE "https://api.maitento.com/partitions/by-id/<id>/embedding-credentials" \
-H "Authorization: $MAITENTO_AUTH"
PUT /partitions/by-id/{id}/embedding-credentials

Sets the keys a partition embeds with (Tenant.Admin).

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Request body: PartitionEmbeddingCredentialsRequest

FieldTypeRequiredDescription
credentialsPartitionEmbeddingCredentialInput[]yesThe keys, in failover order. May be empty only with allowMaitentoFallback true, which means “no key of my own, use Maitento’s”. To remove the keys, use DELETE /partitions/by-id/{id}/embedding-credentials.
allowMaitentoFallbackbooleanConsent to fall back to Maitento’s key when every key above has failed. Defaults to false: once your own keys are exhausted, the embedding fails.

Response: Partition (200)

curl -X PUT "https://api.maitento.com/partitions/by-id/<id>/embedding-credentials" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"credentials":[]}'
PUT /partitions/by-id/{id}/embedding-profile

Changes a partition’s embedding profile (may re-index every file: never retried).

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Request body: PartitionEmbeddingProfileRequest

FieldTypeRequiredDescription
profilePartitionEmbeddingProfileInputyesThe profile to index the partition with.
credentialsPartitionEmbeddingCredentialInput[]yesYour keys for the profile’s provider, in failover order. May be empty only with allowMaitentoFallback true, which means “no key of my own, use Maitento’s”, or with a credentialStackId.
allowMaitentoFallbackbooleanConsent to fall back to Maitento’s key for this provider when your keys are exhausted.
credentialStackIduuid | nullThe id of one of your credential stacks for the partition to embed with, set in the same change, so the profile and the stack that serves it always match. With a stack, credentials may be empty, and Maitento’s key is never used. Null leaves the partition’s stack as it is; clear one with PUT /partitions/by-id/{id}/embedding-credential-stack.
allowReindexbooleanWhether this request may start a re-index. Defaults to true. Send false when you only mean to update the keys: if the profile would need a different index, the request is refused with api:embeddings:reindex-not-permitted and nothing changes. When the profile needs the same index, a failed re-index is resumed if the keys or consent changed, or, when this is true, even if they did not (a deliberate retry).

Response: Partition (200)

curl -X PUT "https://api.maitento.com/partitions/by-id/<id>/embedding-profile" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"profile":{"model":"..."},"credentials":[]}'
GET /partitions/by-id/{id}/files

The partition’s files, newest first: await it for the first page, or iterate every file.

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Path parameters

NameTypeRequiredDescription
iduuidyes

Query parameters

NameTypeRequiredDescription
cursorstring
limitinteger

Response: IngestedFilePage (200)

curl -X GET "https://api.maitento.com/partitions/by-id/<id>/files" \
-H "Authorization: $MAITENTO_AUTH"

partitions.listEmbeddingCredentialFailures

Section titled “partitions.listEmbeddingCredentialFailures”
GET /partitions/embedding-credential-failures

Partitions whose embedding credentials failed (Tenant.Admin).

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Response: Partition[] (200)

curl -X GET "https://api.maitento.com/partitions/embedding-credential-failures" \
-H "Authorization: $MAITENTO_AUTH"
GET /partitions/embedding-models

The embedding models a partition can use.

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Response: EmbeddingModelDefinition[] (200)

curl -X GET "https://api.maitento.com/partitions/embedding-models" \
-H "Authorization: $MAITENTO_AUTH"
POST /partitions/embedding-profile/probe

Tries an embedding profile and keys without saving them (a failed probe is still a 200).

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Request body: PartitionEmbeddingProbeRequest

FieldTypeRequiredDescription
profilePartitionEmbeddingProfileInputyesThe profile to test, validated exactly as a profile change is (a custom model must state its width).
credentialsPartitionEmbeddingCredentialInput[]The keys to test with, in priority order. At least one; the same rules apply as when setting a partition’s keys.

Response: PartitionEmbeddingProbeResult (200)

curl -X POST "https://api.maitento.com/partitions/embedding-profile/probe" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"profile":{"model":"..."}}'
PUT /partitions/embedding-status

The embedding status of many partitions (sent in batches of 500 ids).

Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.

Request body: PartitionEmbeddingStatusRequest

FieldTypeRequiredDescription
partitionIdsuuid[]yesThe partitions to report on. Unknown ids (or another tenant’s) are omitted from the response.

Response: PartitionEmbeddingStatus[] (200)

curl -X PUT "https://api.maitento.com/partitions/embedding-status" \
-H "Authorization: $MAITENTO_AUTH" \
-H "Content-Type: application/json" \
-d '{"partitionIds":[]}'