Cognos Analytics

 View Only
  • 1.  Can the REST API get the permissions of a folder?

    Posted Fri April 28, 2023 09:48 AM

    I'm trying to use the /content/{id}?fields=?  syntax in the REST API to get the permissions set on a folder. I'm getting the capabilities, and the permissions set on those capabilities, but not the actual permissions.

    Is this possible to get from the /content REST API? 

    The goal is to be able to get a big picture view of all the permissions that are set on all content. Will I have to go to the Java SDK?



    ------------------------------
    Charles Blake
    ------------------------------


  • 2.  RE: Can the REST API get the permissions of a folder?

    IBM Champion
    Posted Sun April 30, 2023 02:44 AM

    I use this:

    <SERVER>/bi/v1/objects/i262CD3337BDC4BA3974D863F7C168626?schemaInfo=true&fields=id,defaultName,policies.defaultName,policies.id,policies.ancestors,permissions

    It returns the following output:


    {
        "data": [
            {
                "permissions": [
                    "execute",
                    "read",
                    "setPolicy",
                    "traverse",
                    "write"
                ],
                "modificationTime": "2023-04-23T10:06:25.652Z",
                "policies": [
                    {
                        "permissions": [
                            {
                                "access": "grant",
                                "name": "execute"
                            },
                            {
                                "access": "grant",
                                "name": "read"
                            },
                            {
                                "access": "grant",
                                "name": "setPolicy"
                            },
                            {
                                "access": "grant",
                                "name": "traverse"
                            },
                            {
                                "access": "grant",
                                "name": "write"
                            }
                        ],
                        "securityObject": {
                            "_meta": {
                                "schemaInfo": {
                                    "storeID": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "ancestors": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "defaultName": {
                                        "acquirable": false,
                                        "modifiable": true,
                                        "searchable": true,
                                        "acquired": false
                                    }
                                },
                                "links": {
                                    "members": {
                                        "mimeType": "application/json",
                                        "url": "/bi/v1/roles/xOlJlcG9ydCBBZG1pbmlzdHJhdG9ycw__/members"
                                    },
                                    "self": {
                                        "mimeType": "application/vnd.ibm.bi.role+json",
                                        "url": "/bi/v1/objects/xOlJlcG9ydCBBZG1pbmlzdHJhdG9ycw__"
                                    }
                                }
                            },
                            "id": "xOlJlcG9ydCBBZG1pbmlzdHJhdG9ycw__",
                            "ancestors": [
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.directory+json",
                                                "url": "/bi/v1/objects/iD4B3469FC9F3410AB75164BD7B817EC2"
                                            }
                                        }
                                    },
                                    "id": "iD4B3469FC9F3410AB75164BD7B817EC2",
                                    "type": "directory",
                                    "defaultName": "Directory"
                                },
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.namespace+json",
                                                "url": "/bi/v1/objects/xOg__"
                                            },
                                            "items": {
                                                "mimeType": "application/json",
                                                "url": "/bi/v1/namespaces/xOg__/items"
                                            }
                                        }
                                    },
                                    "id": "xOg__",
                                    "type": "namespace",
                                    "defaultName": "Cognos"
                                }
                            ],
                            "type": "role",
                            "defaultName": "Report Administrators"
                        }
                    },
                    {
                        "permissions": [
                            {
                                "access": "grant",
                                "name": "execute"
                            },
                            {
                                "access": "grant",
                                "name": "read"
                            },
                            {
                                "access": "grant",
                                "name": "setPolicy"
                            },
                            {
                                "access": "grant",
                                "name": "traverse"
                            },
                            {
                                "access": "grant",
                                "name": "write"
                            }
                        ],
                        "securityObject": {
                            "_meta": {
                                "schemaInfo": {
                                    "storeID": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "ancestors": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "defaultName": {
                                        "acquirable": false,
                                        "modifiable": true,
                                        "searchable": true,
                                        "acquired": false
                                    }
                                },
                                "links": {
                                    "members": {
                                        "mimeType": "application/json",
                                        "url": "/bi/v1/roles/xOlBvd2VyUGxheSBBZG1pbmlzdHJhdG9ycw__/members"
                                    },
                                    "self": {
                                        "mimeType": "application/vnd.ibm.bi.role+json",
                                        "url": "/bi/v1/objects/xOlBvd2VyUGxheSBBZG1pbmlzdHJhdG9ycw__"
                                    }
                                }
                            },
                            "id": "xOlBvd2VyUGxheSBBZG1pbmlzdHJhdG9ycw__",
                            "ancestors": [
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.directory+json",
                                                "url": "/bi/v1/objects/iD4B3469FC9F3410AB75164BD7B817EC2"
                                            }
                                        }
                                    },
                                    "id": "iD4B3469FC9F3410AB75164BD7B817EC2",
                                    "type": "directory",
                                    "defaultName": "Directory"
                                },
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.namespace+json",
                                                "url": "/bi/v1/objects/xOg__"
                                            },
                                            "items": {
                                                "mimeType": "application/json",
                                                "url": "/bi/v1/namespaces/xOg__/items"
                                            }
                                        }
                                    },
                                    "id": "xOg__",
                                    "type": "namespace",
                                    "defaultName": "Cognos"
                                }
                            ],
                            "type": "role",
                            "defaultName": "PowerPlay Administrators"
                        }
                    },
                    {
                        "permissions": [
                            {
                                "access": "grant",
                                "name": "execute"
                            },
                            {
                                "access": "grant",
                                "name": "read"
                            },
                            {
                                "access": "grant",
                                "name": "traverse"
                            },
                            {
                                "access": "grant",
                                "name": "write"
                            }
                        ],
                        "securityObject": {
                            "_meta": {
                                "schemaInfo": {
                                    "storeID": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "ancestors": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "defaultName": {
                                        "acquirable": false,
                                        "modifiable": true,
                                        "searchable": true,
                                        "acquired": false
                                    }
                                },
                                "links": {
                                    "members": {
                                        "mimeType": "application/json",
                                        "url": "/bi/v1/roles/xOk1vZGVsZXJz/members"
                                    },
                                    "self": {
                                        "mimeType": "application/vnd.ibm.bi.role+json",
                                        "url": "/bi/v1/objects/xOk1vZGVsZXJz"
                                    }
                                }
                            },
                            "id": "xOk1vZGVsZXJz",
                            "ancestors": [
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.directory+json",
                                                "url": "/bi/v1/objects/iD4B3469FC9F3410AB75164BD7B817EC2"
                                            }
                                        }
                                    },
                                    "id": "iD4B3469FC9F3410AB75164BD7B817EC2",
                                    "type": "directory",
                                    "defaultName": "Directory"
                                },
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.namespace+json",
                                                "url": "/bi/v1/objects/xOg__"
                                            },
                                            "items": {
                                                "mimeType": "application/json",
                                                "url": "/bi/v1/namespaces/xOg__/items"
                                            }
                                        }
                                    },
                                    "id": "xOg__",
                                    "type": "namespace",
                                    "defaultName": "Cognos"
                                }
                            ],
                            "type": "role",
                            "defaultName": "Modelers"
                        }
                    },
                    {
                        "permissions": [
                            {
                                "access": "grant",
                                "name": "execute"
                            },
                            {
                                "access": "grant",
                                "name": "read"
                            },
                            {
                                "access": "grant",
                                "name": "traverse"
                            },
                            {
                                "access": "grant",
                                "name": "write"
                            }
                        ],
                        "securityObject": {
                            "_meta": {
                                "schemaInfo": {
                                    "storeID": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "ancestors": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "defaultName": {
                                        "acquirable": false,
                                        "modifiable": true,
                                        "searchable": true,
                                        "acquired": false
                                    }
                                },
                                "links": {
                                    "members": {
                                        "mimeType": "application/json",
                                        "url": "/bi/v1/roles/xOkF1dGhvcnM_/members"
                                    },
                                    "self": {
                                        "mimeType": "application/vnd.ibm.bi.role+json",
                                        "url": "/bi/v1/objects/xOkF1dGhvcnM_"
                                    }
                                }
                            },
                            "id": "xOkF1dGhvcnM_",
                            "ancestors": [
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.directory+json",
                                                "url": "/bi/v1/objects/iD4B3469FC9F3410AB75164BD7B817EC2"
                                            }
                                        }
                                    },
                                    "id": "iD4B3469FC9F3410AB75164BD7B817EC2",
                                    "type": "directory",
                                    "defaultName": "Directory"
                                },
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.namespace+json",
                                                "url": "/bi/v1/objects/xOg__"
                                            },
                                            "items": {
                                                "mimeType": "application/json",
                                                "url": "/bi/v1/namespaces/xOg__/items"
                                            }
                                        }
                                    },
                                    "id": "xOg__",
                                    "type": "namespace",
                                    "defaultName": "Cognos"
                                }
                            ],
                            "type": "role",
                            "defaultName": "Authors"
                        }
                    },
                    {
                        "permissions": [
                            {
                                "access": "grant",
                                "name": "execute"
                            },
                            {
                                "access": "grant",
                                "name": "read"
                            },
                            {
                                "access": "grant",
                                "name": "traverse"
                            }
                        ],
                        "securityObject": {
                            "_meta": {
                                "schemaInfo": {
                                    "storeID": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "ancestors": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "defaultName": {
                                        "acquirable": false,
                                        "modifiable": true,
                                        "searchable": true,
                                        "acquired": false
                                    }
                                },
                                "links": {
                                    "members": {
                                        "mimeType": "application/json",
                                        "url": "/bi/v1/roles/xOlBvd2VyUGxheSBVc2Vycw__/members"
                                    },
                                    "self": {
                                        "mimeType": "application/vnd.ibm.bi.role+json",
                                        "url": "/bi/v1/objects/xOlBvd2VyUGxheSBVc2Vycw__"
                                    }
                                }
                            },
                            "id": "xOlBvd2VyUGxheSBVc2Vycw__",
                            "ancestors": [
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.directory+json",
                                                "url": "/bi/v1/objects/iD4B3469FC9F3410AB75164BD7B817EC2"
                                            }
                                        }
                                    },
                                    "id": "iD4B3469FC9F3410AB75164BD7B817EC2",
                                    "type": "directory",
                                    "defaultName": "Directory"
                                },
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.namespace+json",
                                                "url": "/bi/v1/objects/xOg__"
                                            },
                                            "items": {
                                                "mimeType": "application/json",
                                                "url": "/bi/v1/namespaces/xOg__/items"
                                            }
                                        }
                                    },
                                    "id": "xOg__",
                                    "type": "namespace",
                                    "defaultName": "Cognos"
                                }
                            ],
                            "type": "role",
                            "defaultName": "PowerPlay Users"
                        }
                    },
                    {
                        "permissions": [
                            {
                                "access": "grant",
                                "name": "execute"
                            },
                            {
                                "access": "grant",
                                "name": "read"
                            },
                            {
                                "access": "grant",
                                "name": "traverse"
                            }
                        ],
                        "securityObject": {
                            "_meta": {
                                "schemaInfo": {
                                    "storeID": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "ancestors": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "defaultName": {
                                        "acquirable": false,
                                        "modifiable": true,
                                        "searchable": true,
                                        "acquired": false
                                    }
                                },
                                "links": {
                                    "members": {
                                        "mimeType": "application/json",
                                        "url": "/bi/v1/roles/xOkFuYWx5c2lzIFVzZXJz/members"
                                    },
                                    "self": {
                                        "mimeType": "application/vnd.ibm.bi.role+json",
                                        "url": "/bi/v1/objects/xOkFuYWx5c2lzIFVzZXJz"
                                    }
                                }
                            },
                            "id": "xOkFuYWx5c2lzIFVzZXJz",
                            "ancestors": [
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.directory+json",
                                                "url": "/bi/v1/objects/iD4B3469FC9F3410AB75164BD7B817EC2"
                                            }
                                        }
                                    },
                                    "id": "iD4B3469FC9F3410AB75164BD7B817EC2",
                                    "type": "directory",
                                    "defaultName": "Directory"
                                },
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.namespace+json",
                                                "url": "/bi/v1/objects/xOg__"
                                            },
                                            "items": {
                                                "mimeType": "application/json",
                                                "url": "/bi/v1/namespaces/xOg__/items"
                                            }
                                        }
                                    },
                                    "id": "xOg__",
                                    "type": "namespace",
                                    "defaultName": "Cognos"
                                }
                            ],
                            "type": "role",
                            "defaultName": "Analysis Users"
                        }
                    },
                    {
                        "permissions": [
                            {
                                "access": "grant",
                                "name": "execute"
                            },
                            {
                                "access": "grant",
                                "name": "read"
                            },
                            {
                                "access": "grant",
                                "name": "traverse"
                            }
                        ],
                        "securityObject": {
                            "_meta": {
                                "schemaInfo": {
                                    "storeID": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "ancestors": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "defaultName": {
                                        "acquirable": false,
                                        "modifiable": true,
                                        "searchable": true,
                                        "acquired": false
                                    }
                                },
                                "links": {
                                    "members": {
                                        "mimeType": "application/json",
                                        "url": "/bi/v1/roles/xOkNvbnN1bWVycw__/members"
                                    },
                                    "self": {
                                        "mimeType": "application/vnd.ibm.bi.role+json",
                                        "url": "/bi/v1/objects/xOkNvbnN1bWVycw__"
                                    }
                                }
                            },
                            "id": "xOkNvbnN1bWVycw__",
                            "ancestors": [
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.directory+json",
                                                "url": "/bi/v1/objects/iD4B3469FC9F3410AB75164BD7B817EC2"
                                            }
                                        }
                                    },
                                    "id": "iD4B3469FC9F3410AB75164BD7B817EC2",
                                    "type": "directory",
                                    "defaultName": "Directory"
                                },
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.namespace+json",
                                                "url": "/bi/v1/objects/xOg__"
                                            },
                                            "items": {
                                                "mimeType": "application/json",
                                                "url": "/bi/v1/namespaces/xOg__/items"
                                            }
                                        }
                                    },
                                    "id": "xOg__",
                                    "type": "namespace",
                                    "defaultName": "Cognos"
                                }
                            ],
                            "type": "role",
                            "defaultName": "Consumers"
                        }
                    },
                    {
                        "permissions": [
                            {
                                "access": "grant",
                                "name": "execute"
                            },
                            {
                                "access": "grant",
                                "name": "read"
                            },
                            {
                                "access": "grant",
                                "name": "traverse"
                            }
                        ],
                        "securityObject": {
                            "_meta": {
                                "schemaInfo": {
                                    "storeID": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "ancestors": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "defaultName": {
                                        "acquirable": false,
                                        "modifiable": true,
                                        "searchable": true,
                                        "acquired": false
                                    }
                                },
                                "links": {
                                    "members": {
                                        "mimeType": "application/json",
                                        "url": "/bi/v1/roles/xOlF1ZXJ5IFVzZXJz/members"
                                    },
                                    "self": {
                                        "mimeType": "application/vnd.ibm.bi.role+json",
                                        "url": "/bi/v1/objects/xOlF1ZXJ5IFVzZXJz"
                                    }
                                }
                            },
                            "id": "xOlF1ZXJ5IFVzZXJz",
                            "ancestors": [
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.directory+json",
                                                "url": "/bi/v1/objects/iD4B3469FC9F3410AB75164BD7B817EC2"
                                            }
                                        }
                                    },
                                    "id": "iD4B3469FC9F3410AB75164BD7B817EC2",
                                    "type": "directory",
                                    "defaultName": "Directory"
                                },
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.namespace+json",
                                                "url": "/bi/v1/objects/xOg__"
                                            },
                                            "items": {
                                                "mimeType": "application/json",
                                                "url": "/bi/v1/namespaces/xOg__/items"
                                            }
                                        }
                                    },
                                    "id": "xOg__",
                                    "type": "namespace",
                                    "defaultName": "Cognos"
                                }
                            ],
                            "type": "role",
                            "defaultName": "Query Users"
                        }
                    },
                    {
                        "permissions": [
                            {
                                "access": "grant",
                                "name": "read"
                            },
                            {
                                "access": "grant",
                                "name": "traverse"
                            }
                        ],
                        "securityObject": {
                            "_meta": {
                                "schemaInfo": {
                                    "storeID": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "ancestors": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "defaultName": {
                                        "acquirable": false,
                                        "modifiable": true,
                                        "searchable": true,
                                        "acquired": false
                                    }
                                },
                                "links": {
                                    "members": {
                                        "mimeType": "application/json",
                                        "url": "/bi/v1/roles/xOlJlYWRlcnM_/members"
                                    },
                                    "self": {
                                        "mimeType": "application/vnd.ibm.bi.role+json",
                                        "url": "/bi/v1/objects/xOlJlYWRlcnM_"
                                    }
                                }
                            },
                            "id": "xOlJlYWRlcnM_",
                            "ancestors": [
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.directory+json",
                                                "url": "/bi/v1/objects/iD4B3469FC9F3410AB75164BD7B817EC2"
                                            }
                                        }
                                    },
                                    "id": "iD4B3469FC9F3410AB75164BD7B817EC2",
                                    "type": "directory",
                                    "defaultName": "Directory"
                                },
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.namespace+json",
                                                "url": "/bi/v1/objects/xOg__"
                                            },
                                            "items": {
                                                "mimeType": "application/json",
                                                "url": "/bi/v1/namespaces/xOg__/items"
                                            }
                                        }
                                    },
                                    "id": "xOg__",
                                    "type": "namespace",
                                    "defaultName": "Cognos"
                                }
                            ],
                            "type": "role",
                            "defaultName": "Readers"
                        }
                    },
                    {
                        "permissions": [
                            {
                                "access": "grant",
                                "name": "read"
                            },
                            {
                                "access": "grant",
                                "name": "traverse"
                            }
                        ],
                        "securityObject": {
                            "_meta": {
                                "schemaInfo": {
                                    "storeID": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "ancestors": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "defaultName": {
                                        "acquirable": false,
                                        "modifiable": true,
                                        "searchable": true,
                                        "acquired": false
                                    }
                                },
                                "links": {
                                    "members": {
                                        "mimeType": "application/json",
                                        "url": "/bi/v1/roles/xOkFuYWx5dGljcyBmb3IgTW9iaWxlIFVzZXJz/members"
                                    },
                                    "self": {
                                        "mimeType": "application/vnd.ibm.bi.role+json",
                                        "url": "/bi/v1/objects/xOkFuYWx5dGljcyBmb3IgTW9iaWxlIFVzZXJz"
                                    }
                                }
                            },
                            "id": "xOkFuYWx5dGljcyBmb3IgTW9iaWxlIFVzZXJz",
                            "ancestors": [
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.directory+json",
                                                "url": "/bi/v1/objects/iD4B3469FC9F3410AB75164BD7B817EC2"
                                            }
                                        }
                                    },
                                    "id": "iD4B3469FC9F3410AB75164BD7B817EC2",
                                    "type": "directory",
                                    "defaultName": "Directory"
                                },
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.namespace+json",
                                                "url": "/bi/v1/objects/xOg__"
                                            },
                                            "items": {
                                                "mimeType": "application/json",
                                                "url": "/bi/v1/namespaces/xOg__/items"
                                            }
                                        }
                                    },
                                    "id": "xOg__",
                                    "type": "namespace",
                                    "defaultName": "Cognos"
                                }
                            ],
                            "type": "role",
                            "defaultName": "Analytics for Mobile Users"
                        }
                    },
                    {
                        "permissions": [
                            {
                                "access": "grant",
                                "name": "read"
                            },
                            {
                                "access": "grant",
                                "name": "traverse"
                            }
                        ],
                        "securityObject": {
                            "_meta": {
                                "schemaInfo": {
                                    "storeID": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "ancestors": {
                                        "acquirable": false,
                                        "modifiable": false,
                                        "searchable": false,
                                        "acquired": false
                                    },
                                    "defaultName": {
                                        "acquirable": false,
                                        "modifiable": true,
                                        "searchable": true,
                                        "acquired": false
                                    }
                                },
                                "links": {
                                    "members": {
                                        "mimeType": "application/json",
                                        "url": "/bi/v1/roles/xOkFuYWx5dGljcyBWaWV3ZXI_/members"
                                    },
                                    "self": {
                                        "mimeType": "application/vnd.ibm.bi.role+json",
                                        "url": "/bi/v1/objects/xOkFuYWx5dGljcyBWaWV3ZXI_"
                                    }
                                }
                            },
                            "id": "xOkFuYWx5dGljcyBWaWV3ZXI_",
                            "ancestors": [
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.directory+json",
                                                "url": "/bi/v1/objects/iD4B3469FC9F3410AB75164BD7B817EC2"
                                            }
                                        }
                                    },
                                    "id": "iD4B3469FC9F3410AB75164BD7B817EC2",
                                    "type": "directory",
                                    "defaultName": "Directory"
                                },
                                {
                                    "_meta": {
                                        "links": {
                                            "self": {
                                                "mimeType": "application/vnd.ibm.bi.namespace+json",
                                                "url": "/bi/v1/objects/xOg__"
                                            },
                                            "items": {
                                                "mimeType": "application/json",
                                                "url": "/bi/v1/namespaces/xOg__/items"
                                            }
                                        }
                                    },
                                    "id": "xOg__",
                                    "type": "namespace",
                                    "defaultName": "Cognos"
                                }
                            ],
                            "type": "role",
                            "defaultName": "Analytics Viewer"
                        }
                    }
                ],
                "_meta": {
                    "schemaInfo": {
                        "permissions": {
                            "acquirable": false,
                            "modifiable": false,
                            "searchable": false,
                            "acquired": false
                        },
                        "modificationTime": {
                            "acquirable": false,
                            "modifiable": false,
                            "searchable": true,
                            "acquired": false
                        },
                        "policies": {
                            "acquirable": true,
                            "modifiable": true,
                            "searchable": false,
                            "acquired": true
                        },
                        "storeID": {
                            "acquirable": false,
                            "modifiable": false,
                            "searchable": false,
                            "acquired": false
                        },
                        "defaultName": {
                            "acquirable": false,
                            "modifiable": true,
                            "searchable": true,
                            "acquired": false
                        },
                        "version": {
                            "acquirable": false,
                            "modifiable": false,
                            "searchable": true,
                            "acquired": false
                        }
                    },
                    "links": {
                        "smarts_modules": {
                            "mimeType": "application/json",
                            "url": "/bi/v1/objects/i262CD3337BDC4BA3974D863F7C168626/smarts_modules"
                        },
                        "self": {
                            "mimeType": "application/vnd.ibm.bi.module+json",
                            "url": "/bi/v1/objects/i262CD3337BDC4BA3974D863F7C168626"
                        }
                    }
                },
                "id": "i262CD3337BDC4BA3974D863F7C168626",
                "type": "module",
                "defaultName": "Great outdoors data module",
                "version": 8
            }
        ]
    }



    ------------------------------
    Paul Mendelson
    ------------------------------



  • 3.  RE: Can the REST API get the permissions of a folder?

    Posted Mon May 01, 2023 05:27 PM
    Edited by Charles Blake Mon May 01, 2023 05:31 PM

    I'm confused, this must be an undocumented API correct, because /v1/objects is not a valid API in the REST API documentation
    https://www.ibm.com/docs/en/cognos-analytics/11.2.0?topic=apis-rest-api

    What version of Cognos are you running on to test?

    ------------------------------
    Charles Blake
    ------------------------------



  • 4.  RE: Can the REST API get the permissions of a folder?

    IBM Champion
    Posted Tue May 02, 2023 06:05 AM

    Hi Charles,

    You might want to use http://<cognos_server><cognos_analytics_server>/api/api-docs.</cognos_analytics_server>

    Full descriptions of available endpoints are available in the REST API reference section or from your Cognos Analytics instance at this previous URL.

    objects is listed.

    Best regards,



    ------------------------------
    Patrick Neveu
    Positive Thinking Company
    IBM Champion
    ------------------------------



  • 5.  RE: Can the REST API get the permissions of a folder?

    IBM Champion
    Posted Wed May 03, 2023 01:10 PM

    It is part of the undocumented internal API. Since most of my development is focused on end user tools, I prefer using this because it works through the gateway and doesn't need a secondary authentication.



    ------------------------------
    Paul Mendelson
    ------------------------------



  • 6.  RE: Can the REST API get the permissions of a folder?

    Posted Fri August 04, 2023 07:18 AM

    `policies` field that Paul mentioned looks to do the trick and is support in rest api, i.e. `/api/v1/content/id?fields=policies`, lists all the permissions for id.



    ------------------------------
    Cheers,
    Yuri
    ------------------------------