Shelvesets

Last Update: 12/5/2016

api-version = 1.0

If you haven't already, look at the information on getting started with these APIs.

Get list of shelvesets

GET https://{instance}/DefaultCollection/_apis/tfvc/shelvesets?api-version={version}[&owner={string}&maxContentLength={int}&$top={int}&$skip={int}]
Parameter Type Default Notes
URL
instance string VS Team Services account ({account}.visualstudio.com) or TFS server ({server:port}).
Query
api-version string Version of the API to use.
owner string Display name, unique name, or ID of person who created the shelveset.
maxCommentLength int 80 Return only this many characters of each comment.
$top int 100 Maximum number of shelvesets to return.
$skip int 0 Number of shelvesets to skip.

Sample request

GET https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets?api-version=1.0-preview.1

Sample response

Status code: 200
{
  "count": 4,
  "value": [
    {
      "name": "My first shelveset",
      "id": "My first shelveset;d6245f20-2af8-44f4-9451-8107cb2767db",
      "owner": {
        "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
        "displayName": "Normal Paulk",
        "uniqueName": "fabrikamfiber16@hotmail.com",
        "url": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db",
        "imageUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=d6245f20-2af8-44f4-9451-8107cb2767db"
      },
      "createdDate": "2014-07-18T03:37:52.277Z",
      "comment": "Here is a really long comment describing this shelveset.",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db"
    },
    {
      "name": "More changes",
      "id": "More changes;d6245f20-2af8-44f4-9451-8107cb2767db",
      "owner": {
        "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
        "displayName": "Normal Paulk",
        "uniqueName": "fabrikamfiber16@hotmail.com",
        "url": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db",
        "imageUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=d6245f20-2af8-44f4-9451-8107cb2767db"
      },
      "createdDate": "2014-07-18T03:29:45.91Z",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/More%20changes%3bd6245f20-2af8-44f4-9451-8107cb2767db"
    },
    {
      "name": "Doc updates",
      "id": "Doc updates;d6245f20-2af8-44f4-9451-8107cb2767db",
      "owner": {
        "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
        "displayName": "Normal Paulk",
        "uniqueName": "fabrikamfiber16@hotmail.com",
        "url": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db",
        "imageUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=d6245f20-2af8-44f4-9451-8107cb2767db"
      },
      "createdDate": "2014-07-18T03:27:25.18Z",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/Doc%20updates%3bd6245f20-2af8-44f4-9451-8107cb2767db"
    },
    {
      "name": "Set this aside for now",
      "id": "Set this aside for now;8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
      "owner": {
        "id": "8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
        "displayName": "Chuck Reinhart",
        "uniqueName": "fabrikamfiber3@hotmail.com",
        "url": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
        "imageUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
      },
      "createdDate": "2014-03-24T20:32:25.37Z",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/Set%20this%20aside%20for%20now%3b8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
    }
  ]
}

By person

Sample request

GET https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets?owner=Normal Paulk&api-version=1.0-preview.1

Sample response

Status code: 200
{
  "count": 3,
  "value": [
    {
      "name": "My first shelveset",
      "id": "My first shelveset;d6245f20-2af8-44f4-9451-8107cb2767db",
      "owner": {
        "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
        "displayName": "Normal Paulk",
        "uniqueName": "fabrikamfiber16@hotmail.com",
        "url": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db",
        "imageUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=d6245f20-2af8-44f4-9451-8107cb2767db"
      },
      "createdDate": "2014-07-18T03:37:52.277Z",
      "comment": "Here is a really long comment describing this shelveset.",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db"
    },
    {
      "name": "More changes",
      "id": "More changes;d6245f20-2af8-44f4-9451-8107cb2767db",
      "owner": {
        "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
        "displayName": "Normal Paulk",
        "uniqueName": "fabrikamfiber16@hotmail.com",
        "url": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db",
        "imageUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=d6245f20-2af8-44f4-9451-8107cb2767db"
      },
      "createdDate": "2014-07-18T03:29:45.91Z",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/More%20changes%3bd6245f20-2af8-44f4-9451-8107cb2767db"
    },
    {
      "name": "Doc updates",
      "id": "Doc updates;d6245f20-2af8-44f4-9451-8107cb2767db",
      "owner": {
        "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
        "displayName": "Normal Paulk",
        "uniqueName": "fabrikamfiber16@hotmail.com",
        "url": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db",
        "imageUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=d6245f20-2af8-44f4-9451-8107cb2767db"
      },
      "createdDate": "2014-07-18T03:27:25.18Z",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/Doc%20updates%3bd6245f20-2af8-44f4-9451-8107cb2767db"
    }
  ]
}

