Search…
⌃K
📃

Documents

Manage documents in your dataset
Rows added to embedded datasets will automatically be embedded. The rows body should contain a list of objects, each with a data and optional metadata . The data object should contain a field text which will be used for the row's embedding. Each key in the data object will be added as a column in the dataset. Each key in the metadata object will be added as a metadata column in the dataset.
Only the "text" column will be embedded
For example this request body
{
"rows": [
{
"data": {
"text": "Baseplate",
"city": "San Francisco"
},
"metadata": {
"state": "California"
}
},
{
"data": {
"text": "Bloomberg",
"city": "New York City",
"country": "U.S"
},
"metadata": {
"state": "New York"
}
}
]
}
Would generate the following rows in your dataset
text
city
country
metadata
Baseplate
San Francisco
{"state": "California"}
Bloomberg
New York City
U.S.
{"state": "New York"}
get
https://www.trybaseplate.io
/api/datasets/{id}/documents
List documents under a dataset
get
https://www.trybaseplate.io
/api/datasets/{id}/documents/{document-id}/rows
Get all data rows under a document
get
https://www.trybaseplate.io
/api/datasets/{id}/documents/{document-id}
Get a single document
post
https://www.trybaseplate.io
/api/datasets/{id}/documents
Create a document
post
https://www.trybaseplate.io
/api/datasets/{id}/documents/{document-id}/rows
Add data rows to a document
Parameters
Path
id*
String
The dataset ID. Can be found on the dataset page.
document-id*
String
Document ID to add rows under
Header
Authorization*
String
Baseplate API key. Must be in the format
"Bearer $BASEPLATE_API_KEY"
Content-Type*
String
Use application/json
Body
rows*
Array
Array of rows to insert to the dataset. See above for example.
Responses
post
https://www.trybaseplate.io
/api/datasets/{id}/rows/upsert
Upsert data rows
post
https://www.trybaseplate.io
/api/datasets/{id}/upload
Upload a document (file) to a dataset
patch
https://www.trybaseplate.io
/api/datasets/{id}/documents/{document-id}
Update all rows for a document
patch
https://www.trybaseplate.io
/api/datasets/{id}/rows/{row-id}
Update a single row
delete
https://www.trybaseplate.io
/api/datasets/{id}/documents/{document-id}
Delete a document
delete
https://www.trybaseplate.io
/api/datasets/{id}/rows/{rowId}
Delete a single row
Deletes the row from the dataset. Returns an empty response on success.
Parameters
Path
id*
Dataset ID
rowId*
Row ID. Can be found the metadata.
Header
Authorization*
Baseplate API key. Must be in the format
"Bearer $BASEPLATE_API_KEY"
Content-Type*
Use application/json
Responses
200: OK
401: Unauthorized