Get one tenant and its sub-tenants from the authorized partner scope.
curl --request GET \
--url https://{instance}.cyrisma.com/app/pulse/v1/partner/tenants/{tenantId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{instance}.cyrisma.com/app/pulse/v1/partner/tenants/{tenantId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{instance}.cyrisma.com/app/pulse/v1/partner/tenants/{tenantId}', 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://{instance}.cyrisma.com/app/pulse/v1/partner/tenants/{tenantId}",
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://{instance}.cyrisma.com/app/pulse/v1/partner/tenants/{tenantId}"
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://{instance}.cyrisma.com/app/pulse/v1/partner/tenants/{tenantId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.cyrisma.com/app/pulse/v1/partner/tenants/{tenantId}")
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{
"root_tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_host": "<string>",
"name": "<string>",
"kind": "<string>",
"status": "<string>",
"parent_tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"depth": 123
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Reporting
Get one tenant and its sub-tenants from the authorized partner scope.
Returns tenantId plus every tenant beneath it in the hierarchy, narrowed from the
caller’s full authorized scope.
Notes:
tenantIdmust be inside the caller’s authorized scope; anything else returns 403, whether or not the tenant exists.
Required headers:
Authorization: Bearer {token}(requires thepulse.readscope)
GET
/
pulse
/
v1
/
partner
/
tenants
/
{tenantId}
Get one tenant and its sub-tenants from the authorized partner scope.
curl --request GET \
--url https://{instance}.cyrisma.com/app/pulse/v1/partner/tenants/{tenantId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{instance}.cyrisma.com/app/pulse/v1/partner/tenants/{tenantId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{instance}.cyrisma.com/app/pulse/v1/partner/tenants/{tenantId}', 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://{instance}.cyrisma.com/app/pulse/v1/partner/tenants/{tenantId}",
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://{instance}.cyrisma.com/app/pulse/v1/partner/tenants/{tenantId}"
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://{instance}.cyrisma.com/app/pulse/v1/partner/tenants/{tenantId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.cyrisma.com/app/pulse/v1/partner/tenants/{tenantId}")
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{
"root_tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"items": [
{
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_host": "<string>",
"name": "<string>",
"kind": "<string>",
"status": "<string>",
"parent_tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"depth": 123
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Authorizations
A Tenant Authority machine-client token from POST /v1/auth/client-token, carrying subject_type=machine_client and the pulse.read scope.