With more or less comments

Sample request

GET https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets?maxCommentLength=6&api-version=1.0-preview.1

Sample response

Status code: 200
{
  "count": 4,
  "value": [
    {
      "name": "My first shelveset",
      "id": "My first shelveset;d6245f20-2af8-44f4-9451-8107cb2767db",
      "owner": {
        "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
        "displayName": "Normal Paulk",
        "uniqueName": "fabrikamfiber16@hotmail.com",
        "url": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db",
        "imageUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=d6245f20-2af8-44f4-9451-8107cb2767db"
      },
      "createdDate": "2014-07-18T03:37:52.277Z",
      "comment": "Here i",
      "commentTruncated": true,
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db"
    },
    {
      "name": "More changes",
      "id": "More changes;d6245f20-2af8-44f4-9451-8107cb2767db",
      "owner": {
        "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
        "displayName": "Normal Paulk",
        "uniqueName": "fabrikamfiber16@hotmail.com",
        "url": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db",
        "imageUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=d6245f20-2af8-44f4-9451-8107cb2767db"
      },
      "createdDate": "2014-07-18T03:29:45.91Z",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/More%20changes%3bd6245f20-2af8-44f4-9451-8107cb2767db"
    },
    {
      "name": "Doc updates",
      "id": "Doc updates;d6245f20-2af8-44f4-9451-8107cb2767db",
      "owner": {
        "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
        "displayName": "Normal Paulk",
        "uniqueName": "fabrikamfiber16@hotmail.com",
        "url": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db",
        "imageUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=d6245f20-2af8-44f4-9451-8107cb2767db"
      },
      "createdDate": "2014-07-18T03:27:25.18Z",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/Doc%20updates%3bd6245f20-2af8-44f4-9451-8107cb2767db"
    },
    {
      "name": "Set this aside for now",
      "id": "Set this aside for now;8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
      "owner": {
        "id": "8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
        "displayName": "Chuck Reinhart",
        "uniqueName": "fabrikamfiber3@hotmail.com",
        "url": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
        "imageUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
      },
      "createdDate": "2014-03-24T20:32:25.37Z",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/Set%20this%20aside%20for%20now%3b8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
    }
  ]
}

A page at a time

Sample request

GET https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets?$top=2&$skip=2&api-version=1.0-preview.1

Sample response

Status code: 200
{
  "count": 2,
  "value": [
    {
      "name": "Doc updates",
      "id": "Doc updates;d6245f20-2af8-44f4-9451-8107cb2767db",
      "owner": {
        "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
        "displayName": "Normal Paulk",
        "uniqueName": "fabrikamfiber16@hotmail.com",
        "url": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db",
        "imageUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=d6245f20-2af8-44f4-9451-8107cb2767db"
      },
      "createdDate": "2014-07-18T03:27:25.18Z",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/Doc%20updates%3bd6245f20-2af8-44f4-9451-8107cb2767db"
    },
    {
      "name": "Set this aside for now",
      "id": "Set this aside for now;8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
      "owner": {
        "id": "8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
        "displayName": "Chuck Reinhart",
        "uniqueName": "fabrikamfiber3@hotmail.com",
        "url": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d",
        "imageUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
      },
      "createdDate": "2014-03-24T20:32:25.37Z",
      "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/Set%20this%20aside%20for%20now%3b8c8c7d32-6b1b-47f4-b2e9-30b477b5ab3d"
    }
  ]
}

Get a shelveset

