Preview an account erasure plan
curl --request POST \
--url https://api.royalti.io/godmin/account-erasure/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "3d5c9971-451e-4711-8874-ff498d55e601"
}
'import requests
url = "https://api.royalti.io/godmin/account-erasure/preview"
payload = { "userId": "3d5c9971-451e-4711-8874-ff498d55e601" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: '3d5c9971-451e-4711-8874-ff498d55e601'})
};
fetch('https://api.royalti.io/godmin/account-erasure/preview', 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://api.royalti.io/godmin/account-erasure/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'userId' => '3d5c9971-451e-4711-8874-ff498d55e601'
]),
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://api.royalti.io/godmin/account-erasure/preview"
payload := strings.NewReader("{\n \"userId\": \"3d5c9971-451e-4711-8874-ff498d55e601\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.royalti.io/godmin/account-erasure/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"userId\": \"3d5c9971-451e-4711-8874-ff498d55e601\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/godmin/account-erasure/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userId\": \"3d5c9971-451e-4711-8874-ff498d55e601\"\n}"
response = http.request(request)
puts response.read_body{
"plan": {
"subjectUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subjectTenantUserIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"subjectEmailHash": "<string>",
"dispositions": [
{
"table": "<string>",
"disposition": "purge",
"matchedBy": [
"<string>"
],
"rowCount": 1,
"columns": [
"<string>"
],
"reason": "<string>"
}
],
"conflicts": [
{
"kind": "sole_owner",
"message": "<string>",
"table": "<string>"
}
],
"retained": [
{
"table": "<string>",
"rowCount": 1,
"statutoryBasis": "<string>"
}
],
"scrubbed": [
{
"table": "<string>",
"rowCount": 1,
"replacements": {}
}
],
"externalSurfaces": {
"redisKeyPatterns": [
"<string>"
],
"gcsPaths": [
"<string>"
],
"apiKeyIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"externalDeliveries": [
{
"kind": "ddex",
"table": "<string>",
"rowCount": 1,
"note": "<string>"
}
]
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Account Erasure
Preview an account erasure plan
Returns a canonical ErasurePlan for the subject userId. The call is
POST
/
godmin
/
account-erasure
/
preview
Preview an account erasure plan
curl --request POST \
--url https://api.royalti.io/godmin/account-erasure/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": "3d5c9971-451e-4711-8874-ff498d55e601"
}
'import requests
url = "https://api.royalti.io/godmin/account-erasure/preview"
payload = { "userId": "3d5c9971-451e-4711-8874-ff498d55e601" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: '3d5c9971-451e-4711-8874-ff498d55e601'})
};
fetch('https://api.royalti.io/godmin/account-erasure/preview', 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://api.royalti.io/godmin/account-erasure/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'userId' => '3d5c9971-451e-4711-8874-ff498d55e601'
]),
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://api.royalti.io/godmin/account-erasure/preview"
payload := strings.NewReader("{\n \"userId\": \"3d5c9971-451e-4711-8874-ff498d55e601\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.royalti.io/godmin/account-erasure/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"userId\": \"3d5c9971-451e-4711-8874-ff498d55e601\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.royalti.io/godmin/account-erasure/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"userId\": \"3d5c9971-451e-4711-8874-ff498d55e601\"\n}"
response = http.request(request)
puts response.read_body{
"plan": {
"subjectUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subjectTenantUserIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"subjectEmailHash": "<string>",
"dispositions": [
{
"table": "<string>",
"disposition": "purge",
"matchedBy": [
"<string>"
],
"rowCount": 1,
"columns": [
"<string>"
],
"reason": "<string>"
}
],
"conflicts": [
{
"kind": "sole_owner",
"message": "<string>",
"table": "<string>"
}
],
"retained": [
{
"table": "<string>",
"rowCount": 1,
"statutoryBasis": "<string>"
}
],
"scrubbed": [
{
"table": "<string>",
"rowCount": 1,
"replacements": {}
}
],
"externalSurfaces": {
"redisKeyPatterns": [
"<string>"
],
"gcsPaths": [
"<string>"
],
"apiKeyIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"externalDeliveries": [
{
"kind": "ddex",
"table": "<string>",
"rowCount": 1,
"note": "<string>"
}
]
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Description
read-only and performs no writes, but it enumerates every table, Redis key pattern, GCS object, API key, and external delivery that an erasure would affect. Requiressuper_admin role or higher.
Authorization:
- Required role: Super Admin (system)
Code Examples
const response = await fetch('https://api.royalti.io/godmin/account-erasure/preview', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"ref": "#/components/schemas/AccountErasurePreviewRequest"
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://api.royalti.io/godmin/account-erasure/preview',
json={"ref":"#/components/schemas/AccountErasurePreviewRequest"}
)
data = response.json()
print(data)
curl -X POST https://api.royalti.io/godmin/account-erasure/preview \
-H "Content-Type: application/json" \
-d '{"ref":"#/components/schemas/AccountErasurePreviewRequest"}'