cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Scripted assignment of permission

omair
Contributor

Hi,

Is it possible to script the assignment of SnapLogic permissions to a project space or a project through the REST API or a pipeline?

1 REPLY 1

del
Contributor III

@omair, You can use the SnapLogic Update snap (with โ€œPROJECTโ€ as the Asset Type parameter). I just tested something like this in UAT early this week. I was attempting to restrict permissions on the globally shared project (which I canโ€™t do via UI). It was a test with unintended results, so donโ€™t use the same code; but hereโ€™s some example code for the input.

[
    {
        "asset_type": "Dir",
        "acl": [
            {
                "perms": [
                    "R",
                    "X",
                    "W"
                ],
                "subject_type": "GROUP",
                "inherit": true,
                "subject": "admins"
            },
            {
                "perms": [
                    "R"
                ],
                "subject_type": "GROUP",
                "inherit": true,
                "subject": "members"
            }
        ],
        "metadata": {}
    }
]

You can use the SnapLogic Read snap to see what the initial configuration looks like.