Last Update: 9/26/2016

CoreHttpClient2_1

This API is in private preview and subject to change.

Module path: TFS/Core/RestClient

Initialization sample

  import RestClient = require("TFS/Core/RestClient");

  // Get an instance of the client
  var client = RestClient.getClient();

  // Call a method on the client
  // e.g. client.getResource(...).then(...);

Methods

createTeam()

Creates a team

Syntax

 IPromise<Contracts.WebApiTeam> createTeam(team, projectId)

Parameters

  • team: Contracts.WebApiTeam. The team data used to create the team.
  • projectId: string. The name or ID (GUID) of the team project in which to create the team.

Returns

deleteTeam()

Deletes a team

Syntax

 IPromise<void> deleteTeam(projectId, teamId)

Parameters

  • projectId: string. The name or ID (GUID) of the team project containing the team to delete.
  • teamId: string. The name of ID of the team to delete.

Returns

getProcessById()

Retrieve process by id

Syntax

 IPromise<Contracts.Process> getProcessById(processId)

Parameters

  • processId: string.

Returns

getProcesses()

Syntax

 IPromise<Contracts.Process[]> getProcesses()

Parameters

Returns

getProject()

Get project with the specified ID or name, optionally including capabilities.

Syntax

 IPromise<Contracts.TeamProject> getProject(projectId, includeCapabilities, includeHistory)

Parameters

  • projectId: string.
  • includeCapabilities: boolean. Optional.
  • includeHistory: boolean. Optional.

Returns

getProjectCollection()

Get project collection with the specified ID or name.

Syntax

 IPromise<Contracts.TeamProjectCollection> getProjectCollection(collectionId)

Parameters

  • collectionId: string.

Returns

getProjectCollections()

Get project collection references for this application.

Syntax

 IPromise<Contracts.TeamProjectCollectionReference[]> getProjectCollections(top, skip)

Parameters

  • top: number. Optional.
  • skip: number. Optional.

Returns

getProjects()

Get project references with the specified state

Syntax

 IPromise<Contracts.TeamProjectReference[]> getProjects(stateFilter, top, skip)

Parameters

  • stateFilter: any. Optional. Filter on team projects in a specific team project state (default: WellFormed).
  • top: number. Optional.
  • skip: number. Optional.

Returns

getTeam()

Gets a team

Syntax

 IPromise<Contracts.WebApiTeam> getTeam(projectId, teamId)

Parameters

  • projectId: string.
  • teamId: string.

Returns

getTeamMembers()

Syntax

 IPromise<VSS_Common_Contracts.IdentityRef[]> getTeamMembers(projectId, teamId, top, skip)

Parameters

  • projectId: string.
  • teamId: string.
  • top: number. Optional.
  • skip: number. Optional.

Returns

getTeams()

Syntax

 IPromise<Contracts.WebApiTeam[]> getTeams(projectId, top, skip)

Parameters

  • projectId: string.
  • top: number. Optional.
  • skip: number. Optional.

Returns

queueCreateProject()

Queue a project creation.

Syntax

 IPromise<VSS_Operations_Contracts.OperationReference> queueCreateProject(projectToCreate)

Parameters

Returns

queueDeleteProject()

Queue a project deletion.

Syntax

 IPromise<VSS_Operations_Contracts.OperationReference> queueDeleteProject(projectId)

Parameters

  • projectId: string. The project ID of the project to delete.

Returns

updateProject()

Update an existing project's name, abbreviation, or description.

Syntax

 IPromise<VSS_Operations_Contracts.OperationReference> updateProject(projectUpdate, projectId)

Parameters

  • projectUpdate: Contracts.TeamProject. The updates for the project.
  • projectId: string. The project ID of the project to update.

Returns

updateTeam()

Updates a team's name and/or description

Syntax

 IPromise<Contracts.WebApiTeam> updateTeam(teamData, projectId, teamId)

Parameters

Returns