Query prices reduced by up to 94%

View Metadata

GET /v1/namespaces/:namespace/metadata

Returns metadata about a namespace.

Response

schema object

approx_logical_bytes integer

The approximate number of logical bytes in the namespace.

This is a coarse approximation and may change over time as turbopuffer's data representation evolves.

When using disable_backpressure, this metric will not be updated until all data has been indexed.


approx_row_count integer

The approximate number of rows in the namespace.

When using disable_backpressure, this metric will not be updated until all data has been indexed.


created_at string

The timestamp when the namespace was created, in ISO 8601 format.

Example: "2024-03-15T10:30:45Z"


last_write_at string

The timestamp when the namespace's data was last modified, in ISO 8601 format.

Example: "2024-03-19T09:12:14Z"


updated_at string

The timestamp when the namespace when the namespace's data or schema was last modified, in ISO 8601 format.

Example: "2024-04-16T09:27:32Z"


encryption object

Describes how the namespace is encrypted.

  • Default server-side encryption: { "mode": "default" }
  • CMEK: { "mode": "customer-managed", "key_name": "…" }
  // GCP Example
  { "mode": "customer-managed",
    "key_name": "projects/myproject/locations/us-central1/keyRings/EXAMPLE/cryptoKeys/KEYNAME" }
  // AWS Example
  { "mode": "customer-managed",
    "key_name": "arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012" }

index object

The state of the index for the namespace. Contains the following fields:

  • status (string): updating or up-to-date

  • unindexed_bytes (integer):

    The number of bytes in the namespace that are in the write-ahead log but have not yet been indexed. Note that unindexed data is still searched by queries (see consistency for details).

    Only present when status is updating.


pinning object

Namespace pinning provisions reserved compute for a namespace to provide predictable cost and performance for large namespaces with sustained query volume, with always-warm cache.

Only present when the namespace is pinned.

Contains the following fields:

  • replicas (integer): The number of read replicas configured for the namespace. Each replica increases read throughput.

  • status (object): Operational status for the pinned namespace. When available, includes the number of ready_replicas that are warm and able to serve traffic, along with the average utilization of all ready replicas.

    When utilization exceeds 90%, consider increasing replica count.

Example: { "replicas": 2, "status": { "ready_replicas": 1, "utilization": 0.73 } }

Example

Billing

This request is billed as a query that returns zero rows.


Change Metadata

PATCH /v1/namespaces/:namespace/metadata

Updates metadata configuration for a namespace.

Updates the configuration for a namespace.

Currently used to configure namespace pinning.

Request

pinning object

Configuration for namespace pinning, which provisions reserved compute for a namespace to provide predictable cost and performance for large namespaces with sustained query volume, with always-warm cache.

Set to null to remove pinning from a namespace.

Contains the following fields:

  • replicas (integer, optional): The number of read replicas to provision. Defaults to 1. Each replica runs on its own reserved node, increases read throughput, and multiplies pinning cost.

Example (enable pinning):

{
  "pinning": {
    "replicas": 2
  }
}

You can also enable pinning with the defaults (1 replica):

{
  "pinning": true
}

Example (disable pinning):

{
  "pinning": null
}

Response

Returns the updated namespace metadata. See View Metadata response fields for details.

Billing

This request is billed as a query that returns zero rows.