Druva
63 min
the druva api provides a platform for cloud data protection and management it offers a suite of apis that allow for the integration of druva's data protection capabilities into other applications these apis allow you to manage users and devices, perform search operations on backed up files, initiate restore activities, manage legal hold policies, and more this guide focuses on the integration of the druva api with turbine, an automation platform for security, privacy, and incident response the integration with turbine allows for automated responses to incidents and threats, reducing the time and resources needed for these tasks for example, when a threat is detected on a user's device, turbine can automatically disable the device via the druva api, protecting the user's data additionally, turbine can utilize druva's search capabilities to find specific files across all backed up data, aiding in incident investigation and data management configurations oauth 2 0 client credentials authenticates using oauth 2 0 client credentials configuration parameters parameter description type required url a url to the target host string required token url string required client id the client id string required client secret the client secret string required scope permission scopes for this action array optional verify ssl verify ssl certificate boolean optional http proxy a proxy to route requests through string optional actions disable device disables a user device backup and restore will stop working after a device is disabled user data is available in insync but cannot be restored by a user endpoint url /insync/endpoints/v1/devices/{{id}}/disable method post input argument name type required description id string required unique identifier example \[ { "json body" {} } ] emails search search for backed up emails using the email attachments’ sha1 checksum value and view their details endpoint url /insync/search/mds/v1/user/emails method get input argument name type required description data body object optional data body headers object optional request headers file search search for files endpoint url /insync/search/mds/v1/user/files method get input argument name type required description sha1checksum string required parameter for file search mincreationtime string optional time value maxcreationtime string optional time value minmodificationtime string optional time value maxmodificationtime string optional time value filetype array optional type of the resource minfilesize number optional parameter for file search maxfilesize number optional parameter for file search datasource array optional response data userid array optional unique identifier pagetoken string optional parameter for file search output parameter type description results array result of the operation deviceid number unique identifier userid number unique identifier storageid number unique identifier sha1checksum string output field sha1checksum filename string name of the resource filesize number output field filesize creationtime string time value modificationtime string time value folderpath string output field folderpath objectid string unique identifier nextpagetoken string output field nextpagetoken example \[ { "json body" { "results" \[], "nextpagetoken" "string" } } ] get cloudcache server returns information about a particular cloudcache server using storageid endpoint url /insync/storagemanagement/v1/cloudcaches/{{id}} method get input argument name type required description id string optional unique identifier output parameter type description cloudcacheid number unique identifier cloudcachename string name of the resource status string status value cacheusage string output field cacheusage totalcachesize string output field totalcachesize example \[ { "json body" { "cloudcacheid" 1, "cloudcachename" "druva cloudcache", "status" "active", "cacheusage" "1 29 gb", "totalcachesize" "1 tb" } } ] get cloudcache servers returns the list of cloudcache servers configured in druva insync endpoint url /insync/storagemanagement/v1/cloudcaches method get output parameter type description totalsize number output field totalsize nextpagetoken string output field nextpagetoken cloudcaches array output field cloudcaches cloudcacheid number unique identifier cloudcachename string name of the resource status string status value cacheusage string output field cacheusage totalcachesize string output field totalcachesize example \[ { "json body" { "totalsize" 1, "nextpagetoken" "mtexmq==", "cloudcaches" \[] } } ] get device returns device information using deviceid endpoint url /insync/endpoints/v1/devices/{{id}} method get input argument name type required description id string required unique identifier output parameter type description deviceid number unique identifier devicename string name of the resource serialnumber string output field serialnumber deviceos string output field deviceos deviceosversion string output field deviceosversion platformos string output field platformos uuid string unique identifier clientversion string output field clientversion devicestatus string status value upgradestate string output field upgradestate userid number unique identifier totalbackupdata string response data totalbackupdatainbytes number response data addedon string output field addedon lastupgradedon string output field lastupgradedon lastconnected string output field lastconnected devicemarkedinactive boolean output field devicemarkedinactive example \[ { "json body" { "deviceid" 12345, "devicename" "ernie carter's macbook", "serialnumber" "px045", "deviceos" "mojave", "deviceosversion" "10 14 r34567", "platformos" "darwin", "uuid" "ty5h67 5674r 675645", "clientversion" "6 1 0 r56746", "devicestatus" "enabled", "upgradestate" "not upgradable", "userid" 1, "totalbackupdata" "40 05 gb", "totalbackupdatainbytes" 43003360051, "addedon" "2019 10 25t00 00 00z", "lastupgradedon" "2019 10 25t00 00 00z" } } ] get devices returns information about all the user devices protected using druva insync endpoint url /insync/endpoints/v1/devices method get input argument name type required description userid number optional unique identifier userids array optional unique identifier deviceids array optional unique identifier profileids array optional unique identifier searchprefixdevicename string optional name of the resource clientversion string optional parameter for get devices platformos string optional parameter for get devices devicestatus string optional status value upgradestate string optional parameter for get devices pagetoken string optional parameter for get devices minlastconnected string optional parameter for get devices maxlastconnected string optional parameter for get devices minaddedon string optional parameter for get devices maxaddedon string optional parameter for get devices serialnumber string optional parameter for get devices uuid string optional unique identifier devicemarkedinactive boolean optional parameter for get devices output parameter type description totalsize number output field totalsize nextpagetoken string output field nextpagetoken devices array output field devices deviceid number unique identifier devicename string name of the resource serialnumber string output field serialnumber deviceos string output field deviceos deviceosversion string output field deviceosversion platformos string output field platformos uuid string unique identifier clientversion string output field clientversion devicestatus string status value upgradestate string output field upgradestate userid number unique identifier totalbackupdata string response data totalbackupdatainbytes number response data addedon string output field addedon lastupgradedon string output field lastupgradedon lastconnected string output field lastconnected devicemarkedinactive boolean output field devicemarkedinactive example \[ { "json body" { "totalsize" 1, "nextpagetoken" "mtexmq==", "devices" \[] } } ] get restore activities returns the list of all the restore activities performed on user devices with their details endpoint url /insync/endpoints/v1/restores method get input argument name type required description deviceid number optional unique identifier targetdeviceid number optional unique identifier userid number optional unique identifier minstarttime string optional time value maxstarttime string optional time value pagetoken string optional parameter for get restore activities output parameter type description totalsize number output field totalsize nextpagetoken string output field nextpagetoken restores array output field restores deviceid number unique identifier targetdeviceid number unique identifier restorelocation string output field restorelocation userid number unique identifier restoreid number unique identifier starttime string time value endtime string time value status string status value restoresize string output field restoresize numberoffilesrestored number output field numberoffilesrestored numberoffilesmissed number output field numberoffilesmissed restoremode string output field restoremode systemsettingsrestore boolean output field systemsettingsrestore failurereason string response reason phrase example \[ { "json body" { "totalsize" 0, "nextpagetoken" "string", "restores" \[] } } ] get restore activity returns the restore activity details based on the restore id endpoint url /insync/endpoints/v1/restores/{{id}} method get input argument name type required description id string optional unique identifier output parameter type description deviceid number unique identifier targetdeviceid number unique identifier restorelocation string output field restorelocation userid number unique identifier restoreid number unique identifier starttime string time value endtime string time value status string status value restoresize string output field restoresize numberoffilesrestored number output field numberoffilesrestored numberoffilesmissed number output field numberoffilesmissed restoremode string output field restoremode systemsettingsrestore boolean output field systemsettingsrestore failurereason string response reason phrase example \[ { "json body" { "deviceid" 0, "targetdeviceid" 0, "restorelocation" "string", "userid" 0, "restoreid" 0, "starttime" "2023 06 05t19 18 26 139z", "endtime" "2023 06 05t19 18 26 139z", "status" "string", "restoresize" "string", "numberoffilesrestored" 0, "numberoffilesmissed" 0, "restoremode" "string", "systemsettingsrestore" true, "failurereason" "" } } ] get storage returns information about a particular storage using storageid endpoint url /insync/storagemanagement/v1/storages/{{id}} method get input argument name type required description id string optional unique identifier output parameter type description storageid number unique identifier storagename string name of the resource storageusage string output field storageusage totalsizeofbackedupfiles string output field totalsizeofbackedupfiles example \[ { "json body" { "storageid" 1, "storagename" "druva3 local", "storageusage" "225 04 mb", "totalsizeofbackedupfiles" "1 29 gb" } } ] get storages returns the list of all the storages configured for your account in druva insync endpoint url /insync/storagemanagement/v1/storages method get input argument name type required description pagetoken string optional parameter for get storages output parameter type description totalsize number output field totalsize nextpagetoken string output field nextpagetoken storages array output field storages storageid number unique identifier storagename string name of the resource storageusage string output field storageusage totalsizeofbackedupfiles string output field totalsizeofbackedupfiles example \[ { "json body" { "totalsize" 1, "nextpagetoken" "mtexmq==", "storages" \[] } } ] get user returns information about a particular user in druva insync using the userid endpoint url /insync/usermanagement/v1/users/{{id}} method get input argument name type required description id string required unique identifier output parameter type description userid number unique identifier username string name of the resource emailid string unique identifier status string status value profileid number unique identifier storageid number unique identifier cacheid number unique identifier quota string output field quota quotainbytes number output field quotainbytes addedon string output field addedon privacysettingsenabled boolean output field privacysettingsenabled ldapguid string unique identifier additionalproperties object output field additionalproperties useridentifiercustomattribute string unique identifier useridentifiercustomattributevalue string unique identifier example \[ { "json body" { "userid" 1, "username" "ernie carter", "emailid" "ernie carter\@druva com", "status" "active", "profileid" 1, "storageid" 1, "cacheid" 1, "quota" "10 gb", "quotainbytes" 10737418240, "addedon" "2019 10 25t00 00 00z", "privacysettingsenabled" true, "ldapguid" "b1c47201c67910458867ba19982e353e", "additionalproperties" {} } } ] get users returns the list of users in druva insync with their details endpoint url /insync/usermanagement/v1/users method get input argument name type required description profileid number optional unique identifier storageid number optional unique identifier cacheid number optional unique identifier userids array optional unique identifier emailid string optional unique identifier searchprefixemailid string optional unique identifier searchprefixusername string optional name of the resource pagetoken string optional parameter for get users minaddedon string optional parameter for get users maxaddedon string optional parameter for get users status string optional status value ldapguid string optional unique identifier privacysettingsenabled boolean optional parameter for get users output parameter type description totalsize number output field totalsize nextpagetoken string output field nextpagetoken users array output field users userid number unique identifier username string name of the resource emailid string unique identifier status string status value profileid number unique identifier storageid number unique identifier cacheid number unique identifier quota string output field quota quotainbytes number output field quotainbytes addedon string output field addedon privacysettingsenabled boolean output field privacysettingsenabled ldapguid string unique identifier additionalproperties object output field additionalproperties useridentifiercustomattribute string unique identifier useridentifiercustomattributevalue string unique identifier example \[ { "json body" { "totalsize" 1, "nextpagetoken" "mtexmq==", "users" \[] } } ] get users of a legal hold policy returns the list of users who are a part of legal hold endpoint url /insync/legalholds/v4/policies/{{id}}/users method get input argument name type required description id string optional unique identifier output parameter type description results object result of the operation userslist array output field userslist username string name of the resource status string status value useremail string output field useremail collecteddata string response data collecteddatainbytes number response data userid number unique identifier policyid number unique identifier onlegalhold boolean output field onlegalhold numberofdatasources number response data totalcollecteddata string response data totalcollecteddatainbytes string response data totalcustodians number output field totalcustodians pageinfo object output field pageinfo totalpages number output field totalpages pagenumber number output field pagenumber pagesize number output field pagesize example \[ { "json body" { "results" {}, "pageinfo" {} } } ] get whitelisted keywords get the list of all whitelisted keywords endpoint url /insync/sdg/v1/whitelistkeywords method get output parameter type description whitelistkeywords array output field whitelistkeywords example \[ { "json body" { "whitelistkeywords" \[] } } ] initiate restore activity creates a data restore request and provides the option to scan the data for malware or viruses before restoring to the desired location on the target device endpoint url /insync/endpoints/v1/restores method post input argument name type required description deviceid number optional unique identifier targetdeviceid number optional unique identifier restorelocation string optional parameter for initiate restore activity snapshotname string optional name of the resource enableavscan boolean optional parameter for initiate restore activity output parameter type description restores array output field restores deviceid number unique identifier targetdeviceid number unique identifier restorelocation string output field restorelocation userid number unique identifier restoreid number unique identifier starttime string time value endtime string time value status string status value restoresize string output field restoresize numberoffilesrestored object output field numberoffilesrestored numberoffilesmissed object output field numberoffilesmissed restoremode string output field restoremode systemsettingsrestore object output field systemsettingsrestore failurereason string response reason phrase totalsize number output field totalsize example \[ { "json body" { "restores" \[], "totalsize" 1 } } ]