Skip to main content
GET
/
api
/
datasets
/
{id}
/
rows
List rows under a dataset
curl --request GET \
  --url https://app.baseplate.ai/api/datasets/{id}/rows \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "offset": 123,
  "page_size": 123,
  "filter": {}
}
'
import requests

url = "https://app.baseplate.ai/api/datasets/{id}/rows"

payload = {
    "offset": 123,
    "page_size": 123,
    "filter": {}
}
headers = {
    "Authorization": "<authorization>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'GET',
  headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
  body: JSON.stringify({offset: 123, page_size: 123, filter: {}})
};

fetch('https://app.baseplate.ai/api/datasets/{id}/rows', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://app.baseplate.ai/api/datasets/{id}/rows",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => json_encode([
    'offset' => 123,
    'page_size' => 123,
    'filter' => [
        
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: <authorization>",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.baseplate.ai/api/datasets/{id}/rows"

	payload := strings.NewReader("{\n  \"offset\": 123,\n  \"page_size\": 123,\n  \"filter\": {}\n}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("Authorization", "<authorization>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.baseplate.ai/api/datasets/{id}/rows")
  .header("Authorization", "<authorization>")
  .header("Content-Type", "application/json")
  .body("{\n  \"offset\": 123,\n  \"page_size\": 123,\n  \"filter\": {}\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://app.baseplate.ai/api/datasets/{id}/rows")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"offset\": 123,\n  \"page_size\": 123,\n  \"filter\": {}\n}"

response = http.request(request)
puts response.read_body

List rows under a dataset.

Lists data rows, with options for metadata filtering and pagination.

Parameters

Authorization
string
required
Baseplate API key. Needs to be in the format β€œBearer &BASEPLATE_API_KEY”
Content-Type
string
Use application/json

Body

offset
number
Optional offset for pagination.
page_size
number
Optional page size.
filter
object
Optional metadata filter. Uses Pinecone filter syntax: https://docs.pinecone.io/docs/metadata-filtering
[
  {
    "id": 329904,
    "dataset_id": "5bfd34e3-f7de-4b80-b3d0-841494056e9e",
    "data": {
      "text": "This is a test document."
    },
    "embedding_vector_ids": {
      "text": "5aa6a774ec"
    },
    "metadata": {
      "date": "10/15/2022",
      "rowId": 329904,
      "documentId": "doc1"
    },
    "document_id": "doc1",
    "image_paths": null
  }
]