Filter shared content

Shared items are those available to the account but not owned by it. Excluding shared items is most useful when multiple accounts are being migrated, ensuring duplicate content is not created on the receiving platform. When the filter is set on a job, DataHub will only transfer the original the item. The appropriate permissions will be applied to the item once it is transferred. 

DataHub only detects the folder as shared if the connection owner is not the owner of the shared folder. DataHub does not track ownership of content excluded by filter-shared.

UI - Ignore Shared Items Job Filter

REST API - Example 1

By default, shared content is included in transfers. To exclude it, use the shared or filter_shared type as a rule for either the source or destination. No other attribute values are needed.

{
    ...
    "transfer": {
        ...
        "filter": {
            "source": [{
                    "action": "exclude",
                    "rules": [{
                            "type": "shared"
                        }
                    ],
                    "type": "filter_rule"
                }
            ]
        }
    }
    ...
}

REST API - Example Scenario

As the Source Connection Admin, I want to impersonate a user and transfer all their content to their destination account. Along with their content, I want to ensure the Source user's folder that has been shared with other users transfers and keeps those shared settings with the same users on the destination. However, content that was shared with the source user, I want to exclude to prevent duplication on the destination. 

Notes:

  • Destination exclude:filter_shared is being ignored in this scenario because this is a copy job
  • If transfer type was changed to "sync", the destination exclude:filter_shared would be applied
  • Assumes email accounts on both the source and destination match

{
  "name":"Copy Source to Destination - Impersonate JSmith",
  "kind": "transfer",
  "transfer": {
      "audit_level": "trace",
      "transfer_type": "copy",
      "permissions": "add",
      "preserve_owners": "true",
      "delete_propagation": "ignore_both",
        "source": {
          "connection": { "id": "{{connection_id_source}}" },
          "target": { "path": "/" },
          "impersonate_as": { "email": "jsmith@abcd.com" }
        },
        "destination": {
          "connection": { "id": "{{connection_id_destination}}" },
          "target": { "path": "/Documents/BackupSource/" },
          "impersonate_as": { "email": "jsmith@abcd.com" }
        },
   "account_map": {
         "map_by": {
             "email": true
  },
   "type": "account_map"
  },
       "filter":{
         "source":[
            {
               "action":"exclude",
               "rules":[
                  {
                     "type":"filter_shared"
                  }
               ],
               "type":"filter_rule"
            }
         ],
         "destination":[
            {
               "action":"exclude",
               "rules":[
                  {
                     "type":"filter_shared"
                  }
               ],
               "type":"filter_rule"
            }
         ]
       }  
  },
  "schedule": {
    "mode": "manual"
    }
}

Related Links