Hi everyone,
I’m trying to replicate the “Include Access Details” report via the Search API, but I can’t figure out how to get the data in a flat/expanded format (one row per access item) the same way the UI report generates it.
In the UI, when I download the Identities report with “Include Access Details” enabled, each identity appears multiple times — once per access item (entitlements, roles, access profiles). For example:
Jose | ENTITLEMENT | GR_FINOPS_OCI | OCI
Jose | ENTITLEMENT | OCI_Administrators | OCI
Jose | ROLE | Kit Basico CLT | —
I’m currently using this Search API payload, which works fine for identity attributes:
{
“indices”: [“identities”],
“includeNested”: true,
“query”: {
"query": "attributes.tipoContrato:\\"CLT\\" OR attributes.tipoContrato:\\"PJ\\""
},
“queryResultFilter”: {
"includes": \[
"attributes.displayName",
"attributes.email",
"attributes.login",
"employeeNumber",
"attributes.department",
"access.type",
"access.name",
"access.displayName",
"access.source.name",
"access.attribute",
"access.value",
"access.privileged"
\]
}
}
The problem is that the API always returns the access data as a nested array inside each identity object — not as separate rows. I understand the UI does the “flattening” on its end when generating the CSV.
My questions are:
1. Is there any API parameter or endpoint that returns the data already flat (one row per access item), similar to what the UI report generates?
2. If not, what is the recommended approach to replicate this programmatically? I’m building an automated data pipeline (using Apache Hop) and need to process this efficiently.
I’ve seen some older threads suggesting to process the nested results and flatten them in code, but I wanted to confirm if there’s a more direct API-level solution before going that route.
Thanks in advance!