GET https://{instance}/DefaultCollection/_apis/tfvc/shelvesets/{shelveset};{owner}?api-version={version}
Parameter Type Default Notes
URL
instance string VS Team Services account ({account}.visualstudio.com) or TFS server ({server:port}).
shelveset string Name of shelveset.
owner string Display name, unique name, or ID of person who created the shelveset.
Query
api-version string Version of the API to use.
includeDetails bool false Return policy overrides and notes.
includeWorkItems bool false Return work items.
maxChangeCount int 0 Maximum number of changes to return.
maxCommentLength int 2000 Maximum number of characters in the comment to return.

Sample request

GET https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset;d6245f20-2af8-44f4-9451-8107cb2767db?api-version=1.0-preview.1

Sample response

Status code: 200
{
  "name": "My first shelveset",
  "id": "My first shelveset;d6245f20-2af8-44f4-9451-8107cb2767db",
  "owner": {
    "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
    "displayName": "Normal Paulk",
    "uniqueName": "fabrikamfiber16@hotmail.com",
    "url": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db",
    "imageUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=d6245f20-2af8-44f4-9451-8107cb2767db"
  },
  "createdDate": "2014-07-18T03:37:52.277Z",
  "comment": "Here is a really long comment describing this shelveset.",
  "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db",
  "_links": {
    "self": {
      "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db"
    },
    "changes": {
      "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db/changes"
    },
    "workItems": {
      "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db/workitems"
    },
    "owner": {
      "href": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db"
    }
  }
}

With policy overrides and notes

Sample request

GET https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset;d6245f20-2af8-44f4-9451-8107cb2767db?includeDetails=true&api-version=1.0-preview.1

Sample response

Status code: 200
{
  "policyOverride": {
    "policyFailures": []
  },
  "notes": [],
  "name": "My first shelveset",
  "id": "My first shelveset;d6245f20-2af8-44f4-9451-8107cb2767db",
  "owner": {
    "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
    "displayName": "Normal Paulk",
    "uniqueName": "fabrikamfiber16@hotmail.com",
    "url": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db",
    "imageUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=d6245f20-2af8-44f4-9451-8107cb2767db"
  },
  "createdDate": "2014-07-18T03:37:52.277Z",
  "comment": "Here is a really long comment describing this shelveset.",
  "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db",
  "_links": {
    "self": {
      "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db"
    },
    "changes": {
      "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db/changes"
    },
    "workItems": {
      "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db/workitems"
    },
    "owner": {
      "href": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db"
    }
  }
}

With work items

Sample request

GET https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset;d6245f20-2af8-44f4-9451-8107cb2767db?includeWorkItems=true&api-version=1.0-preview.1

Sample response

Status code: 200
{
  "workItems": [
    {
      "webUrl": "https://fabrikam-fiber-inc.visualstudio.com/web/wi.aspx?pcguid=d81542e4-cdfa-4333-b082-1ae2d6c3ad16&id=22",
      "id": 22,
      "title": "Wrong output",
      "workItemType": "Bug",
      "state": "Done"
    }
  ],
  "name": "My first shelveset",
  "id": "My first shelveset;d6245f20-2af8-44f4-9451-8107cb2767db",
  "owner": {
    "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
    "displayName": "Normal Paulk",
    "uniqueName": "fabrikamfiber16@hotmail.com",
    "url": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db",
    "imageUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=d6245f20-2af8-44f4-9451-8107cb2767db"
  },
  "createdDate": "2014-07-18T03:37:52.277Z",
  "comment": "Here is a really long comment describing this shelveset.",
  "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db",
  "_links": {
    "self": {
      "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db"
    },
    "changes": {
      "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db/changes"
    },
    "workItems": {
      "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db/workitems"
    },
    "owner": {
      "href": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db"
    }
  }
}

With changes

Sample request

GET https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset;d6245f20-2af8-44f4-9451-8107cb2767db?maxChangeCount=100&api-version=1.0-preview.1

Sample response

