Get Organization Api Keys
curl --request GET \
--url https://api.trieve.ai/api/organization/api_key \
--header 'Authorization: <api-key>' \
--header 'TR-Organization: <tr-organization>'import requests
url = "https://api.trieve.ai/api/organization/api_key"
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/api_key', 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/api_key",
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/api_key"
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/api_key")
.header("TR-Organization", "<tr-organization>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trieve.ai/api/organization/api_key")
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[
{
"created_at": "2021-01-01 00:00:00.000",
"dataset_ids": [
"d0d0d0d0-d0d0-d0d0-d0d0-d0d0d0d0d0d0"
],
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"name": "Trieve",
"organization_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"role": 1,
"updated_at": "2021-01-01 00:00:00.000"
}
]{
"message": "Bad Request"
}Organization
Get Organization Api Keys
Get the api keys which belong to the organization. The actual api key values are not returned, only the ids, names, and creation dates.
GET
/
api
/
organization
/
api_key
Get Organization Api Keys
curl --request GET \
--url https://api.trieve.ai/api/organization/api_key \
--header 'Authorization: <api-key>' \
--header 'TR-Organization: <tr-organization>'import requests
url = "https://api.trieve.ai/api/organization/api_key"
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/api_key', 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/api_key",
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/api_key"
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/api_key")
.header("TR-Organization", "<tr-organization>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trieve.ai/api/organization/api_key")
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[
{
"created_at": "2021-01-01 00:00:00.000",
"dataset_ids": [
"d0d0d0d0-d0d0-d0d0-d0d0-d0d0d0d0d0d0"
],
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"name": "Trieve",
"organization_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"role": 1,
"updated_at": "2021-01-01 00:00:00.000"
}
]{
"message": "Bad Request"
}Authorizations
Headers
The organization id to use for the request.
Query Parameters
The cursor to start the pagination from.
The number of items to return per page.
Was this page helpful?
⌘I