Scope the read intentionally
On the tenant’s Profiles page identify the inventory you want to compare, then find GET /api/profiles/data in API Docs. Use a credential with Users & Profiles read access and only the intended membership. On an approved HTTPS endpoint, pass the exact numeric tenant ID in X-Tenant-ID for multi-tenant operation. Do not use Global as the target for tenant-owned profile data. The example assumes a Bash shell, curl and jq, and that an approved secret loader has supplied an in-memory RS_API_KEY shell variable. RS_BASE is the approved HTTPS origin without a trailing slash and RS_TENANT is the selected numeric ID.
Worked example: return array counts, not the data
The header is sent through standard input so the expanded key is not a command-line argument to curl. Keep shell tracing off. Use HTTPS certificate verification and do not follow redirects with a credential attached. Pipeline failure is significant even if the JSON parser has no input to display: check the exit status before recording any counts.
set +x
set -o pipefail
printf 'X-API-Key: %s\n' "$RS_API_KEY" |
curl --silent --show-error --fail --max-time 15 --header @- \
--header "X-Tenant-ID: $RS_TENANT" \
"$RS_BASE/api/profiles/data" |
jq -es 'if length == 1 and (.[0] | type) == "object" then .[0] |
{checks: (.checks | arrays | length),
replies: (.replies | arrays | length),
userCountGroups: (.userCounts | arrays | length),
downstreamRoutes: (.downstreamRoutes | arrays | length)}
else error("expected one JSON object") end'
For a lab tenant with one reply attribute and no downstream routing, the projected replies count can be one and downstreamRoutes zero. These are counts of returned rows, not counts of users or unique profiles. Check any inventory assertion by comparing it with the relevant profile in the UI. Empty arrays on a successful read can be legitimate.
If the response differs
With a 401, check credential delivery and deployment. With a 403, verify Users & Profiles and the explicit tenant ID. A JSON parse failure or no projection calls for inspecting only the response status and content type first, not dumping raw rows into debugging output. If curl times out, check the trusted proxy and app reachability. Keep debug off. Share the sanitized counts, status, scope alias and time; do not save the raw reply attributes, tenant-specific routing data or credentials in the incident record.