Status code: 200
{
  "changes": [
    {
      "item": {
        "version": 9,
        "path": "$/Fabrikam-Fiber-TFVC/AuthSample/Code/App.config",
        "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/items/%24/Fabrikam-Fiber-TFVC/AuthSample/Code/App.config?versionType=Shelveset&version=My%20first%20shelveset%3Bfabrikamfiber16%40hotmail.com"
      },
      "changeType": "edit"
    },
    {
      "item": {
        "version": 9,
        "path": "$/Fabrikam-Fiber-TFVC/AuthSample/Code/AuthSample.csproj",
        "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/items/%24/Fabrikam-Fiber-TFVC/AuthSample/Code/AuthSample.csproj?versionType=Shelveset&version=My%20first%20shelveset%3Bfabrikamfiber16%40hotmail.com"
      },
      "changeType": "edit"
    },
    {
      "item": {
        "path": "$/Fabrikam-Fiber-TFVC/AuthSample/Code/FabrikamEngine.cs",
        "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/items/%24/Fabrikam-Fiber-TFVC/AuthSample/Code/FabrikamEngine.cs?versionType=Shelveset&version=My%20first%20shelveset%3Bfabrikamfiber16%40hotmail.com"
      },
      "changeType": "add, edit, encoding"
    },
    {
      "item": {
        "version": 9,
        "path": "$/Fabrikam-Fiber-TFVC/AuthSample/Code/Properties/AssemblyInfo.cs",
        "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/items/%24/Fabrikam-Fiber-TFVC/AuthSample/Code/Properties/AssemblyInfo.cs?versionType=Shelveset&version=My%20first%20shelveset%3Bfabrikamfiber16%40hotmail.com"
      },
      "changeType": "delete"
    }
  ],
  "name": "My first shelveset",
  "id": "My first shelveset;d6245f20-2af8-44f4-9451-8107cb2767db",
  "owner": {
    "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
    "displayName": "Normal Paulk",
    "uniqueName": "fabrikamfiber16@hotmail.com",
    "url": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db",
    "imageUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=d6245f20-2af8-44f4-9451-8107cb2767db"
  },
  "createdDate": "2014-07-18T03:37:52.277Z",
  "comment": "Here is a really long comment describing this shelveset.",
  "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db",
  "_links": {
    "self": {
      "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db"
    },
    "changes": {
      "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db/changes"
    },
    "workItems": {
      "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db/workitems"
    },
    "owner": {
      "href": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db"
    }
  }
}

With more or less comments

Sample request

GET https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset;d6245f20-2af8-44f4-9451-8107cb2767db?maxCommentLength=6&api-version=1.0-preview.1

Sample response

Status code: 200
{
  "name": "My first shelveset",
  "id": "My first shelveset;d6245f20-2af8-44f4-9451-8107cb2767db",
  "owner": {
    "id": "d6245f20-2af8-44f4-9451-8107cb2767db",
    "displayName": "Normal Paulk",
    "uniqueName": "fabrikamfiber16@hotmail.com",
    "url": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db",
    "imageUrl": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=d6245f20-2af8-44f4-9451-8107cb2767db"
  },
  "createdDate": "2014-07-18T03:37:52.277Z",
  "comment": "Here i",
  "commentTruncated": true,
  "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db",
  "_links": {
    "self": {
      "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db"
    },
    "changes": {
      "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db/changes"
    },
    "workItems": {
      "href": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset%3bd6245f20-2af8-44f4-9451-8107cb2767db/workitems"
    },
    "owner": {
      "href": "https://fabrikam-fiber-inc.vssps.visualstudio.com/_apis/Identities/d6245f20-2af8-44f4-9451-8107cb2767db"
    }
  }
}

Get shelveset changes

Retrieves a list of changes included in a shelveset. Paging is supported using $top and $skip.

GET https://{instance}/DefaultCollection/_apis/tfvc/shelvesets/{shelveset};{owner}/changes?api-version={version}
Parameter Type Default Notes
URL
instance string VS Team Services account ({account}.visualstudio.com) or TFS server ({server:port}).
shelveset string Name of shelveset.
owner string Display name, unique name, or ID of person who created the shelveset.
Query
api-version string Version of the API to use.
$top int 100 Maximum number of shelvesets to return.
$skip int 0 Number of shelvesets to skip.

Sample request

