List bundles

Namespace: microsoft.graph

Get a list of all the bundles in a user's drive.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) Not supported.
Delegated (personal Microsoft account) Files.Read, Files.ReadWrite, Files.Read.All, Files.ReadWrite.All
Application Not supported.

HTTP request

GET /drive/bundles

Optional query parameters

This method supports the $filter OData query parameters to help customize the response.

You can't use the expand=children query parameter to list bundles.

Request headers

Name Description
Authorization Bearer {token}. Required.

Request body

Do not supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and a collection of bundle objects in the response body.

For information about error responses, see Microsoft Graph error responses and resource types.

Examples

Example 1: List all bundles in a drive

To request an enumeration of all bundles defined in the drive, you can make a request to the bundles collection without any parameters.

Request

The following is an example of a request.

GET https://graph.microsoft.com/beta/drive/bundles

Response

The following is an example of the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-type: application/json

{
  "value": [
    {
      "id": "0123456789abc",
      "name": "Vacation photo album",
      "bundle": {
        "childCount": 1,
        "album": { }
      }
    },
    {
      "id": "0120310201abd",
      "name": "Family shared files",
      "bundle": {
        "childCount": 1
      }
    }
  ],
  "@odata.nextLink": "https://..."
}

Example 2: List all photo albums in a drive

To filter the list of bundles returned from a request to the bundles collection, you can use the filter query string parameter to specify the type of bundle to return by checking for the existence of a facet on the bundle.

Request

The following is an example of a request.

GET https://graph.microsoft.com/v1.0/drive/bundles?filter=bundle/album%20ne%20null

Response

The following is an example of the response. The response to a GET to the bundles endpoint is an array of driveItem resources with the bundle. Because all bundles are items, you can use all the standard item operations on them.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-type: application/json

{
  "value": [
    {
      "id": "0123456789abc",
      "name": "Vacation photo album",
      "bundle": {
        "childCount": 1,
        "album": { }
      }
    },
    {
      "id": "120301010abcd",
      "name": "Seattle Center event",
      "bundle": {
        "childCount": 4,
        "album": { }
      },
      "tags": [
        {
          "name": "outside",
          "autoTagged": { }
        }
      ]
    }
  ]
}