API Reference

Overview

Gets a list of Records contained in the table. Note that you create a database and a table in Widget Dashboard in advance.

The default number of records that can be retrieved at one time is 20. To retrieve more than 20 records, specify the limit parameter.

Filter property can be used to narrow down the records to be retrieved. Sort property promises the order in which the records are returned. For more information, see Filter & Sort section.

ex. ) sample table

idnameproduct_typeprice
1applefruits100
2grapefruits200
3chocolatesnacks400
// request
{
        "filter": {
          "and": [
            {
              "key": "product_type",
              "operator": "equal",
              "value": "fruits"
            }
          ]
        },
        "sort": [
            {
                "key": "price",
                "direction": "descending"
            }
        ]
}

// query result
{
	"items": [
		{
		        "id": "2",
		        "name": "grape",
			"product_type": "fruits",
			"price": 200
		},
		{
		        "id": "1",
		        "name": "apple",
			"product_type": "fruits",
			"price": 100
		}
	],
	"count": 2
}

Embedding Similarity Field in Select Clause

When embedding field in filter or sort conditions, similarity fields are automatically returned.

e.x) embedding field name is embedding_field

// always ${EMBEDDING FILED NAME}_similarity
{
  "embedding_field_similarity": 0.988404030
}

Embedding Filter

Able to get filtered records by embedding field.

// get a list of records whose similarities are more than 0.9
{
  "filter": {
    "and": [
      {
        "key": "embedding_field",
        "operator": "greaterThanOrEqual",
        "value": 0.9,
        "embeddingOperator": "<=>",
        "embeddingValue": "banana"
      }    
    ]
  }
}

Embedding Sort

Able to get sorted records ordered similarity, when table has embedding fields.

operator

<-> -> L2 Distance

<=> -> cosine similarity

<#> -> inner product

e.x)

{
        "sort": [
            {
              "key": "embedding_field", // name of embedding field
              "operator": "<=>", // cosine similarity
              "value": "banana" // a word of search (sort)
            },
            // able to combine with normal sort coditions
            {
                "key": "price",
                "direction": "descending"
            }
        ]
}
Language
URL
Click Try It! to start a request and see the response here!