Get Organization
curl --request GET \
--url https://api.trieve.ai/api/organization/{organization_id} \
--header 'Authorization: <api-key>' \
--header 'TR-Organization: <tr-organization>'import requests
url = "https://api.trieve.ai/api/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/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/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/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/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/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{
"organization": {
"created_at": "2021-01-01 00:00:00.000",
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"name": "Trieve",
"registerable": true,
"updated_at": "2021-01-01 00:00:00.000"
},
"plan": {
"amount": 1000,
"chunk_count": 1000,
"created_at": "2021-01-01 00:00:00.000",
"dataset_count": 1,
"file_storage": 512,
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"message_count": 1000,
"name": "Free",
"stripe_id": "plan_123",
"updated_at": "2021-01-01 00:00:00.000",
"user_count": 5
},
"subscription": {
"created_at": "2021-01-01 00:00:00.000",
"current_period_end": "2021-01-01 00:00:00.000",
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"organization_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"plan_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"stripe_id": "sub_123",
"updated_at": "2021-01-01 00:00:00.000"
}
}{
"message": "Bad Request"
}{
"message": "Bad Request"
}Organization
Get Organization
Fetch the details of an organization by its id. Auth’ed user or api key must have an admin or owner role for the specified dataset’s organization.
GET
/
api
/
organization
/
{organization_id}
Get Organization
curl --request GET \
--url https://api.trieve.ai/api/organization/{organization_id} \
--header 'Authorization: <api-key>' \
--header 'TR-Organization: <tr-organization>'import requests
url = "https://api.trieve.ai/api/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/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/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/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/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/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{
"organization": {
"created_at": "2021-01-01 00:00:00.000",
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"name": "Trieve",
"registerable": true,
"updated_at": "2021-01-01 00:00:00.000"
},
"plan": {
"amount": 1000,
"chunk_count": 1000,
"created_at": "2021-01-01 00:00:00.000",
"dataset_count": 1,
"file_storage": 512,
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"message_count": 1000,
"name": "Free",
"stripe_id": "plan_123",
"updated_at": "2021-01-01 00:00:00.000",
"user_count": 5
},
"subscription": {
"created_at": "2021-01-01 00:00:00.000",
"current_period_end": "2021-01-01 00:00:00.000",
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"organization_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"plan_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"stripe_id": "sub_123",
"updated_at": "2021-01-01 00:00:00.000"
}
}{
"message": "Bad Request"
}{
"message": "Bad Request"
}Authorizations
Headers
The organization id to use for the request
Path Parameters
The id of the organization you want to fetch.
Response
Organization with the id that was requested
Show child attributes
Show child attributes
Example:
{ "created_at": "2021-01-01 00:00:00.000", "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3", "name": "Trieve", "partner_configuration": { "COMPANY_NAME": "Trieve", "DEMO_DOMAIN": "demos.trieve.ai", "FAVICON_URL": "https://cdn.trieve.ai/favicon.ico" }, "registerable": true, "updated_at": "2021-01-01 00:00:00.000" }
- Option 1
- Option 2
Show child attributes
Show child attributes
Example:
{ "amount": 1000, "chunk_count": 1000, "created_at": "2021-01-01 00:00:00.000", "dataset_count": 1, "file_storage": 512, "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3", "message_count": 1000, "messages_per_month": 1000, "name": "Free", "stripe_id": "plan_123", "updated_at": "2021-01-01 00:00:00.000", "user_count": 5 }
- Option 1
- Option 2
Show child attributes
Show child attributes
Example:
{ "created_at": "2021-01-01 00:00:00.000", "current_period_end": "2021-01-01 00:00:00.000", "id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3", "organization_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3", "plan_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3", "stripe_id": "sub_123", "updated_at": "2021-01-01 00:00:00.000" }
Was this page helpful?
⌘I