Get Datastore Metadata
curl --request GET \
--url https://api.contextual.ai/v1/datastores/{datastore_id}/metadata \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.contextual.ai/v1/datastores/{datastore_id}/metadata"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.contextual.ai/v1/datastores/{datastore_id}/metadata', 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://api.contextual.ai/v1/datastores/{datastore_id}/metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.contextual.ai/v1/datastores/{datastore_id}/metadata"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.contextual.ai/v1/datastores/{datastore_id}/metadata")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contextual.ai/v1/datastores/{datastore_id}/metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"agent_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"configuration": {
"parsing": {
"figure_captioning_prompt": "<string>",
"figure_caption_mode": "default",
"enable_split_tables": false,
"max_split_table_cells": 100
},
"chunking": {
"chunking_mode": "hierarchy_depth",
"max_chunk_length_tokens": 768,
"min_chunk_length_tokens": 384,
"enable_hierarchy_based_contextualization": true
},
"html_config": {
"max_chunk_length_tokens": 768
}
},
"datastore_type": "UNSTRUCTURED",
"datastore_usages": {
"size_gb": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}/datastores
Get Datastore Metadata
Get the details of a given Datastore, including its name, create time, and the list of Agents which are currently configured to use the Datastore.
GET
/
datastores
/
{datastore_id}
/
metadata
Get Datastore Metadata
curl --request GET \
--url https://api.contextual.ai/v1/datastores/{datastore_id}/metadata \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.contextual.ai/v1/datastores/{datastore_id}/metadata"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.contextual.ai/v1/datastores/{datastore_id}/metadata', 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://api.contextual.ai/v1/datastores/{datastore_id}/metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.contextual.ai/v1/datastores/{datastore_id}/metadata"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.contextual.ai/v1/datastores/{datastore_id}/metadata")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contextual.ai/v1/datastores/{datastore_id}/metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"agent_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"configuration": {
"parsing": {
"figure_captioning_prompt": "<string>",
"figure_caption_mode": "default",
"enable_split_tables": false,
"max_split_table_cells": 100
},
"chunking": {
"chunking_mode": "hierarchy_depth",
"max_chunk_length_tokens": 768,
"min_chunk_length_tokens": 384,
"enable_hierarchy_based_contextualization": true
},
"html_config": {
"max_chunk_length_tokens": 768
}
},
"datastore_type": "UNSTRUCTURED",
"datastore_usages": {
"size_gb": 123
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the datastore for which to get details
Response
Successful Response
Name of the datastore
Timestamp of when the datastore was created
List of agents using this datastore
Configuration for unstructured datastores.
Show child attributes
Show child attributes
Type of the datastore
Allowed value:
"UNSTRUCTURED"Datastore usage
Show child attributes
Show child attributes
Was this page helpful?
⌘I