How can I use Context variables through REST API ?

I would like to obtain the users and groups having the manage rights on a document.

I call Document.GetUsersAndGroups (v6.0, seems it has been renamed since) that holds a “variable name” param that is supposed to set the so called context variable. How can I get this variable back to the client through the REST API ?

REST calls do hold a “context” variable, but it seems it is supposed to set some context variables not to retrieve them.

0 votes

1 answers

2286 views

ANSWER



I did not manage to solve the context part of the request nevertheless there is another way for my specific needs : context enrichers.

For instance, I need to have the children of a document with their ACLs :

/site/automation/Document.GetChildren
X-NXContext-Category: acls

returns with each entry the context parameters

"contextParameters": {
                "acls": [
                    {
                        "name": "local",
                        "ace": [
                            {
                                "username": "ubx:SGBm:Chantier catalogue",
                                "permission": "ReadWrite",
                                "granted": true
...

It also works with straght REST calls such as

/api/v1/id/1f9e3219-d901-4efb-9111-d5d479016fee
0 votes