younifyd
Menu

Create a namespace

Create a namespace

POST/namespaces

Use it in a workflow

  1. Add a step and choose the Pinecone connector.
  2. Pick the Create a namespace action (under Data).
  3. Fill in the fields below, then reference the result from later steps as {{createANamespace.response.data}}.

Request

Request body

Enter the body as JSON in the step's Body field.

namestringrequired

The name of the namespace. Must be ASCII, must not contain the NUL character, and must be 1-512 characters long. `__default__` is reserved: it names the namespace requests address when they omit a namespace, so it always exists and cannot be created explicitly.

schemaobject

Schema for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when `schema` is present, only fields which are present in the `fields` object with a `filterable: true` are indexed. Note that `filterable: false` is not currently supported.

fieldsobject

A map of metadata field names to their configuration. The field name must be a valid metadata field name. The field name must be unique. At most 50 fields may be declared. Field names may not begin with `$`, which introduces a filter operator. When declared at index creation, names beginning with `_` are also rejected (reserved for internal use).

json
{
  "name": "example-namespace",
  "schema": {
    "fields": {
      "description": {
        "filterable": true
      },
      "genre": {
        "filterable": true
      },
      "year": {
        "filterable": true
      }
    }
  }
}

Response

Returns 200 with an object. Read it in later steps with {{createANamespace.response.data.<field>}}.

namestring

The name of the namespace.

record_countstring (uint64)

The total number of records in the namespace. A 64-bit integer, serialized as a decimal string.

schemaobject

Schema for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when `schema` is present, only fields which are present in the `fields` object with a `filterable: true` are indexed. Note that `filterable: false` is not currently supported.

fieldsobject

A map of metadata field names to their configuration. The field name must be a valid metadata field name. The field name must be unique. At most 50 fields may be declared. Field names may not begin with `$`, which introduces a filter operator. When declared at index creation, names beginning with `_` are also rejected (reserved for internal use).

indexed_fieldsobject

A list of all indexed metatadata fields in the namespace

fieldsarray<string>
size_bytesstring (uint64)

The total size of the namespace's data, in bytes, as a 64-bit integer serialized as a decimal string. Approximate: data written before size tracking reads as 0, and recently deleted data may still be counted; compaction converges the value.

json
{
  "name": "example-namespace",
  "record_count": "20000",
  "schema": {
    "fields": {
      "description": {
        "filterable": true
      },
      "genre": {
        "filterable": true
      },
      "year": {
        "filterable": true
      }
    }
  },
  "indexed_fields": {
    "fields": [
      "genre",
      "year",
      "author"
    ]
  },
  "size_bytes": "1048576"
}

Need more? See the Pinecone guide for connection setup and behaviour shared by every action.

Create a namespace — Pinecone — Documentation