> ## Documentation Index
> Fetch the complete documentation index at: https://opendata.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a vector by ID

> Retrieve a single vector and its attributes by its user-provided ID.




## OpenAPI

````yaml /openapi/vector.yaml get /api/v1/vector/vectors/{id}
openapi: 3.1.0
info:
  title: OpenData Vector API
  version: 1.0.0
  description: >-
    HTTP API for the OpenData Vector service — a semantic search database on
    object storage.
servers:
  - url: http://localhost:8080
    description: Local development server
security: []
paths:
  /api/v1/vector/vectors/{id}:
    get:
      summary: Get a vector by ID
      description: |
        Retrieve a single vector and its attributes by its user-provided ID.
      operationId: getVector
      parameters:
        - name: id
          in: path
          required: true
          description: The user-provided vector ID.
          schema:
            type: string
            maxLength: 64
      responses:
        '200':
          description: The requested vector.
          content:
            application/protobuf+json:
              schema:
                $ref: '#/components/schemas/GetVectorResponse'
              example:
                status: success
                vector:
                  id: doc-1
                  attributes:
                    vector:
                      - 1
                      - 2
                      - 3
                    category: electronics
        '400':
          description: Invalid input.
          content:
            application/protobuf+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Vector not found.
          content:
            application/protobuf+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: error
                message: Document 'doc-1' not found
        '500':
          description: Internal server error.
          content:
            application/protobuf+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    GetVectorResponse:
      type: object
      description: Response containing a single vector retrieved by ID.
      properties:
        status:
          type: string
          example: success
        vector:
          $ref: '#/components/schemas/Vector'
      required:
        - status
        - vector
    ErrorResponse:
      type: object
      description: Error response returned for all error cases.
      properties:
        status:
          type: string
          example: error
        message:
          type: string
          description: Human-readable error message.
      required:
        - status
        - message
    Vector:
      type: object
      description: A record with an ID and attributes, including the embedding vector.
      properties:
        id:
          type: string
          maxLength: 64
          description: User-provided unique identifier (up to 64 bytes).
        attributes:
          $ref: '#/components/schemas/Attributes'
      required:
        - id
        - attributes
    Attributes:
      type: object
      description: |
        A flat map of attribute names to values. Must include a `vector` key
        with an array of floats matching the collection's configured dimensions.
        Other keys are metadata attributes whose types must match the collection
        schema (if defined).
      additionalProperties:
        $ref: '#/components/schemas/AttributeValue'
      required:
        - vector
    AttributeValue:
      description: |
        A metadata attribute value. In JSON, values are represented as plain
        scalars or arrays — strings, integers, floats, booleans, or arrays of
        floats (for the vector field).
      oneOf:
        - type: string
          description: String attribute value.
        - type: integer
          format: int64
          description: 64-bit signed integer attribute value.
        - type: number
          format: double
          description: 64-bit floating point attribute value.
        - type: boolean
          description: Boolean attribute value.
        - type: array
          items:
            type: number
            format: float
          description: >-
            Vector attribute (array of f32 values). Used for the reserved
            `vector` field.

````