GET https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset;d6245f20-2af8-44f4-9451-8107cb2767db/changes?api-version=1.0-preview.1

Sample response

Status code: 200
{
  "count": 4,
  "value": [
    {
      "item": {
        "version": 9,
        "path": "$/Fabrikam-Fiber-TFVC/AuthSample/Code/App.config",
        "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/items/%24/Fabrikam-Fiber-TFVC/AuthSample/Code/App.config?versionType=Shelveset&version=My%20first%20shelveset%3Bfabrikamfiber16%40hotmail.com"
      },
      "changeType": "edit"
    },
    {
      "item": {
        "version": 9,
        "path": "$/Fabrikam-Fiber-TFVC/AuthSample/Code/AuthSample.csproj",
        "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/items/%24/Fabrikam-Fiber-TFVC/AuthSample/Code/AuthSample.csproj?versionType=Shelveset&version=My%20first%20shelveset%3Bfabrikamfiber16%40hotmail.com"
      },
      "changeType": "edit"
    },
    {
      "item": {
        "path": "$/Fabrikam-Fiber-TFVC/AuthSample/Code/FabrikamEngine.cs",
        "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/items/%24/Fabrikam-Fiber-TFVC/AuthSample/Code/FabrikamEngine.cs?versionType=Shelveset&version=My%20first%20shelveset%3Bfabrikamfiber16%40hotmail.com"
      },
      "changeType": "add, edit, encoding"
    },
    {
      "item": {
        "version": 9,
        "path": "$/Fabrikam-Fiber-TFVC/AuthSample/Code/Properties/AssemblyInfo.cs",
        "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/items/%24/Fabrikam-Fiber-TFVC/AuthSample/Code/Properties/AssemblyInfo.cs?versionType=Shelveset&version=My%20first%20shelveset%3Bfabrikamfiber16%40hotmail.com"
      },
      "changeType": "delete"
    }
  ]
}

A page at a time

Sample request

GET https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/shelvesets/My%20first%20shelveset;d6245f20-2af8-44f4-9451-8107cb2767db/changes?$top=2&$skip=2&api-version=1.0-preview.1

Sample response

Status code: 200
{
  "count": 2,
  "value": [
    {
      "item": {
        "path": "$/Fabrikam-Fiber-TFVC/AuthSample/Code/FabrikamEngine.cs",
        "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/items/%24/Fabrikam-Fiber-TFVC/AuthSample/Code/FabrikamEngine.cs?versionType=Shelveset&version=My%20first%20shelveset%3Bfabrikamfiber16%40hotmail.com"
      },
      "changeType": "add, edit, encoding"
    },
    {
      "item": {
        "version": 9,
        "path": "$/Fabrikam-Fiber-TFVC/AuthSample/Code/Properties/AssemblyInfo.cs",
        "url": "https://fabrikam-fiber-inc.visualstudio.com/DefaultCollection/_apis/tfvc/items/%24/Fabrikam-Fiber-TFVC/AuthSample/Code/Properties/AssemblyInfo.cs?versionType=Shelveset&version=My%20first%20shelveset%3Bfabrikamfiber16%40hotmail.com"
      },
      "changeType": "delete"
    }
  ]
}

Get shelveset work items

GET https://{instance}/DefaultCollection/_apis/tfvc/shelvesets/{shelveset};{owner}/workitems?api-version={version}
```

| Parameter        | Type   | Default | Notes
|:-----------------|:-------|:--------|---------------------------------
| URL
| instance         | string |         | [VS Team Services account](/integrate/get-started/rest/basics.md#vs-team-services) ({account}.visualstudio.com) or [TFS server](/integrate/get-started/rest/basics.md#tfs) ({server:port}).
| shelveset        | string |         | Name of shelveset.
| owner            | string |         | Display name, unique name, or ID of person who created the shelveset.
| Query
| api-version      | string |         | [Version](../../get-started/rest/basics.md#versions) of the API to use.

[!code-REST [GET__tfvc_shelvesets__shelvesetId__workitems_json](./_data/shelvesets/GET__tfvc_shelvesets__shelvesetId__workitems.json)]