curl
curl --request DELETE \
--url "https://au.api.plerion.com/v1/organization/users/7a3f9d8e-1b2c-4d5e-8f90-123456789abc/preferences/home-dashboard?tenantId=65a72929-0e61-4c9c-b7a8-8abe6886fd6c" \
--header "Authorization: Bearer $PLERION_ORGANIZATION_API_KEY"import requests
url = "https://{region}.api.plerion.com/v1/organization/users/{userId}/preferences/home-dashboard"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{region}.api.plerion.com/v1/organization/users/{userId}/preferences/home-dashboard', 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/organization/users/{userId}/preferences/home-dashboard",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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/organization/users/{userId}/preferences/home-dashboard"
req, _ := http.NewRequest("DELETE", 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.delete("https://{region}.api.plerion.com/v1/organization/users/{userId}/preferences/home-dashboard")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/organization/users/{userId}/preferences/home-dashboard")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"errors": [
{
"code": "ReportNotFound",
"message": "Custom report 3f1c7d2e-5a6b-4c8d-9e0f-1a2b3c4d5e6f was not found in tenant 65a72929-0e61-4c9c-b7a8-8abe6886fd6c"
}
]
}{
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"errors": [
{
"code": "RoleNotFound",
"message": "role not found"
}
]
}Clear a user's home dashboard
Removes the user’s own home dashboard in the tenant, so the next level of the chain applies. Answers 404 PreferenceNotFound when there was nothing to clear.
Requires an organization API key with read and write access.
DELETE
/
v1
/
organization
/
users
/
{userId}
/
preferences
/
home-dashboard
curl
curl --request DELETE \
--url "https://au.api.plerion.com/v1/organization/users/7a3f9d8e-1b2c-4d5e-8f90-123456789abc/preferences/home-dashboard?tenantId=65a72929-0e61-4c9c-b7a8-8abe6886fd6c" \
--header "Authorization: Bearer $PLERION_ORGANIZATION_API_KEY"import requests
url = "https://{region}.api.plerion.com/v1/organization/users/{userId}/preferences/home-dashboard"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{region}.api.plerion.com/v1/organization/users/{userId}/preferences/home-dashboard', 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/organization/users/{userId}/preferences/home-dashboard",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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/organization/users/{userId}/preferences/home-dashboard"
req, _ := http.NewRequest("DELETE", 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.delete("https://{region}.api.plerion.com/v1/organization/users/{userId}/preferences/home-dashboard")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/organization/users/{userId}/preferences/home-dashboard")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"errors": [
{
"code": "ReportNotFound",
"message": "Custom report 3f1c7d2e-5a6b-4c8d-9e0f-1a2b3c4d5e6f was not found in tenant 65a72929-0e61-4c9c-b7a8-8abe6886fd6c"
}
]
}{
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"errors": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"errors": [
{
"code": "RoleNotFound",
"message": "role not found"
}
]
}Authorizations
Plerion organization API key (plerion_oak_…), created by an organization admin in the Plerion app.
Path Parameters
The user id.
Query Parameters
The tenant the preference applies in. A PUT checks it belongs to the key's organization and answers 400 TenantNotFound otherwise; a GET or DELETE for a tenant outside the organization finds no row and answers 404 PreferenceNotFound.
Response
Cleared.
Was this page helpful?