TfvcHttpClient2_2
Important
Disclaimer: This API is in private preview and subject to change. This API is in private preview and subject to change.
Module path: TFS/VersionControl/TfvcRestClient
Initialization sample
import RestClient = require("TFS/VersionControl/TfvcRestClient");
// Get an instance of the client
var client = RestClient.getClient();
// Call a method on the client
// e.g. client.getResource(...).then(...);
Methods
- createChangeset()
- getBatchedChangesets()
- getBranch()
- getBranches()
- getBranchRefs()
- getChangeset()
- getChangesetChanges()
- getChangesets()
- getChangesetWorkItems()
- getItem()
- getItemContent()
- getItems()
- getItemsBatch()
- getItemsBatchZip()
- getItemText()
- getItemZip()
- getLabel()
- getLabelItems()
- getLabels()
- getProjectInfo()
- getProjectInfos()
- getShelveset()
- getShelvesetChanges()
- getShelvesets()
- getShelvesetWorkItems()
createChangeset()
Syntax
IPromise<TFS_VersionControl_Contracts.TfvcChangesetRef> createChangeset(changeset, project)
Parameters
changeset
: TFS_VersionControl_Contracts.TfvcChangeset.project
: string. Optional.
Returns
getBatchedChangesets()
Syntax
IPromise<TFS_VersionControl_Contracts.TfvcChangesetRef[]> getBatchedChangesets(changesetsRequestData)
Parameters
changesetsRequestData
: TFS_VersionControl_Contracts.TfvcChangesetsRequestData.
Returns
getBranch()
Get a single branch hierarchy at the given path with parents or children (if specified)
Syntax
IPromise<TFS_VersionControl_Contracts.TfvcBranch> getBranch(path, project, includeParent, includeChildren)
Parameters
path
: string.project
: string. Optional.includeParent
: boolean. Optional.includeChildren
: boolean. Optional.
Returns
getBranches()
Get a collection of branch roots -- first-level children, branches with no parents
Syntax
IPromise<TFS_VersionControl_Contracts.TfvcBranch[]> getBranches(project, includeParent, includeChildren, includeDeleted, includeLinks)
Parameters
project
: string. Optional. Project ID or project nameincludeParent
: boolean. Optional.includeChildren
: boolean. Optional.includeDeleted
: boolean. Optional.includeLinks
: boolean. Optional.
Returns
getBranchRefs()
Get branch hierarchies below the specified scopePath
Syntax
IPromise<TFS_VersionControl_Contracts.TfvcBranchRef[]> getBranchRefs(scopePath, project, includeDeleted, includeLinks)
Parameters
scopePath
: string.project
: string. Optional.includeDeleted
: boolean. Optional.includeLinks
: boolean. Optional.
Returns
getChangeset()
Retrieve a Tfvc Changeset
Syntax
IPromise<TFS_VersionControl_Contracts.TfvcChangeset> getChangeset(id, project, maxChangeCount, includeDetails, includeWorkItems, maxCommentLength, includeSourceRename, skip, top, orderby, searchCriteria)
Parameters
id
: number.project
: string. Optional.maxChangeCount
: number. Optional.includeDetails
: boolean. Optional.includeWorkItems
: boolean. Optional.maxCommentLength
: number. Optional.includeSourceRename
: boolean. Optional.skip
: number. Optional.top
: number. Optional.orderby
: string. Optional.searchCriteria
: TFS_VersionControl_Contracts.TfvcChangesetSearchCriteria. Optional.
Returns
getChangesetChanges()
Retrieve Tfvc changes for a given changeset
Syntax
IPromise<TFS_VersionControl_Contracts.TfvcChange[]> getChangesetChanges(id, skip, top)
Parameters
id
: number. Optional.skip
: number. Optional.top
: number. Optional.
Returns
getChangesets()
Retrieve Tfvc changesets
Syntax
IPromise<TFS_VersionControl_Contracts.TfvcChangesetRef[]> getChangesets(project, maxChangeCount, includeDetails, includeWorkItems, maxCommentLength, includeSourceRename, skip, top, orderby, searchCriteria)
Parameters
project
: string. Optional. Project ID or project namemaxChangeCount
: number. Optional.includeDetails
: boolean. Optional.includeWorkItems
: boolean. Optional.maxCommentLength
: number. Optional.includeSourceRename
: boolean. Optional.skip
: number. Optional.top
: number. Optional.orderby
: string. Optional.searchCriteria
: TFS_VersionControl_Contracts.TfvcChangesetSearchCriteria. Optional.
Returns
getChangesetWorkItems()
Syntax
IPromise<TFS_VersionControl_Contracts.AssociatedWorkItem[]> getChangesetWorkItems(id)
Parameters
id
: number. Optional.
Returns
getItem()
Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
Syntax
IPromise<TFS_VersionControl_Contracts.TfvcItem> getItem(path, project, fileName, download, scopePath, recursionLevel, versionDescriptor)
Parameters
path
: string.project
: string. Optional.fileName
: string. Optional.download
: boolean. Optional.scopePath
: string. Optional.recursionLevel
: TFS_VersionControl_Contracts.VersionControlRecursionType. Optional.versionDescriptor
: TFS_VersionControl_Contracts.TfvcVersionDescriptor. Optional.
Returns
getItemContent()
Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
Syntax
IPromise<ArrayBuffer> getItemContent(path, project, fileName, download, scopePath, recursionLevel, versionDescriptor)
Parameters
path
: string.project
: string. Optional.fileName
: string. Optional.download
: boolean. Optional.scopePath
: string. Optional.recursionLevel
: TFS_VersionControl_Contracts.VersionControlRecursionType. Optional.versionDescriptor
: TFS_VersionControl_Contracts.TfvcVersionDescriptor. Optional.
Returns
- IPromise<ArrayBuffer>
getItems()
Get a list of Tfvc items
Syntax
IPromise<TFS_VersionControl_Contracts.TfvcItem[]> getItems(project, scopePath, recursionLevel, includeLinks, versionDescriptor)
Parameters
project
: string. Optional. Project ID or project namescopePath
: string. Optional.recursionLevel
: TFS_VersionControl_Contracts.VersionControlRecursionType. Optional.includeLinks
: boolean. Optional.versionDescriptor
: TFS_VersionControl_Contracts.TfvcVersionDescriptor. Optional.
Returns
getItemsBatch()
Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path.
Syntax
IPromise<TFS_VersionControl_Contracts.TfvcItem[][]> getItemsBatch(itemRequestData, project)
Parameters
itemRequestData
: TFS_VersionControl_Contracts.TfvcItemRequestData.project
: string. Optional.
Returns
getItemsBatchZip()
Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path.
Syntax
IPromise<ArrayBuffer> getItemsBatchZip(itemRequestData, project)
Parameters
itemRequestData
: TFS_VersionControl_Contracts.TfvcItemRequestData.project
: string. Optional.
Returns
- IPromise<ArrayBuffer>
getItemText()
Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
Syntax
IPromise<string> getItemText(path, project, fileName, download, scopePath, recursionLevel, versionDescriptor)
Parameters
path
: string.project
: string. Optional.fileName
: string. Optional.download
: boolean. Optional.scopePath
: string. Optional.recursionLevel
: TFS_VersionControl_Contracts.VersionControlRecursionType. Optional.versionDescriptor
: TFS_VersionControl_Contracts.TfvcVersionDescriptor. Optional.
Returns
- IPromise<string>
getItemZip()
Get Item Metadata and/or Content. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download.
Syntax
IPromise<ArrayBuffer> getItemZip(path, project, fileName, download, scopePath, recursionLevel, versionDescriptor)
Parameters
path
: string.project
: string. Optional.fileName
: string. Optional.download
: boolean. Optional.scopePath
: string. Optional.recursionLevel
: TFS_VersionControl_Contracts.VersionControlRecursionType. Optional.versionDescriptor
: TFS_VersionControl_Contracts.TfvcVersionDescriptor. Optional.
Returns
- IPromise<ArrayBuffer>
getLabel()
Get a single deep label.
Syntax
IPromise<TFS_VersionControl_Contracts.TfvcLabel> getLabel(labelId, requestData, project)
Parameters
labelId
: string. Unique identifier of labelrequestData
: TFS_VersionControl_Contracts.TfvcLabelRequestData. maxItemCountproject
: string. Optional. Project ID or project name
Returns
getLabelItems()
Get items under a label.
Syntax
IPromise<TFS_VersionControl_Contracts.TfvcItem[]> getLabelItems(labelId, top, skip)
Parameters
labelId
: string. Unique identifier of labeltop
: number. Optional. Max number of items to returnskip
: number. Optional. Number of items to skip
Returns
getLabels()
Get a collection of shallow label references.
Syntax
IPromise<TFS_VersionControl_Contracts.TfvcLabelRef[]> getLabels(requestData, project, top, skip)
Parameters
requestData
: TFS_VersionControl_Contracts.TfvcLabelRequestData. labelScope, name, owner, and itemLabelFilterproject
: string. Optional. Project ID or project nametop
: number. Optional. Max number of labels to returnskip
: number. Optional. Number of labels to skip
Returns
getProjectInfo()
[Obsolete - Use the Projects API instead] Retrieve the version control information for a given Project
Syntax
IPromise<TFS_VersionControl_Contracts.VersionControlProjectInfo> getProjectInfo(projectId, project)
Parameters
projectId
: string. The ID (or name) of the projectproject
: string. Optional. Project ID or project name
Returns
getProjectInfos()
[Obsolete - Use the Projects API instead]
Syntax
IPromise<TFS_VersionControl_Contracts.VersionControlProjectInfo[]> getProjectInfos(project)
Parameters
project
: string. Optional. Project ID or project name
Returns
getShelveset()
Get a single deep shelveset.
Syntax
IPromise<TFS_VersionControl_Contracts.TfvcShelveset> getShelveset(shelvesetId, requestData)
Parameters
shelvesetId
: string. Shelveset's unique IDrequestData
: TFS_VersionControl_Contracts.TfvcShelvesetRequestData. includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength
Returns
getShelvesetChanges()
Get changes included in a shelveset.
Syntax
IPromise<TFS_VersionControl_Contracts.TfvcChange[]> getShelvesetChanges(shelvesetId, top, skip)
Parameters
shelvesetId
: string. Shelveset's unique IDtop
: number. Optional. Max number of changes to returnskip
: number. Optional. Number of changes to skip
Returns
getShelvesets()
Return a collection of shallow shelveset references.
Syntax
IPromise<TFS_VersionControl_Contracts.TfvcShelvesetRef[]> getShelvesets(requestData, top, skip)
Parameters
requestData
: TFS_VersionControl_Contracts.TfvcShelvesetRequestData. name, owner, and maxCommentLengthtop
: number. Optional. Max number of shelvesets to returnskip
: number. Optional. Number of shelvesets to skip
Returns
getShelvesetWorkItems()
Get work items associated with a shelveset.
Syntax
IPromise<TFS_VersionControl_Contracts.AssociatedWorkItem[]> getShelvesetWorkItems(shelvesetId)
Parameters
shelvesetId
: string. Shelveset's unique ID