Get Organization Users
curl --request GET \
--url https://api.trieve.ai/api/organization/users/{organization_id} \
--header 'Authorization: <api-key>' \
--header 'TR-Organization: <tr-organization>'import requests
url = "https://api.trieve.ai/api/organization/users/{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/users/{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/users/{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/users/{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/users/{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/users/{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[
{
"email": "developers@trieve.ai",
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"name": "Trieve",
"orgs": [
{
"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"
}
],
"user_orgs": [
{
"created_at": "2021-01-01 00:00:00.000",
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"org_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"role": 0,
"updated_at": "2021-01-01 00:00:00.000",
"user_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3"
}
]
}
]{
"message": "Bad Request"
}Organization
Get Organization Users
Fetch the users 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
/
users
/
{organization_id}
Get Organization Users
curl --request GET \
--url https://api.trieve.ai/api/organization/users/{organization_id} \
--header 'Authorization: <api-key>' \
--header 'TR-Organization: <tr-organization>'import requests
url = "https://api.trieve.ai/api/organization/users/{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/users/{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/users/{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/users/{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/users/{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/users/{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[
{
"email": "developers@trieve.ai",
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"name": "Trieve",
"orgs": [
{
"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"
}
],
"user_orgs": [
{
"created_at": "2021-01-01 00:00:00.000",
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"org_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"role": 0,
"updated_at": "2021-01-01 00:00:00.000",
"user_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3"
}
]
}
]{
"message": "Bad Request"
}Authorizations
Headers
The organization id to use for the request
Path Parameters
The id of the organization you want to fetch the users of.
Was this page helpful?
⌘I