v1

latestOpenAPI 3.0.3Apache 2.02026-07-2685172326.0 KB
Namespace Operations

List namespaces

List all namespaces in a serverless index.

Up to 100 namespaces are returned at a time by default, in sorted order (bitwise “C” collation). If the limit parameter is set, up to that number of namespaces are returned instead. Whenever there are additional namespaces to return, the response also includes a pagination_token that you can use to get the next batch of namespaces. When the response does not include a pagination_token, there are no more namespaces to return.

For guidance and examples, see Manage namespaces.

Note: This operation is not supported for pod-based indexes.

get/namespaces

Query parameters

limitinteger

Max number namespaces to return per page.

paginationTokenstring

Pagination token to continue a previous listing operation.

prefixstring

Prefix of the namespaces to list. Acts as a filter to return only namespaces that start with this prefix.

Headers

X-Pinecone-Api-Versionstring required

Required date-based version header

Response

A successful response

total_countinteger

The total number of namespaces in the index matching the prefix

Example response

{
  "namespaces": [
    {
      "name": "example-namespace",
      "record_count": 20000,
      "schema": {
        "fields": {
          "description": {
            "filterable": true
          },
          "genre": {
            "filterable": true
          },
          "year": {
            "filterable": true
          }
        }
      },
      "indexed_fields": {
        "fields": [
          "genre",
          "year",
          "author"
        ]
      }
    }
  ],
  "pagination": {
    "next": "Tm90aGluZyB0byBzZWUgaGVyZQo="
  },
  "total_count": 25
}