Search code examples
box-apiboxboxapiv2

Get all users/groups having access to a collaboration : BOX API


Is there a way to retrive all the users/groups having access to a collaboration : BOX API?


Solution

  • The API defines a collaboration as an access control list. It's an object that grants a single user (or group) permissions to access a folder, so you can't really have access to a collaboration.

    It sounds more like you're asking how you can get a list of all the collaborations on a folder, which you can do with:

    GET /folders/{id}/collaborations
    

    which will return something like:

    {
        "total_count": 1,
        "entries": [
            {
                "type": "collaboration",
                "id": "14176246",
                "created_by": {
                    "type": "user",
                    "id": "4276790",
                    "name": "David Lee",
                    "login": "[email protected]"
                },
                "created_at": "2011-11-29T12:56:35-08:00",
                "modified_at": "2012-09-11T15:12:32-07:00",
                "expires_at": null,
                "status": "accepted",
                "accessible_by": {
                    "type": "user",
                    "id": "755492",
                    "name": "Simon Tan",
                    "login": "[email protected]"
                },
                "role": "editor",
                "acknowledged_at": "2011-11-29T12:59:40-08:00",
                "item": null
            }
        ]
    }
    

    https://developers.box.com/docs/#folders-view-a-folders-collaborations