Get retag commands
curl --request GET \
--url https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}/retag-plan \
--header 'Authorization: Bearer <token>'import requests
url = "https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}/retag-plan"
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/{ownerId}/retag-plan', 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}/retag-plan",
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/{ownerId}/retag-plan"
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/{ownerId}/retag-plan")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}/retag-plan")
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": {
"ownerId": "<string>",
"tags": [
{
"key": "Owner",
"value": "jane.doe@example.com",
"assets": 14
}
],
"accounts": [
{
"integrationId": "<string>",
"name": "<string>",
"provider": "aws",
"accountId": "<string>",
"assets": 123,
"command": "<string>"
}
],
"partial": true
}
}{
"message": "Forbidden"
}{
"errors": [
{
"code": "NameTaken",
"message": "Payments already goes by \"payments\". Use that one instead."
}
]
}{
"message": "Internal server error"
}Get the commands to retag an owner's assets
How to change this owner’s tags at the source so its assets name someone else for good, typically after someone leaves and is merged into another owner. Returns the tag keys and values on its assets now and, per cloud account, a command that rewrites them. {{value}} in a command stands for the new owner’s tag value. Plerion never changes your tags; you run these. Requires Asset:Read.
GET
/
v1
/
tenant
/
owners
/
{ownerId}
/
retag-plan
Get retag commands
curl --request GET \
--url https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}/retag-plan \
--header 'Authorization: Bearer <token>'import requests
url = "https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}/retag-plan"
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/{ownerId}/retag-plan', 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}/retag-plan",
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/{ownerId}/retag-plan"
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/{ownerId}/retag-plan")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/owners/{ownerId}/retag-plan")
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": {
"ownerId": "<string>",
"tags": [
{
"key": "Owner",
"value": "jane.doe@example.com",
"assets": 14
}
],
"accounts": [
{
"integrationId": "<string>",
"name": "<string>",
"provider": "aws",
"accountId": "<string>",
"assets": 123,
"command": "<string>"
}
],
"partial": true
}
}{
"message": "Forbidden"
}{
"errors": [
{
"code": "NameTaken",
"message": "Payments already goes by \"payments\". Use that one instead."
}
]
}{
"message": "Internal server error"
}Authorizations
Path Parameters
Owner ID. Use List owners to get the IDs.
Example:
"3f0c2a7e-1b8d-4c55-9a61-0d2f7e9b4c11"
Was this page helpful?