Update settings
curl --request PUT \
--url https://{region}.api.plerion.com/v1/tenant/ownership/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"addNotOwners": [
"shared",
"default"
],
"version": 4
}
'import requests
url = "https://{region}.api.plerion.com/v1/tenant/ownership/settings"
payload = {
"addNotOwners": ["shared", "default"],
"version": 4
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({addNotOwners: ['shared', 'default'], version: 4})
};
fetch('https://{region}.api.plerion.com/v1/tenant/ownership/settings', 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/ownership/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'addNotOwners' => [
'shared',
'default'
],
'version' => 4
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{region}.api.plerion.com/v1/tenant/ownership/settings"
payload := strings.NewReader("{\n \"addNotOwners\": [\n \"shared\",\n \"default\"\n ],\n \"version\": 4\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{region}.api.plerion.com/v1/tenant/ownership/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"addNotOwners\": [\n \"shared\",\n \"default\"\n ],\n \"version\": 4\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/ownership/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"addNotOwners\": [\n \"shared\",\n \"default\"\n ],\n \"version\": 4\n}"
response = http.request(request)
puts response.read_body{
"data": {
"findOwnerTags": true,
"notOwnerValues": [
"<string>"
],
"allowedValues": [
"<string>"
],
"deletedOwnerOf": {},
"version": 4,
"updatedBy": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"finding": {
"lookedAt": "2023-11-07T05:31:56Z",
"added": [
"asset:team"
],
"rules": [
"<string>"
]
},
"removedTags": [
{
"id": "<string>",
"key": "team",
"from": "asset"
}
]
}
}{
"errors": [
{
"code": "NameTaken",
"message": "Payments already goes by \"payments\". Use that one instead."
}
]
}{
"message": "Forbidden"
}{
"errors": [
{
"code": "NameTaken",
"message": "Payments already goes by \"payments\". Use that one instead."
}
]
}{
"message": "Internal server error"
}Update ownership settings
Changes the ownership settings. Every field is optional; send at least one. A field you leave out is left alone.
findOwnerTags: off, Plerion stops looking for owner tags and adding them. The owner tags already there stay and keep finding owners. On again, Plerion looks straight away.removeFoundTags:trueremoves every owner tag Plerion added, edited ones included. Send it withfindOwnerTags: falseto turn finding off and remove what it found.addNotOwners,removeNotOwners,addAllowed,removeAllowed: values to add to or take off a list, applied to the list as it is now. A value added as not an owner comes off the allowed values, and the other way round.notOwnerValues,allowedValues: a whole list, replacing the saved one. Not together with changes to the same list.version(or anIf-Matchheader): the version you read. If the settings changed since, the request is refused (409 SettingsChanged).
A change to either list, or to the owner tags, works out every asset’s owners again in the background. Requires OwnershipRule:Modify.
PUT
/
v1
/
tenant
/
ownership
/
settings
Update settings
curl --request PUT \
--url https://{region}.api.plerion.com/v1/tenant/ownership/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"addNotOwners": [
"shared",
"default"
],
"version": 4
}
'import requests
url = "https://{region}.api.plerion.com/v1/tenant/ownership/settings"
payload = {
"addNotOwners": ["shared", "default"],
"version": 4
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({addNotOwners: ['shared', 'default'], version: 4})
};
fetch('https://{region}.api.plerion.com/v1/tenant/ownership/settings', 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/ownership/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'addNotOwners' => [
'shared',
'default'
],
'version' => 4
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{region}.api.plerion.com/v1/tenant/ownership/settings"
payload := strings.NewReader("{\n \"addNotOwners\": [\n \"shared\",\n \"default\"\n ],\n \"version\": 4\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{region}.api.plerion.com/v1/tenant/ownership/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"addNotOwners\": [\n \"shared\",\n \"default\"\n ],\n \"version\": 4\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/ownership/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"addNotOwners\": [\n \"shared\",\n \"default\"\n ],\n \"version\": 4\n}"
response = http.request(request)
puts response.read_body{
"data": {
"findOwnerTags": true,
"notOwnerValues": [
"<string>"
],
"allowedValues": [
"<string>"
],
"deletedOwnerOf": {},
"version": 4,
"updatedBy": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"finding": {
"lookedAt": "2023-11-07T05:31:56Z",
"added": [
"asset:team"
],
"rules": [
"<string>"
]
},
"removedTags": [
{
"id": "<string>",
"key": "team",
"from": "asset"
}
]
}
}{
"errors": [
{
"code": "NameTaken",
"message": "Payments already goes by \"payments\". Use that one instead."
}
]
}{
"message": "Forbidden"
}{
"errors": [
{
"code": "NameTaken",
"message": "Payments already goes by \"payments\". Use that one instead."
}
]
}{
"message": "Internal server error"
}Authorizations
Headers
Body
application/json
Was this page helpful?