Get Datasets from Organization
curl --request GET \
--url https://api.trieve.ai/api/dataset/organization/{organization_id} \
--header 'Authorization: <api-key>' \
--header 'TR-Organization: <tr-organization>'import requests
url = "https://api.trieve.ai/api/dataset/organization/{organization_id}"
headers = {
"TR-Organization": "<tr-organization>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'TR-Organization': '<tr-organization>', Authorization: '<api-key>'}
};
fetch('https://api.trieve.ai/api/dataset/organization/{organization_id}', 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.trieve.ai/api/dataset/organization/{organization_id}",
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: <api-key>",
"TR-Organization: <tr-organization>"
],
]);
$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.trieve.ai/api/dataset/organization/{organization_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("TR-Organization", "<tr-organization>")
req.Header.Add("Authorization", "<api-key>")
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.trieve.ai/api/dataset/organization/{organization_id}")
.header("TR-Organization", "<tr-organization>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trieve.ai/api/dataset/organization/{organization_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["TR-Organization"] = '<tr-organization>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"dataset": {
"created_at": "2021-01-01 00:00:00.000",
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"name": "Trieve",
"organization_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"server_configuration": {},
"updated_at": "2021-01-01 00:00:00.000"
},
"dataset_usage": {
"chunk_count": 100,
"dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3"
}
}
]{
"message": "Bad Request"
}{
"message": "Bad Request"
}Dataset
Get Datasets from Organization
Auth’ed user or api key must have an admin or owner role for the specified dataset’s organization.
GET
/
api
/
dataset
/
organization
/
{organization_id}
Get Datasets from Organization
curl --request GET \
--url https://api.trieve.ai/api/dataset/organization/{organization_id} \
--header 'Authorization: <api-key>' \
--header 'TR-Organization: <tr-organization>'import requests
url = "https://api.trieve.ai/api/dataset/organization/{organization_id}"
headers = {
"TR-Organization": "<tr-organization>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'TR-Organization': '<tr-organization>', Authorization: '<api-key>'}
};
fetch('https://api.trieve.ai/api/dataset/organization/{organization_id}', 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.trieve.ai/api/dataset/organization/{organization_id}",
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: <api-key>",
"TR-Organization: <tr-organization>"
],
]);
$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.trieve.ai/api/dataset/organization/{organization_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("TR-Organization", "<tr-organization>")
req.Header.Add("Authorization", "<api-key>")
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.trieve.ai/api/dataset/organization/{organization_id}")
.header("TR-Organization", "<tr-organization>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trieve.ai/api/dataset/organization/{organization_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["TR-Organization"] = '<tr-organization>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"dataset": {
"created_at": "2021-01-01 00:00:00.000",
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"name": "Trieve",
"organization_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"server_configuration": {},
"updated_at": "2021-01-01 00:00:00.000"
},
"dataset_usage": {
"chunk_count": 100,
"dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3"
}
}
]{
"message": "Bad Request"
}{
"message": "Bad Request"
}Authorizations
Headers
The organization id to use for the request
Path Parameters
id of the organization you want to retrieve datasets for
Query Parameters
The number of records to return
The number of records to skip
Response
Datasets retrieved successfully
Show child attributes
Show child attributes
Example:
{ "created_at": "2021-01-01 00:00:00.000", "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3", "name": "Trieve", "organization_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3", "tracking_id": "3", "updated_at": "2021-01-01 00:00:00.000" }
Show child attributes
Show child attributes
Example:
{ "chunk_count": 100, "dataset_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3", "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3" }
Was this page helpful?
⌘I