最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Google Vault API, how to list all shared drives in a matter? - Stack Overflow

programmeradmin4浏览0评论

I am using Google Vault API to search and export files in Shared Drives.

here is my code to create an Export object

var export = new Export()
{
    MatterId = matterId,
    Name = "Vault_Export_SharedDrive",
    ExportOptions = new ExportOptions
    {
        DriveOptions = new DriveExportOptions
        {
            IncludeAccessInfo = true,
        }
    },
    Query = new Query
    {
        Corpus = "DRIVE",
        //HELD_DATA, ALL_DATA
        DataScope = "ALL_DATA",
        //ACCOUNT, ENTIRE_ORG
        SearchMethod = "SHARED_DRIVE",
        Method = "SHARED_DRIVE",
        SharedDriveInfo = new SharedDriveInfo { SharedDriveIds = new[] { "0AM11RrV1239Uk9PVA" } },
        //StartTimeRaw = "2024-07-01T15:01:23Z",
        //EndTimeRaw = "2024-07-30T15:01:23Z",
    }
};

the Property "SharedDriveInfo" in "Query", I know I should input SharedDrive Ids as array. I can get it by using Google Drive API, but how about SharedDrives already deleted in workspaces, but held in a Vault matter?

My case is this:

  • I create a SharedDrive, and it is held in a matter.
  • After I delete this SharedDrive, when I search data in Vault page, and select "All Data", "Entity" select "SharedDrive", it will load all SharedDrive in this matter, including the deleted one. I can select it.

My question is how could I get the deleted SharedDrive IDs so that I can use it to export data like above?

thanks

I am using Google Vault API to search and export files in Shared Drives.

here is my code to create an Export object

var export = new Export()
{
    MatterId = matterId,
    Name = "Vault_Export_SharedDrive",
    ExportOptions = new ExportOptions
    {
        DriveOptions = new DriveExportOptions
        {
            IncludeAccessInfo = true,
        }
    },
    Query = new Query
    {
        Corpus = "DRIVE",
        //HELD_DATA, ALL_DATA
        DataScope = "ALL_DATA",
        //ACCOUNT, ENTIRE_ORG
        SearchMethod = "SHARED_DRIVE",
        Method = "SHARED_DRIVE",
        SharedDriveInfo = new SharedDriveInfo { SharedDriveIds = new[] { "0AM11RrV1239Uk9PVA" } },
        //StartTimeRaw = "2024-07-01T15:01:23Z",
        //EndTimeRaw = "2024-07-30T15:01:23Z",
    }
};

the Property "SharedDriveInfo" in "Query", I know I should input SharedDrive Ids as array. I can get it by using Google Drive API, but how about SharedDrives already deleted in workspaces, but held in a Vault matter?

My case is this:

  • I create a SharedDrive, and it is held in a matter.
  • After I delete this SharedDrive, when I search data in Vault page, and select "All Data", "Entity" select "SharedDrive", it will load all SharedDrive in this matter, including the deleted one. I can select it.

My question is how could I get the deleted SharedDrive IDs so that I can use it to export data like above?

thanks

Share Improve this question asked Feb 14 at 4:20 Elva WhiteElva White 111 silver badge1 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 1

Alternative Solution

You may use the Admin Console to check for your deleted Shared Drive through this link. It will be on the very right side so you'll need to scroll to it.

Note: From what I have experienced, deleted shared drives will be on this page for up to 25 days only.


  • The Method: drives.list should be able to retrieve Shared Drive IDs, even the deleted ones but it seems like the API only retrieves active shared drives. With this, you can submit a Feature Request at this link to inform Google about this issue.
发布评论

评论列表(0)

  1. 暂无评论