Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can pull the information reported in the Sharing Insights using the REST API.

Get User Access Rules

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

Code Block
{
    "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
        }
    }
}

...

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.

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

Code Block
.......
...........
    },
    "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
        },
..........
......

...

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.

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

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

...

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

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

Code Block
.......
...........
},
    "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 }, .......... ......

...

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

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

Code Block
.......
...........
},
    "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 }, .......... ......

...