Update an owner's names
curl --request PATCH \
--url https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}/aliases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"add": [
"payments-team",
"payments@example.com"
]
}
'import requests
url = "https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}/aliases"
payload = { "add": ["payments-team", "payments@example.com"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({add: ['payments-team', 'payments@example.com']})
};
fetch('https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}/aliases', 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/{ownerId}/aliases",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'add' => [
'payments-team',
'payments@example.com'
]
]),
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/owners/{ownerId}/aliases"
payload := strings.NewReader("{\n \"add\": [\n \"payments-team\",\n \"payments@example.com\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}/aliases")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"add\": [\n \"payments-team\",\n \"payments@example.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}/aliases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"add\": [\n \"payments-team\",\n \"payments@example.com\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"moved": [
{
"value": "<string>",
"fromOwnerId": "<string>",
"fromOwnerName": "<string>"
}
],
"removed": 123
}
}{
"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"
}Add or remove the names an owner goes by
Adds names this owner goes by, such as an email, a username or another spelling, or takes them off. Names are compared ignoring case, spaces, dots, dashes and underscores. Up to 100 of each per request.
A name another owner had moves here, and the response says from whom. A removed name becomes its own owner again at the next pass. The name an owner was first found by cannot be removed (OriginValue); delete the owner instead. The tenant’s assets are worked out again in the background. Requires Owner:Modify.
PATCH
/
v1
/
tenant
/
owners
/
{ownerId}
/
aliases
Update an owner's names
curl --request PATCH \
--url https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}/aliases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"add": [
"payments-team",
"payments@example.com"
]
}
'import requests
url = "https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}/aliases"
payload = { "add": ["payments-team", "payments@example.com"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({add: ['payments-team', 'payments@example.com']})
};
fetch('https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}/aliases', 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/{ownerId}/aliases",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'add' => [
'payments-team',
'payments@example.com'
]
]),
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/owners/{ownerId}/aliases"
payload := strings.NewReader("{\n \"add\": [\n \"payments-team\",\n \"payments@example.com\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}/aliases")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"add\": [\n \"payments-team\",\n \"payments@example.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}/aliases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"add\": [\n \"payments-team\",\n \"payments@example.com\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"moved": [
{
"value": "<string>",
"fromOwnerId": "<string>",
"fromOwnerName": "<string>"
}
],
"removed": 123
}
}{
"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
Path Parameters
Owner ID. Use List owners to get the IDs.
Example:
"3f0c2a7e-1b8d-4c55-9a61-0d2f7e9b4c11"
Was this page helpful?