Listing Obfuscations
Query and retrieve obfuscations with pagination and sorting.
Endpoint
Retrieves all obfuscations with optional filtering, sorting, and pagination.
Authentication
Requires any valid API Key. All keys have read access.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
sortBy |
string | "name asc" |
Sort specification (e.g., "name asc", "id desc") |
skip |
integer | 0 |
Number of records to skip (for pagination) |
take |
integer | All | Number of records to return |
Response
Returns a paginated list of obfuscations:
Response Format
{
"items": [
{
"id": "obf-uuid-1",
"name": "Mask PII",
"description": "Obfuscate all PII data types",
"datatypes": [
{
"type": "US_SSN",
"maskFormatId": "FULLY_OBFUSCATED",
"storeOriginalValue": true,
"whitelist": []
}
],
"filters": [],
"createdAt": 1704067200,
"updatedAt": 1704067200
}
],
"count": 5
}
Examples
List All Obfuscations
Retrieve all obfuscations sorted by name.
import requests
BASE_URL = "https://your-shield-host:8080"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}
response = requests.get(
f"{BASE_URL}/api/obfuscations",
headers=HEADERS,
params={"sortBy": "name asc"}
)
for obf in response.json()["items"]:
print(f"{obf['id']}: {obf['name']} ({len(obf['datatypes'])} data types)")
const axios = require('axios');
const BASE_URL = 'https://your-shield-host:8080';
const HEADERS = { 'Authorization': 'Bearer YOUR_API_KEY' };
const response = await axios.get(`${BASE_URL}/api/obfuscations`, {
headers: HEADERS,
params: { sortBy: 'name asc' }
});
response.data.items.forEach(obf => {
console.log(`${obf.id}: ${obf.name} (${obf.datatypes.length} data types)`);
});
Paginated Results
Retrieve obfuscations with pagination (25 per page).
import requests
BASE_URL = "https://your-shield-host:8080"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}
page = 0
page_size = 25
response = requests.get(
f"{BASE_URL}/api/obfuscations",
headers=HEADERS,
params={"skip": page * page_size, "take": page_size}
)
obfuscations = response.json()
print(f"Page {page + 1}: {len(obfuscations['items'])} of {obfuscations['count']} total")
const axios = require('axios');
const BASE_URL = 'https://your-shield-host:8080';
const HEADERS = { 'Authorization': 'Bearer YOUR_API_KEY' };
const page = 0;
const pageSize = 25;
const response = await axios.get(`${BASE_URL}/api/obfuscations`, {
headers: HEADERS,
params: { skip: page * pageSize, take: pageSize }
});
console.log(`Page ${page + 1}: ${response.data.items.length} of ${response.data.count} total`);
Related Topics
- Create Obfuscation - Create a new obfuscation
- Get Obfuscation - Retrieve a specific obfuscation by ID
- Update Obfuscation - Modify an existing obfuscation
- Delete Obfuscation - Remove an obfuscation