Sharing Insights Using REST API

Learn how to view the Sharing Insights for a migration job using the DryvIQ REST API.


Overview

The Migrate Sharing Insights tab offers a breakdown of all permissions associated with your content (based on the source content). It provides an overall breakdown of how content is shared, as well as the top user and group contributors. You can quickly identify the most shared files and folders. You also have the option to export a full permissions report, which allows you to view the permissions assigned to each item in the transfer.

Get User Access Rules

GET {{url}}v1/transfers/{{job_id/stats/by_sharing?field=user_access_rules

Example Response

{
    "status": 200,
    "item": {
        "user_access_rules": {
            "name": "Shared to users",
            "source": {
                "bytes": 14049,
                "files": 8,
                "folders": 13,
                "versions": 9,
                "storage": 15234
            },
            "destination": {
                "bytes": 14049,
                "files": 8,
                "folders": 13
            },
            "order": 1
        },
        "group_access_rules": {
            "name": "Shared to groups",
            "source": {
                "bytes": 297,
                "files": 1,
                "folders": 3,
                "versions": 1,
                "storage": 297
            },
            "destination": {
                "bytes": 297,
                "files": 1,
                "folders": 3
            },
            "order": 2
        },
        "domain_shared_links": {
            "name": "Shared to domain via link",
            "source": null,
            "destination": null,
            "order": 3
        },
        "anyone_shared_links": {
            "name": "Shared to anyone via link",
            "source": null,
            "destination": null,
            "order": 4
        },
        "": {
            "name": "Not shared",
            "source": {
                "bytes": 5416715,
                "files": 20,
                "folders": 9,
                "versions": 20,
                "storage": 5416715
            },
            "destination": {
                "bytes": 5416715,
                "files": 20,
                "folders": 10
            },
            "order": 5
        }
    }
}

Top User Contributors

GET {{url}}v1/transfers/security_map?job={{job_id&type=account&exclude_unused=true&fields=source%2Cpermissions&sort=permission

Example Result

The "resolution" indicates how the permission was mapped, such as by exception mapping, account map, email, or external account. The "permissions" value indicates how many items are shared with the user.

.......
...........
    },
    "item": [
          {
            "id": "54604b5d86a344ca8040f73f867cc980",
            "source": {
                "name": "John Smith 2",
                "email": "jsmith2@email.com",
                "id": "1497385045",
                "type": "account"
            },
            "resolution": "exception",
            "permissions": 6
        },
        {
            "id": "44b1bf8179f9467b8f91126cba578bee",
            "source": {
                "name": "John Smith 3",
                "email": "jsmith3@email.com",
                "id": "389034265",
                "type": "account"
            },
            "resolution": "exception",
            "permissions": 7
        },
..........
......

Top Group Contributors

GET {{url}}v1/transfers/security_map?job={{job_id&type=group&exclude_unused=true&fields=source%2Cpermissions&sort=permissions%20desc&offset=0&limit=5

Example Result

The "resolution" indicates how the permission was mapped, such as by exception mapping, or account map. The "permissions" value indicates how many items are shared with the group.

.......
...........
},
    "item": [
        {
            "id": "edb58a6038a940158a794d8d3aeaed61",
            "source": {
                "name": "Group_Name",
                "id": "1281879819",
                "type": "group"
            },
            "resolution": "exception",
            "permissions": 4
        }
..........
......

Shared Analysis for Most Shared Files

GET {{url}}v1/transfers/items?job={{job_id&type=items&sort=permissions%20desc&permissions=1%3A&fields=id%2Cname%2Csource.path%2Cpermissions%2Ctype%2Ccount&offset=0&limit=5

Example Result

The "permissions" value indicates how this item is shared with users/groups.

.......
...........
},
    "item": [
        {
            "id": 568,
            "parent_id": 542,
            "type": "item",
            "source": {
                "name": "appSettings.json",
                "ext": ".json",
                "path": "/{{folderName}}/appSettings.json" }, "destination": { "name": "appSettings.json", "ext": ".json" }, "permissions": 5 }, .......... ......

Shared Analysis for Most Shared Folders

GET {{url}}v1/transfers/folders?job={{job_id&type=items&sort=permissions%20desc&permissions=1%3A&fields=id%2Cname%2Csource.path%2Cpermissions%2Ctype%2Ccount&offset=0&limit=5

Example Result

The "count" is the number of child items shared. The "permissions" value indicates how this container is shared with users/groups.

.......
...........
},
    "item": [
        {
            "id": 533,
            "parent_id": 532,
            "type": "container",
            "source": {
                "name": "Source Folder Name",
                "path": "/{{folderPath}}/{{subFolder}}" }, "destination": { "name": "Destination Folder Name" }, "count": 1, "permissions": 3 }, .......... ......