curl --request GET \
--url https://{region}.api.plerion.com/v1/tenant/openapi \
--header 'Authorization: Bearer <token>'import requests
url = "https://{region}.api.plerion.com/v1/tenant/openapi"
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/openapi', 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/openapi",
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/openapi"
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/openapi")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/openapi")
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{
"openapi": "3.1.0",
"info": {},
"paths": {},
"x-plerion-role": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Tenant read-only"
},
"x-plerion-action-map": "<string>",
"x-plerion-reference": {
"source": "plerionhq/docs/api-reference/openapi.yaml@main",
"commit": "<string>",
"fetchedAt": "2023-11-07T05:31:56Z"
},
"x-plerion-generated-at": "2023-11-07T05:31:56Z"
}{
"message": "Forbidden"
}{
"message": "Internal server error"
}Get what this key can call
Use the discover API to learn which operations the calling key can call. The response is this API reference as an OpenAPI 3.1 document limited to the key’s role: operations the role cannot call are left out, and each remaining operation carries the permission that authorizes it under x-plerion-actions and, where the permission applies to integrations, the integrations in scope under x-plerion-integration-scope. The document names the role under x-plerion-role.
Any tenant API key can call this operation. A key with the Tenant admin role receives the whole reference. The answer is specific to the calling key, so cache it only for that key and only briefly.
Send Accept: application/yaml to receive YAML instead of JSON.
curl --request GET \
--url https://{region}.api.plerion.com/v1/tenant/openapi \
--header 'Authorization: Bearer <token>'import requests
url = "https://{region}.api.plerion.com/v1/tenant/openapi"
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/openapi', 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/openapi",
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/openapi"
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/openapi")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/openapi")
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{
"openapi": "3.1.0",
"info": {},
"paths": {},
"x-plerion-role": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Tenant read-only"
},
"x-plerion-action-map": "<string>",
"x-plerion-reference": {
"source": "plerionhq/docs/api-reference/openapi.yaml@main",
"commit": "<string>",
"fetchedAt": "2023-11-07T05:31:56Z"
},
"x-plerion-generated-at": "2023-11-07T05:31:56Z"
}{
"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}"
application/json (the default) or application/yaml
application/json, application/yaml Response
The API reference limited to the calling key
An OpenAPI 3.1 document. Only the fields Plerion adds are described here; the rest is standard OpenAPI.
"3.1.0"
The reference's metadata. Its description opens with the role the document was built for.
Only the operations the key's role can call. Each operation may carry x-plerion-actions, the permissions any one of which authorizes the call, and x-plerion-integration-scope, either * for every integration in the tenant or an object naming the integrationIds and integrationGroupIds the role covers.
Show child attributes
Show child attributes
The role the document was built for.
Show child attributes
Show child attributes
Hash of the action map the document was derived from, the same map the authorizer enforces.
Where the base reference came from.
Show child attributes
Show child attributes
Was this page helpful?