Weaviate schema API

The schema API from Weaviate — 12 operation(s) for schema.

OpenAPI Specification

weaviate-schema-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Weaviate REST authz schema API
  description: '# Introduction<br/> Weaviate is an open source, AI-native vector database that helps developers create intuitive and reliable AI-powered applications. <br/> ### Base Path <br/>The base path for the Weaviate server is structured as `[YOUR-WEAVIATE-HOST]:[PORT]/v1`. As an example, if you wish to access the `schema` endpoint on a local instance, you would navigate to `http://localhost:8080/v1/schema`. Ensure you replace `[YOUR-WEAVIATE-HOST]` and `[PORT]` with your actual server host and port number respectively. <br/> ### Questions? <br/>If you have any comments or questions, please feel free to reach out to us at the community forum [https://forum.weaviate.io/](https://forum.weaviate.io/). <br/>### Issues? <br/>If you find a bug or want to file a feature request, please open an issue on our GitHub repository for [Weaviate](https://github.com/weaviate/weaviate). <br/>### Need more documentation? <br/>For a quickstart, code examples, concepts and more, please visit our [documentation page](https://docs.weaviate.io/weaviate).'
  version: 1.38.0-dev
servers:
- url: http://localhost:8080
  description: Local Weaviate instance
security:
- ApiKeyAuth: []
- BearerAuth: []
tags:
- name: schema
paths:
  /schema:
    get:
      summary: Weaviate Get All Collection Definitions
      description: Retrieves the definitions of all collections (classes) currently in the database schema.
      tags:
      - schema
      operationId: schema.dump
      parameters:
      - name: consistency
        in: header
        required: false
        description: If true, the request is proxied to the cluster leader to ensure strong schema consistency. Default is true.
        schema:
          type: boolean
          default: true
      responses:
        '200':
          description: Successfully retrieved the database schema.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Schema'
        '401':
          description: Unauthorized or invalid credentials.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An error occurred while retrieving the schema. Check the ErrorResponse for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 100
    post:
      summary: Weaviate Create A New Collection
      description: Defines and creates a new collection (class).<br/><br/>If [`AutoSchema`](https://docs.weaviate.io/weaviate/config-refs/collections#auto-schema) is enabled (not recommended for production), Weaviate might attempt to infer schema from data during import. Manual definition via this endpoint provides explicit control.
      tags:
      - schema
      operationId: schema.objects.create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Class'
      responses:
        '200':
          description: Collection created successfully and its definition returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Class'
        '401':
          description: Unauthorized or invalid credentials.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid collection definition provided. Check the definition structure and properties.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An error occurred during collection creation. Check the ErrorResponse for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 100
  /schema/{className}:
    get:
      summary: Weaviate Get A Single Collection
      description: Retrieve the definition of a specific collection (`className`), including its properties, configuration, and vectorizer settings.
      tags:
      - schema
      operationId: schema.objects.get
      parameters:
      - name: className
        in: path
        required: true
        description: The name of the collection (class) to retrieve.
        schema:
          type: string
      - name: consistency
        in: header
        required: false
        description: If true, the request is proxied to the cluster leader to ensure strong schema consistency. Default is true.
        schema:
          type: boolean
          default: true
      responses:
        '200':
          description: Successfully retrieved the collection definition.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Class'
        '401':
          description: Unauthorized or invalid credentials.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Collection not found.
        '500':
          description: An error occurred while retrieving the collection definition. Check the ErrorResponse for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 100
    delete:
      summary: Weaviate Delete A Collection (And All Associated Data)
      description: 'Removes a collection definition from the schema. WARNING: This action permanently deletes all data objects stored within the collection.'
      tags:
      - schema
      operationId: schema.objects.delete
      parameters:
      - name: className
        in: path
        required: true
        description: The name of the collection (class) to delete.
        schema:
          type: string
      responses:
        '200':
          description: Collection deleted successfully.
        '400':
          description: Could not delete the collection. See the error response for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized or invalid credentials.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An error occurred during collection deletion. Check the ErrorResponse for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 100
    put:
      summary: Weaviate Update Collection Definition
      description: 'Updates the configuration settings of an existing collection (`className`) based on the provided definition. Note: This operation modifies mutable settings specified in the request body. It does not add properties (use `POST /schema/{className}/properties` for that) or change the collection name.'
      tags:
      - schema
      operationId: schema.objects.update
      parameters:
      - name: className
        in: path
        required: true
        description: The name of the collection (class) to update.
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Class'
      responses:
        '200':
          description: Collection settings updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Class'
        '401':
          description: Unauthorized or invalid credentials.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Collection not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid update attempt.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An error occurred while updating the collection. Check the ErrorResponse for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 100
  /schema/{className}/properties:
    post:
      summary: Weaviate Add A Property To A Collection
      description: Adds a new property definition to an existing collection (`className`) definition.
      tags:
      - schema
      operationId: schema.objects.properties.add
      parameters:
      - name: className
        in: path
        required: true
        description: The name of the collection (class) to add the property to.
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Property'
      responses:
        '200':
          description: Property added successfully and its definition returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Property'
        '401':
          description: Unauthorized or invalid credentials.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid property definition provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An error occurred while adding the property. Check the ErrorResponse for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 100
  /schema/{className}/properties/{propertyName}/index/{indexName}:
    delete:
      summary: Weaviate Delete A Property'S Inverted Index
      description: Deletes an inverted index of a specific property within a collection (`className`). The index to delete is identified by `indexName` and must be one of `filterable`, `searchable`, or `rangeFilters`.
      tags:
      - schema
      operationId: schema.objects.properties.delete
      parameters:
      - name: className
        in: path
        required: true
        description: The name of the collection (class) containing the property.
        schema:
          type: string
      - name: propertyName
        in: path
        required: true
        description: The name of the property whose inverted index should be deleted.
        schema:
          type: string
      - name: indexName
        in: path
        required: true
        description: The name of the inverted index to delete from the property.
        schema:
          type: string
          enum:
          - filterable
          - searchable
          - rangeFilters
      responses:
        '200':
          description: Index deleted successfully.
        '401':
          description: Unauthorized or invalid credentials.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid index, property or collection provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An error occurred while deleting the index. Check the ErrorResponse for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 100
  /schema/{className}/properties/{propertyName}/tokenize:
    post:
      summary: Weaviate Tokenize Text Using A Property'S Configuration
      description: Tokenizes the provided text using the tokenization method configured for the specified property. This endpoint automatically applies the property's tokenization setting and the collection's stopword configuration, making it useful for understanding exactly how text will be processed for a given property during indexing and querying.
      tags:
      - schema
      operationId: schema.objects.properties.tokenize
      parameters:
      - name: className
        in: path
        required: true
        description: The name of the collection (class) containing the property.
        schema:
          type: string
      - name: propertyName
        in: path
        required: true
        description: The name of the property whose tokenization configuration should be used.
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PropertyTokenizeRequest'
      responses:
        '200':
          description: Successfully tokenized the text using the property's configuration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenizeResponse'
        '400':
          description: Invalid request body, missing required fields, or property does not have tokenization configured.
        '401':
          description: Unauthorized or invalid credentials.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Collection or property not found.
        '422':
          description: Validation error, such as invalid class or property configuration for tokenization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Unexpected server error while tokenizing the text.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 100
  /schema/{className}/vectors/{vectorIndexName}/index:
    delete:
      summary: Weaviate Delete A Collection'S Vector Index.
      description: Deletes a specific vector index within a collection (`className`). The vector index to delete is identified by `vectorIndexName`.
      tags:
      - schema
      operationId: schema.objects.vectors.delete
      parameters:
      - name: className
        in: path
        required: true
        description: The name of the collection (class) containing the property.
        schema:
          type: string
      - name: vectorIndexName
        in: path
        required: true
        description: The name of the vector index.
        schema:
          type: string
      responses:
        '200':
          description: Vector index deleted successfully.
        '401':
          description: Unauthorized or invalid credentials.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid vector index or collection provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An error occurred while deleting the vector index. Check the ErrorResponse for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 100
  /schema/{className}/shards:
    get:
      summary: Weaviate Get The Shards Status Of A Collection
      description: Retrieves the status of all shards associated with the specified collection (`className`). For multi-tenant collections, use the `tenant` query parameter to retrieve status for a specific tenant's shards.
      tags:
      - schema
      operationId: schema.objects.shards.get
      parameters:
      - name: className
        in: path
        required: true
        description: The name of the collection (class) whose shards to query.
        schema:
          type: string
      - name: tenant
        in: query
        required: false
        description: The name of the tenant for which to retrieve shard statuses (only applicable for multi-tenant collections).
        schema:
          type: string
      responses:
        '200':
          description: Shard statuses retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShardStatusList'
        '401':
          description: Unauthorized or invalid credentials.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Collection not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An error occurred while retrieving shard statuses. Check the ErrorResponse for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 100
  /schema/{className}/shards/{shardName}:
    put:
      summary: Weaviate Update A Shard Status
      description: Updates the status of a specific shard within a collection (e.g., sets it to `READY` or `READONLY`). This is typically used after resolving an underlying issue (like disk space) that caused a shard to become non-operational. There is also a convenience function in each client to set the status of all shards of a collection.
      tags:
      - schema
      operationId: schema.objects.shards.update
      parameters:
      - name: className
        in: path
        required: true
        description: The name of the collection (class) containing the shard.
        schema:
          type: string
      - name: shardName
        in: path
        required: true
        description: The name of the shard to update.
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShardStatus'
      responses:
        '200':
          description: Shard status updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShardStatus'
        '422':
          description: Invalid update attempt
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized or invalid credentials.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Collection or shard not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An error occurred while updating the shard status. Check the ErrorResponse for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 100
  /schema/{className}/tenants:
    post:
      summary: Weaviate Create A New Tenant
      description: Creates one or more new tenants for a specified collection (`className`). Multi-tenancy must be enabled for the collection via its definition.
      tags:
      - schema
      operationId: tenants.create
      parameters:
      - name: className
        in: path
        required: true
        description: The name of the multi-tenant enabled collection (class).
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/Tenant'
      responses:
        '200':
          description: Tenants created successfully.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Tenant'
        '401':
          description: Unauthorized or invalid credentials.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An error occurred while creating tenants. Check the ErrorResponse for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 100
    put:
      summary: Weaviate Update A Tenant
      description: Updates the activity status (e.g., `ACTIVE`, `INACTIVE`, etc.) of one or more specified tenants within a collection (`className`).
      tags:
      - schema
      operationId: tenants.update
      parameters:
      - name: className
        in: path
        required: true
        description: The name of the collection (class) containing the tenants.
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/Tenant'
      responses:
        '200':
          description: Tenant statuses updated successfully.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Tenant'
        '401':
          description: Unauthorized or invalid credentials.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid update request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An error occurred while updating tenants. Check the ErrorResponse for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 100
    delete:
      summary: Weaviate Delete Tenants
      description: 'Deletes one or more specified tenants from a collection (`className`). WARNING: This action permanently deletes all data associated with the specified tenants.'
      tags:
      - schema
      operationId: tenants.delete
      parameters:
      - name: className
        in: path
        required: true
        description: The name of the collection (class) from which to delete tenants.
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
                description: Name of a tenant to delete.
      responses:
        '200':
          description: Tenants deleted successfully.
        '401':
          description: Unauthorized or invalid credentials.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An error occurred while deleting tenants. Check the ErrorResponse for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 100
    get:
      summary: Weaviate Get The List Of Tenants
      description: Retrieves a list of all tenants currently associated with the specified collection.
      tags:
      - schema
      operationId: tenants.get
      parameters:
      - name: className
        in: path
        required: true
        description: The name of the collection (class) whose tenants to list.
        schema:
          type: string
      - name: consistency
        in: header
        required: false
        description: If true, the request is proxied to the cluster leader to ensure strong schema consistency. Default is true.
        schema:
          type: boolean
          default: true
      responses:
        '200':
          description: Successfully retrieved tenants.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Tenant'
        '401':
          description: Unauthorized or invalid credentials.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An error occurred while listing tenants. Check the ErrorResponse for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 100
  /schema/{className}/tenants/{tenantName}:
    head:
      summary: Weaviate Check If A Tenant Exists
      description: Checks for the existence of a specific tenant within the given collection (`className`).
      tags:
      - schema
      operationId: tenant.exists
      parameters:
      - name: className
        in: path
        required: true
        description: The name of the collection (class) to check within.
        schema:
          type: string
      - name: tenantName
        in: path
        required: true
        description: The name of the tenant to check for.
        schema:
          type: string
      - name: consistency
        in: header
        required: false
        description: If true, the request is proxied to the cluster leader to ensure strong schema consistency. Default is true.
        schema:
          type: boolean
          default: true
      responses:
        '200':
          description: The tenant exists in the specified collection.
        '401':
          description: Unauthorized or invalid credentials.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Tenant or collection not found.
        '422':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An error occurred during the check. Check the ErrorResponse for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 100
    get:
      summary: Weaviate Get A Specific Tenant
      description: Retrieves details about a specific tenant within the given collection (`className`), such as its current activity status.
      tags:
      - schema
      operationId: tenants.get.one
      parameters:
      - name: className
        in: path
        required: true
        description: The name of the collection (class) containing the tenant.
        schema:
          type: string
      - name: tenantName
        in: path
        required: true
        description: The name of the tenant to retrieve.
        schema:
          type: string
      - name: consistency
        in: header
        required: false
        description: If true, the request is proxied to the cluster leader to ensure strong schema consistency. Default is true.
        schema:
          type: boolean
          default: true
      responses:
        '200':
          description: Successfully retrieved tenant details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tenant'
        '401':
          description: Unauthorized or invalid credentials.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Tenant or collection not found.
        '422':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An error occurred while retrieving the tenant. Check the ErrorResponse for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 100
  /aliases:
    get:
      summary: Weaviate List Aliases
      description: Retrieve a list of all aliases in the system. Results can be filtered by specifying a collection (class) name to get aliases for a specific collection only.
      tags:
      - schema
      operationId: aliases.get
      parameters:
      - name: class
        in: query
        required: false
        description: Optional filter to retrieve aliases for a specific collection (class) only. If not provided, returns all aliases.
        schema:
          type: string
      responses:
        '200':
          description: Successfully retrieved the list of aliases
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AliasResponse'
        '401':
          description: Unauthorized or invalid credentials.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid collection (class) parameter provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An error has occurred while trying to fulfill the request. Most likely the ErrorResponse will contain more information about the error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 100
    post:
      summary: Weaviate Create A New Alias
      description: Create a new alias mapping between an alias name and a collection (class). The alias acts as an alternative name for accessing the collection.
      tags:
      - schema
      operationId: aliases.create
      requestBody:
        content:
          application/json:
            schem

# --- truncated at 32 KB (59 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/weaviate/refs/heads/main/openapi/weaviate-schema-api-openapi.yml