List owners
curl --request GET \
--url https://{region}.api.plerion.com/v1/tenant/owners \
--header 'Authorization: Bearer <token>'import requests
url = "https://{region}.api.plerion.com/v1/tenant/owners"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{region}.api.plerion.com/v1/tenant/owners', 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://{region}.api.plerion.com/v1/tenant/owners",
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://{region}.api.plerion.com/v1/tenant/owners"
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://{region}.api.plerion.com/v1/tenant/owners")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/owners")
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{
"data": [
{
"id": "3f0c2a7e-1b8d-4c55-9a61-0d2f7e9b4c11",
"kind": "team",
"name": "Payments",
"email": "payments@example.com",
"origin": "inferred",
"foundBy": {
"ruleId": "<string>",
"value": "payments",
"key": "Team",
"from": "asset"
},
"guessed": true,
"tool": "<string>",
"aliases": [
{
"value": "payments-team",
"origin": true,
"source": "tag"
}
],
"assetCount": 2410,
"handSetAssets": 3,
"createdBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"total": 72,
"page": 1,
"limit": 25,
"counts": {
"team": 40,
"person": 32
}
}{
"message": "Forbidden"
}{
"message": "Internal server error"
}List owners
Every team and person in the tenant with the names they go by and how many assets they own, sorted by name.
Send any of page, limit, q, kind, sort or ids to get one page instead, with total, page, limit and counts. Requires Asset:Read.
GET
/
v1
/
tenant
/
owners
List owners
curl --request GET \
--url https://{region}.api.plerion.com/v1/tenant/owners \
--header 'Authorization: Bearer <token>'import requests
url = "https://{region}.api.plerion.com/v1/tenant/owners"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{region}.api.plerion.com/v1/tenant/owners', 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://{region}.api.plerion.com/v1/tenant/owners",
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://{region}.api.plerion.com/v1/tenant/owners"
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://{region}.api.plerion.com/v1/tenant/owners")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/owners")
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{
"data": [
{
"id": "3f0c2a7e-1b8d-4c55-9a61-0d2f7e9b4c11",
"kind": "team",
"name": "Payments",
"email": "payments@example.com",
"origin": "inferred",
"foundBy": {
"ruleId": "<string>",
"value": "payments",
"key": "Team",
"from": "asset"
},
"guessed": true,
"tool": "<string>",
"aliases": [
{
"value": "payments-team",
"origin": true,
"source": "tag"
}
],
"assetCount": 2410,
"handSetAssets": 3,
"createdBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"total": 72,
"page": 1,
"limit": 25,
"counts": {
"team": 40,
"person": 32
}
}{
"message": "Forbidden"
}{
"message": "Internal server error"
}Authorizations
Bearer API Key. For example, "Bearer {Tenant API Key}"
Headers
Bearer API Key. For example, "Bearer {Tenant API Key}"
Query Parameters
The page, from 1
Required range:
x >= 1Owners per page
Required range:
1 <= x <= 200Matches the name, email or any alias, ignoring case, spaces, dots, dashes and underscores
Example:
"payments"
An asset has at most one team owner and one person owner.
Available options:
team, person Available options:
assets, name, aliases Defaults to asc for name and desc otherwise
Available options:
asc, desc Just these owners, as a comma-separated list of up to 200 IDs
Example:
"3f0c2a7e-1b8d-4c55-9a61-0d2f7e9b4c11,8a1d4b2c-77e0-4f3a-b9c5-2e6d1f0a9b33"
Was this page helpful?