I think I finally understood the question. Sorry about that.
This is an admin level privilege .
You can use the admin SG API interface GET /_raw/{{docid}}
to query for all users who have access to a document. This will return access
that lists users that have access to the document
Example:{{adminurl}}/todo/_raw/user1.0.2F469DBB-1753-4AFA-9FC6-2154DC0E723D
The JSON response will include an access
element similar to this which lists users who have access to the document
"access": {
"role:moderator": {
"task-list.user1.0.2F469DBB-1753-4AFA-9FC6-2154DC0E723D": 38
},
"user1": {
"task-list.user1.0.2F469DBB-1753-4AFA-9FC6-2154DC0E723D": 38,
"task-list.user1.0.2F469DBB-1753-4AFA-9FC6-2154DC0E723D.users": 38
}
}