curl --request GET \
--url https://api.pyai.com/v1/managed-tenants \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pyai.com/v1/managed-tenants"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pyai.com/v1/managed-tenants', 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.pyai.com/v1/managed-tenants",
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.pyai.com/v1/managed-tenants"
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.pyai.com/v1/managed-tenants")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/managed-tenants")
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{
"object": "managed_tenant",
"version": "managed-tenant/v1",
"operation_id": "<string>",
"external_workspace_id": "<string>",
"request_hash": "<string>",
"idempotency_key": "<string>",
"parent_org_id": "<string>",
"payer_org_id": "<string>",
"child_org_id": "<string>",
"project_id": "<string>",
"key_id": "<string>",
"status": "provisioned",
"calling_ready": false,
"monthly_budget_cents": 2,
"scopes": [
"<string>"
],
"secret": "<string>"
}Recover one managed workspace by its exact external reference
Requires the same exact registered parent integration and tenants:provision scope. Returns only its exact workspace. Set capability=knowledge with child_org_id, project_id and key_id to read the current database grant without returning a credential or changing key projection. Otherwise, recovers the original credential from an authenticated encrypted envelope. Cache-Control:no-store applies to success and errors. Recovery proof: require idempotency_key to equal your durable original Idempotency-Key and request_hash to equal your saved request fingerprint before accepting resources or credentials. A mismatch is a conflict, never automatic adoption. Compute lowercase hexadecimal SHA-256 of UTF-8 JSON.stringify of an object with keys inserted in this exact order: externalWorkspaceId (the exact external_workspace_id, no trimming or case conversion), name (JavaScript String.trim of the submitted name, preserving interior whitespace and case), knowledgeEnabled (knowledge_enabled === true; omitted means false), followed by monthlyBudgetCents only when monthly_budget_cents was present, preserving its integer or null value. JSON has no extra whitespace. Omission and explicit null are distinct; registered defaults are not substituted into the request hash.
curl --request GET \
--url https://api.pyai.com/v1/managed-tenants \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pyai.com/v1/managed-tenants"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pyai.com/v1/managed-tenants', 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.pyai.com/v1/managed-tenants",
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.pyai.com/v1/managed-tenants"
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.pyai.com/v1/managed-tenants")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pyai.com/v1/managed-tenants")
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{
"object": "managed_tenant",
"version": "managed-tenant/v1",
"operation_id": "<string>",
"external_workspace_id": "<string>",
"request_hash": "<string>",
"idempotency_key": "<string>",
"parent_org_id": "<string>",
"payer_org_id": "<string>",
"child_org_id": "<string>",
"project_id": "<string>",
"key_id": "<string>",
"status": "provisioned",
"calling_ready": false,
"monthly_budget_cents": 2,
"scopes": [
"<string>"
],
"secret": "<string>"
}Authorizations
Query Parameters
Response
Original managed workspace or nonsecret capability status.
- Option 1
- Option 2