---
title: "Tables, knowledge, and files"
description: "Read and write rows, datasources, and files."
canonical_url: "https://docs.vettero.com/developer-api/data"
---
# Tables, knowledge, and files

> Read and write rows, datasources, and files.

Paths are under `/api/developer/v1`. Send `X-Workspace-Id` (workspace slug).

## Tables

Scope: `tables`.

<table>
<thead>
  <tr>
    <th>
      Call
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        GET /tables/{tableId}/rows
      </code>
    </td>
    
    <td>
      Lists rows. Query: <code>
        cursor
      </code>
      
      , <code>
        limit
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET /tables/{tableId}/rows/{rowId}
      </code>
    </td>
    
    <td>
      Reads one row
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST /tables/{tableId}/rows
      </code>
    </td>
    
    <td>
      Creates a row. Body: <code>
        { "values": { } }
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        PATCH /tables/{tableId}/rows/{rowId}
      </code>
    </td>
    
    <td>
      Updates fields in <code>
        values
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        DELETE /tables/{tableId}/rows/{rowId}
      </code>
    </td>
    
    <td>
      Deletes the row. <code>
        ?archive=true
      </code>
      
       archives it
    </td>
  </tr>
</tbody>
</table>

### Fields that trip people up

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        tableId
      </code>
    </td>
    
    <td>
      Table slug (<code>
        id
      </code>
      
       in the product) <strong>
        or
      </strong>
      
       the Mongo id
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        values
      </code>
      
       / <code>
        data
      </code>
    </td>
    
    <td>
      Keys are <strong>
        field ids
      </strong>
      
      , not display labels
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        archive=true
      </code>
    </td>
    
    <td>
      Soft-archives. Response has <code>
        archived: true
      </code>
      
      , <code>
        deleted: false
      </code>
    </td>
  </tr>
</tbody>
</table>

## Knowledge bases

Scope: `kb`.

<table>
<thead>
  <tr>
    <th>
      Call
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        POST /knowledge-bases/{id}/query
      </code>
    </td>
    
    <td>
      <code>
        { "text", "topK" }
      </code>
      
       — similarity search
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST /knowledge-bases/{id}/sources
      </code>
    </td>
    
    <td>
      Adds a datasource (<code>
        type
      </code>
      
      , <code>
        files
      </code>
      
      , <code>
        urls
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET /knowledge-bases/{id}/datasources
      </code>
    </td>
    
    <td>
      Lists datasources
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET /knowledge-bases/{id}/datasources/{dsId}
      </code>
    </td>
    
    <td>
      Reads one datasource
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST /knowledge-bases/{id}/datasources/{dsId}/refresh
      </code>
    </td>
    
    <td>
      Queues ingest again. It does not wait for indexing
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        DELETE /knowledge-bases/{id}/datasources/{dsId}
      </code>
    </td>
    
    <td>
      Removes a datasource
    </td>
  </tr>
</tbody>
</table>

### Fields that trip people up

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        topK
      </code>
    </td>
    
    <td>
      Max hits (1–50)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        score
      </code>
    </td>
    
    <td>
      Similarity. Higher is better; scale depends on the vector store
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        type
      </code>
    </td>
    
    <td>
      <code>
        structured
      </code>
      
       or <code>
        unstructured
      </code>
      
       — ingest pipeline kind
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        files
      </code>
    </td>
    
    <td>
      Workspace <strong>
        file ids
      </strong>
      
       from <code>
        POST /files
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        urls[].type
      </code>
    </td>
    
    <td>
      <code>
        document
      </code>
      
       or <code>
        youtube-video
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        status
      </code>
    </td>
    
    <td>
      <code>
        pending
      </code>
      
       / <code>
        processing
      </code>
      
       means indexing is not done. Watch <code>
        kb.ingest.completed
      </code>
      
       / <code>
        kb.ingest.failed
      </code>
    </td>
  </tr>
</tbody>
</table>

## Files

Scope: `files`.

<table>
<thead>
  <tr>
    <th>
      Call
    </th>
    
    <th>
      What it does
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        GET /files
      </code>
    </td>
    
    <td>
      Lists files. Query: <code>
        cursor
      </code>
      
      , <code>
        limit
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        POST /files
      </code>
    </td>
    
    <td>
      Multipart upload. Field name <code>
        file
      </code>
      
      . Optional <code>
        name
      </code>
      
      . Max 25 MB
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GET /files/{id}/url
      </code>
    </td>
    
    <td>
      Temporary download URL — do not cache forever
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        DELETE /files/{id}
      </code>
    </td>
    
    <td>
      Soft-deletes the file
    </td>
  </tr>
</tbody>
</table>


## Sitemap

See the full [sitemap](https://docs.vettero.com/sitemap.md) for all pages.
