Pages

Tuesday, June 17, 2014

Getting a list of Security Groups and Accounts for a user through the API

link : https://blogs.oracle.com/kyle/entry/getting_a_list_of_security

eg : 
- Request:   /cs/idcplg?IdcService=GET_USER_PERMISSIONS
- Respone :
{
    "LocalData": {
        "IdcService": "GET_USER_PERMISSIONS",
        "StatusCode": "-1",
        "StatusMessage": "JSON strings must begin with a '",
        "StatusMessageKey": "!csJsonStringMustBeginWithBrace",
        "changedMonikers": "",
        "changedSubjects": "",
        "dName": "manager01",
        "dUser": "manager01",
        "idcToken": "",
        "localizedForResponse": "1",
        "refreshMonikers": "",
        "refreshSubMonikers": "",
        "refreshSubjects": ""
    },
    "ResultSets": {
        "DocumentAccounts": {
            "currentRow": 0,
            "fields": [
                {
                    "name": "dDocAccount"
                },
                {
                    "name": "privilege"
                }
            ],
            "rows": [
                [
                    "#none",
                    "7"
                ],
                [
                    "managerdir",
                    "1"
                ],
                [
                    "manager01",
                    "15"
                ],
                [
                    "managerdirbtc",
                    "15"
                ]
            ]
        },
        "SecurityGroups": {
            "currentRow": 0,
            "fields": [
                {
                    "name": "dGroupName"
                },
                {
                    "name": "privilege"
                }
            ],
            "rows": [
                [
                    "contentEditor",
                    "15"
                ],
                [
                    "BTC",
                    "15"
                ],
                [
                    "contentRepo",
                    "1"
                ],
                [
                    "Public",
                    "1"
                ]
            ]
        },
        "UserAttribInfo": {
            "currentRow": 0,
            "fields": [
                {
                    "name": "dUserName"
                },
                {
                    "name": "AttributeInfo"
                }
            ],
            "rows": [
                [
                    "manager01",
                    "account,#none,7,account,managerdir,1,account,manager01,15,account,managerdirbtc,15,role,QuanTriBTCRole,15,role,authenticated,15"
                ]
            ]
        },
        "UserSecurityFlags": {
            "currentRow": 0,
            "fields": [
                {
                    "name": "flag"
                },
                {
                    "name": "value"
                }
            ],
            "rows": [
                [
                    "IsAdmin",
                    "0"
                ],
                [
                    "AdminAtLeastOneGroup",
                    "1"
                ],
                [
                    "IsSubAdmin",
                    "0"
                ],
                [
                    "IsSysManager",
                    "0"
                ],
                [
                    "IsContributor",
                    "1"
                ],
                [
                    "ActAsAnonymous",
                    "0"
                ]
            ]
        }
    }
}