WorkRestClient class

Base class that should be used (derived from) to make requests to VSS REST apis

Extends

Constructors

WorkRestClient(IVssRestClientOptions)

Properties

RESOURCE_AREA_ID

Methods

createPlan(CreatePlan, string)

Add a new plan for the team

deletePlan(string, string)

Delete the specified plan

deleteTeamIteration(TeamContext, string)

Delete a team's iteration by iterationId

getBacklog(TeamContext, string)

Get a backlog level

getBacklogConfigurations(TeamContext)

Gets backlog configuration for a team

getBacklogLevelWorkItems(TeamContext, string)

Get a list of work items within a backlog level

getBacklogs(TeamContext)

List all backlog levels

getBoard(TeamContext, string)

Get board

getBoardBadge(TeamContext, string, BoardBadgeColumnOptions, string[])

Gets a badge that displays the status of columns on the board.

getBoardBadgeData(TeamContext, string, BoardBadgeColumnOptions, string[])

Gets a badge that displays the status of columns on the board.

getBoardCardRuleSettings(TeamContext, string)

Get board card Rule settings for the board id or board by name

getBoardCardSettings(TeamContext, string)

Get board card settings for the board id or board by name

getBoardChart(TeamContext, string, string)

Get a board chart

getBoardCharts(TeamContext, string)

Get board charts

getBoardColumns(TeamContext, string)

Get columns on a board

getBoardMappingParentItems(TeamContext, string, number[])

Returns the list of parent field filter model for the given list of workitem ids

getBoardRows(TeamContext, string)

Get rows on a board

getBoards(TeamContext)

Get boards

getBoardUserSettings(TeamContext, string)

Get board user settings for a board id

getCapacitiesWithIdentityRefAndTotals(TeamContext, string)

Get a team's capacity including total capacity and days off

getCapacityWithIdentityRef(TeamContext, string, string)

Get a team member's capacity

getColumns(TeamContext)
getColumnSuggestedValues(string)

Get available board columns in a project

getDeliveryTimelineData(string, string, number, Date, Date)

Get Delivery View Data

getIterationWorkItems(TeamContext, string)

Get work items for iteration

getPlan(string, string)

Get the information for the specified plan

getPlans(string)

Get the information for all the plans configured for the given team

getProcessConfiguration(string)

Get process configuration

getRowSuggestedValues(string)

Get available board rows in a project

getTeamDaysOff(TeamContext, string)

Get team's days off for an iteration

getTeamFieldValues(TeamContext)

Get a collection of team field values

getTeamIteration(TeamContext, string)

Get team's iteration by iterationId

getTeamIterations(TeamContext, string)

Get a team's iterations using timeframe filter

getTeamSettings(TeamContext)

Get a team's settings

getTotalIterationCapacities(string, string)

Get an iteration's capacity for all teams in iteration

getWorkItemColumns(TeamContext, string)
postTeamIteration(TeamSettingsIteration, TeamContext)

Add an iteration to the team

reorderBacklogWorkItems(ReorderOperation, TeamContext)

Reorder Product Backlog/Boards Work Items

reorderIterationWorkItems(ReorderOperation, TeamContext, string)

Reorder Sprint Backlog/Taskboard Work Items

replaceCapacitiesWithIdentityRef(TeamMemberCapacityIdentityRef[], TeamContext, string)

Replace a team's capacity

setBoardOptions({[key: string]: string}, TeamContext, string)

Update board options

updateAutomationRule(TeamAutomationRulesSettingsRequestModel, TeamContext)

Creates/updates an automation rules settings

updateBoardCardRuleSettings(BoardCardRuleSettings, TeamContext, string)

Update board card Rule settings for the board id or board by name

updateBoardCardSettings(BoardCardSettings, TeamContext, string)

Update board card settings for the board id or board by name

updateBoardChart(BoardChart, TeamContext, string, string)

Update a board chart

updateBoardColumns(BoardColumn[], TeamContext, string)

Update columns on a board

updateBoardRows(BoardRow[], TeamContext, string)

Update rows on a board

updateBoardUserSettings({[key: string]: string}, TeamContext, string)

Update board user settings for the board id

updateCapacityWithIdentityRef(CapacityPatch, TeamContext, string, string)

Update a team member's capacity

updateColumns(UpdateTaskboardColumn[], TeamContext)
updatePlan(UpdatePlan, string, string)

Update the information for the specified plan

updateTaskboardCardRuleSettings(BoardCardRuleSettings, TeamContext)

Update taskboard card Rule settings

updateTaskboardCardSettings(BoardCardSettings, TeamContext)

Update taskboard card settings

updateTeamDaysOff(TeamSettingsDaysOffPatch, TeamContext, string)

Set a team's days off for an iteration

updateTeamFieldValues(TeamFieldValuesPatch, TeamContext)

Update team field values

updateTeamSettings(TeamSettingsPatch, TeamContext)

Update a team's settings

updateWorkItemColumn(UpdateTaskboardWorkItemColumn, TeamContext, string, number)

Constructor Details

WorkRestClient(IVssRestClientOptions)

new WorkRestClient(options: IVssRestClientOptions)

Parameters

Property Details

RESOURCE_AREA_ID

static RESOURCE_AREA_ID: string

Property Value

string

Method Details

createPlan(CreatePlan, string)

Add a new plan for the team

function createPlan(postedPlan: CreatePlan, project: string): Promise<Plan>

Parameters

postedPlan
CreatePlan

Plan definition

project

string

Project ID or project name

Returns

Promise<Plan>

deletePlan(string, string)

Delete the specified plan

function deletePlan(project: string, id: string): Promise<void>

Parameters

project

string

Project ID or project name

id

string

Identifier of the plan

Returns

Promise<void>

deleteTeamIteration(TeamContext, string)

Delete a team's iteration by iterationId

function deleteTeamIteration(teamContext: TeamContext, id: string): Promise<void>

Parameters

teamContext
TeamContext

The team context for the operation

id

string

ID of the iteration

Returns

Promise<void>

getBacklog(TeamContext, string)

Get a backlog level

function getBacklog(teamContext: TeamContext, id: string): Promise<BacklogLevelConfiguration>

Parameters

teamContext
TeamContext

The team context for the operation

id

string

The id of the backlog level

Returns

getBacklogConfigurations(TeamContext)

Gets backlog configuration for a team

function getBacklogConfigurations(teamContext: TeamContext): Promise<BacklogConfiguration>

Parameters

teamContext
TeamContext

The team context for the operation

Returns

getBacklogLevelWorkItems(TeamContext, string)

Get a list of work items within a backlog level

function getBacklogLevelWorkItems(teamContext: TeamContext, backlogId: string): Promise<BacklogLevelWorkItems>

Parameters

teamContext
TeamContext

The team context for the operation

backlogId

string

Returns

getBacklogs(TeamContext)

List all backlog levels

function getBacklogs(teamContext: TeamContext): Promise<BacklogLevelConfiguration[]>

Parameters

teamContext
TeamContext

The team context for the operation

Returns

getBoard(TeamContext, string)

Get board

function getBoard(teamContext: TeamContext, id: string): Promise<Board>

Parameters

teamContext
TeamContext

The team context for the operation

id

string

identifier for board, either board's backlog level name (Eg:"Stories") or Id

Returns

Promise<Board>

getBoardBadge(TeamContext, string, BoardBadgeColumnOptions, string[])

Gets a badge that displays the status of columns on the board.

function getBoardBadge(teamContext: TeamContext, id: string, columnOptions?: BoardBadgeColumnOptions, columns?: string[]): Promise<BoardBadge>

Parameters

teamContext
TeamContext

The team context for the operation

id

string

The id of the board.

columnOptions
BoardBadgeColumnOptions

Determines what columns to show.

columns

string[]

If columnOptions is set to custom, specify the list of column names.

Returns

Promise<BoardBadge>

getBoardBadgeData(TeamContext, string, BoardBadgeColumnOptions, string[])

Gets a badge that displays the status of columns on the board.

function getBoardBadgeData(teamContext: TeamContext, id: string, columnOptions?: BoardBadgeColumnOptions, columns?: string[]): Promise<string>

Parameters

teamContext
TeamContext

The team context for the operation

id

string

The id of the board.

columnOptions
BoardBadgeColumnOptions

Determines what columns to show.

columns

string[]

If columnOptions is set to custom, specify the list of column names.

Returns

Promise<string>

getBoardCardRuleSettings(TeamContext, string)

Get board card Rule settings for the board id or board by name

function getBoardCardRuleSettings(teamContext: TeamContext, board: string): Promise<BoardCardRuleSettings>

Parameters

teamContext
TeamContext

The team context for the operation

board

string

Returns

getBoardCardSettings(TeamContext, string)

Get board card settings for the board id or board by name

function getBoardCardSettings(teamContext: TeamContext, board: string): Promise<BoardCardSettings>

Parameters

teamContext
TeamContext

The team context for the operation

board

string

Returns

getBoardChart(TeamContext, string, string)

Get a board chart

function getBoardChart(teamContext: TeamContext, board: string, name: string): Promise<BoardChart>

Parameters

teamContext
TeamContext

The team context for the operation

board

string

Identifier for board, either board's backlog level name (Eg:"Stories") or Id

name

string

The chart name

Returns

Promise<BoardChart>

getBoardCharts(TeamContext, string)

Get board charts

function getBoardCharts(teamContext: TeamContext, board: string): Promise<BoardChartReference[]>

Parameters

teamContext
TeamContext

The team context for the operation

board

string

Identifier for board, either board's backlog level name (Eg:"Stories") or Id

Returns

Promise<BoardChartReference[]>

getBoardColumns(TeamContext, string)

Get columns on a board

function getBoardColumns(teamContext: TeamContext, board: string): Promise<BoardColumn[]>

Parameters

teamContext
TeamContext

The team context for the operation

board

string

Name or ID of the specific board

Returns

Promise<BoardColumn[]>

getBoardMappingParentItems(TeamContext, string, number[])

Returns the list of parent field filter model for the given list of workitem ids

function getBoardMappingParentItems(teamContext: TeamContext, childBacklogContextCategoryRefName: string, workitemIds: number[]): Promise<ParentChildWIMap[]>

Parameters

teamContext
TeamContext

The team context for the operation

childBacklogContextCategoryRefName

string

workitemIds

number[]

Returns

Promise<ParentChildWIMap[]>

getBoardRows(TeamContext, string)

Get rows on a board

function getBoardRows(teamContext: TeamContext, board: string): Promise<BoardRow[]>

Parameters

teamContext
TeamContext

The team context for the operation

board

string

Name or ID of the specific board

Returns

Promise<BoardRow[]>

getBoards(TeamContext)

Get boards

function getBoards(teamContext: TeamContext): Promise<BoardReference[]>

Parameters

teamContext
TeamContext

The team context for the operation

Returns

Promise<BoardReference[]>

getBoardUserSettings(TeamContext, string)

Get board user settings for a board id

function getBoardUserSettings(teamContext: TeamContext, board: string): Promise<BoardUserSettings>

Parameters

teamContext
TeamContext

The team context for the operation

board

string

Board ID or Name

Returns

getCapacitiesWithIdentityRefAndTotals(TeamContext, string)

Get a team's capacity including total capacity and days off

function getCapacitiesWithIdentityRefAndTotals(teamContext: TeamContext, iterationId: string): Promise<TeamCapacity>

Parameters

teamContext
TeamContext

The team context for the operation

iterationId

string

ID of the iteration

Returns

Promise<TeamCapacity>

getCapacityWithIdentityRef(TeamContext, string, string)

Get a team member's capacity

function getCapacityWithIdentityRef(teamContext: TeamContext, iterationId: string, teamMemberId: string): Promise<TeamMemberCapacityIdentityRef>

Parameters

teamContext
TeamContext

The team context for the operation

iterationId

string

ID of the iteration

teamMemberId

string

ID of the team member

Returns

getColumns(TeamContext)

function getColumns(teamContext: TeamContext): Promise<TaskboardColumns>

Parameters

teamContext
TeamContext

The team context for the operation

Returns

Promise<TaskboardColumns>

getColumnSuggestedValues(string)

Get available board columns in a project

function getColumnSuggestedValues(project?: string): Promise<BoardSuggestedValue[]>

Parameters

project

string

Project ID or project name

Returns

Promise<BoardSuggestedValue[]>

getDeliveryTimelineData(string, string, number, Date, Date)

Get Delivery View Data

function getDeliveryTimelineData(project: string, id: string, revision?: number, startDate?: Date, endDate?: Date): Promise<DeliveryViewData>

Parameters

project

string

Project ID or project name

id

string

Identifier for delivery view

revision

number

Revision of the plan for which you want data. If the current plan is a different revision you will get an ViewRevisionMismatchException exception. If you do not supply a revision you will get data for the latest revision.

startDate

Date

The start date of timeline

endDate

Date

The end date of timeline

Returns

Promise<DeliveryViewData>

getIterationWorkItems(TeamContext, string)

Get work items for iteration

function getIterationWorkItems(teamContext: TeamContext, iterationId: string): Promise<IterationWorkItems>

Parameters

teamContext
TeamContext

The team context for the operation

iterationId

string

ID of the iteration

Returns

getPlan(string, string)

Get the information for the specified plan

function getPlan(project: string, id: string): Promise<Plan>

Parameters

project

string

Project ID or project name

id

string

Identifier of the plan

Returns

Promise<Plan>

getPlans(string)

Get the information for all the plans configured for the given team

function getPlans(project: string): Promise<Plan[]>

Parameters

project

string

Project ID or project name

Returns

Promise<Plan[]>

getProcessConfiguration(string)

Get process configuration

function getProcessConfiguration(project: string): Promise<ProcessConfiguration>

Parameters

project

string

Project ID or project name

Returns

getRowSuggestedValues(string)

Get available board rows in a project

function getRowSuggestedValues(project?: string): Promise<BoardSuggestedValue[]>

Parameters

project

string

Project ID or project name

Returns

Promise<BoardSuggestedValue[]>

getTeamDaysOff(TeamContext, string)

Get team's days off for an iteration

function getTeamDaysOff(teamContext: TeamContext, iterationId: string): Promise<TeamSettingsDaysOff>

Parameters

teamContext
TeamContext

The team context for the operation

iterationId

string

ID of the iteration

Returns

getTeamFieldValues(TeamContext)

Get a collection of team field values

function getTeamFieldValues(teamContext: TeamContext): Promise<TeamFieldValues>

Parameters

teamContext
TeamContext

The team context for the operation

Returns

Promise<TeamFieldValues>

getTeamIteration(TeamContext, string)

Get team's iteration by iterationId

function getTeamIteration(teamContext: TeamContext, id: string): Promise<TeamSettingsIteration>

Parameters

teamContext
TeamContext

The team context for the operation

id

string

ID of the iteration

Returns

getTeamIterations(TeamContext, string)

Get a team's iterations using timeframe filter

function getTeamIterations(teamContext: TeamContext, timeframe?: string): Promise<TeamSettingsIteration[]>

Parameters

teamContext
TeamContext

The team context for the operation

timeframe

string

A filter for which iterations are returned based on relative time. Only Current is supported currently.

Returns

getTeamSettings(TeamContext)

Get a team's settings

function getTeamSettings(teamContext: TeamContext): Promise<TeamSetting>

Parameters

teamContext
TeamContext

The team context for the operation

Returns

Promise<TeamSetting>

getTotalIterationCapacities(string, string)

Get an iteration's capacity for all teams in iteration

function getTotalIterationCapacities(project: string, iterationId: string): Promise<IterationCapacity>

Parameters

project

string

Project ID or project name

iterationId

string

ID of the iteration

Returns

getWorkItemColumns(TeamContext, string)

function getWorkItemColumns(teamContext: TeamContext, iterationId: string): Promise<TaskboardWorkItemColumn[]>

Parameters

teamContext
TeamContext

The team context for the operation

iterationId

string

Returns

postTeamIteration(TeamSettingsIteration, TeamContext)

Add an iteration to the team

function postTeamIteration(iteration: TeamSettingsIteration, teamContext: TeamContext): Promise<TeamSettingsIteration>

Parameters

iteration
TeamSettingsIteration

Iteration to add

teamContext
TeamContext

The team context for the operation

Returns

reorderBacklogWorkItems(ReorderOperation, TeamContext)

Reorder Product Backlog/Boards Work Items

function reorderBacklogWorkItems(operation: ReorderOperation, teamContext: TeamContext): Promise<ReorderResult[]>

Parameters

operation
ReorderOperation
teamContext
TeamContext

The team context for the operation

Returns

Promise<ReorderResult[]>

reorderIterationWorkItems(ReorderOperation, TeamContext, string)

Reorder Sprint Backlog/Taskboard Work Items

function reorderIterationWorkItems(operation: ReorderOperation, teamContext: TeamContext, iterationId: string): Promise<ReorderResult[]>

Parameters

operation
ReorderOperation
teamContext
TeamContext

The team context for the operation

iterationId

string

The id of the iteration

Returns

Promise<ReorderResult[]>

replaceCapacitiesWithIdentityRef(TeamMemberCapacityIdentityRef[], TeamContext, string)

Replace a team's capacity

function replaceCapacitiesWithIdentityRef(capacities: TeamMemberCapacityIdentityRef[], teamContext: TeamContext, iterationId: string): Promise<TeamMemberCapacityIdentityRef[]>

Parameters

capacities

TeamMemberCapacityIdentityRef[]

Team capacity to replace

teamContext
TeamContext

The team context for the operation

iterationId

string

ID of the iteration

Returns

setBoardOptions({[key: string]: string}, TeamContext, string)

Update board options

function setBoardOptions(options: {[key: string]: string}, teamContext: TeamContext, id: string): Promise<{[key: string]: string}>

Parameters

options

{[key: string]: string}

options to updated

teamContext
TeamContext

The team context for the operation

id

string

identifier for board, either category plural name (Eg:"Stories") or guid

Returns

Promise<{[key: string]: string}>

updateAutomationRule(TeamAutomationRulesSettingsRequestModel, TeamContext)

Creates/updates an automation rules settings

function updateAutomationRule(ruleRequestModel: TeamAutomationRulesSettingsRequestModel, teamContext: TeamContext): Promise<void>

Parameters

ruleRequestModel
TeamAutomationRulesSettingsRequestModel

Required parameters to create/update an automation rules settings

teamContext
TeamContext

The team context for the operation

Returns

Promise<void>

updateBoardCardRuleSettings(BoardCardRuleSettings, TeamContext, string)

Update board card Rule settings for the board id or board by name

function updateBoardCardRuleSettings(boardCardRuleSettings: BoardCardRuleSettings, teamContext: TeamContext, board: string): Promise<BoardCardRuleSettings>

Parameters

boardCardRuleSettings
BoardCardRuleSettings
teamContext
TeamContext

The team context for the operation

board

string

Returns

updateBoardCardSettings(BoardCardSettings, TeamContext, string)

Update board card settings for the board id or board by name

function updateBoardCardSettings(boardCardSettingsToSave: BoardCardSettings, teamContext: TeamContext, board: string): Promise<BoardCardSettings>

Parameters

boardCardSettingsToSave
BoardCardSettings
teamContext
TeamContext

The team context for the operation

board

string

Returns

updateBoardChart(BoardChart, TeamContext, string, string)

Update a board chart

function updateBoardChart(chart: BoardChart, teamContext: TeamContext, board: string, name: string): Promise<BoardChart>

Parameters

chart
BoardChart
teamContext
TeamContext

The team context for the operation

board

string

Identifier for board, either board's backlog level name (Eg:"Stories") or Id

name

string

The chart name

Returns

Promise<BoardChart>

updateBoardColumns(BoardColumn[], TeamContext, string)

Update columns on a board

function updateBoardColumns(boardColumns: BoardColumn[], teamContext: TeamContext, board: string): Promise<BoardColumn[]>

Parameters

boardColumns

BoardColumn[]

List of board columns to update

teamContext
TeamContext

The team context for the operation

board

string

Name or ID of the specific board

Returns

Promise<BoardColumn[]>

updateBoardRows(BoardRow[], TeamContext, string)

Update rows on a board

function updateBoardRows(boardRows: BoardRow[], teamContext: TeamContext, board: string): Promise<BoardRow[]>

Parameters

boardRows

BoardRow[]

List of board rows to update

teamContext
TeamContext

The team context for the operation

board

string

Name or ID of the specific board

Returns

Promise<BoardRow[]>

updateBoardUserSettings({[key: string]: string}, TeamContext, string)

Update board user settings for the board id

function updateBoardUserSettings(boardUserSettings: {[key: string]: string}, teamContext: TeamContext, board: string): Promise<BoardUserSettings>

Parameters

boardUserSettings

{[key: string]: string}

teamContext
TeamContext

The team context for the operation

board

string

Returns

updateCapacityWithIdentityRef(CapacityPatch, TeamContext, string, string)

Update a team member's capacity

function updateCapacityWithIdentityRef(patch: CapacityPatch, teamContext: TeamContext, iterationId: string, teamMemberId: string): Promise<TeamMemberCapacityIdentityRef>

Parameters

patch
CapacityPatch

Updated capacity

teamContext
TeamContext

The team context for the operation

iterationId

string

ID of the iteration

teamMemberId

string

ID of the team member

Returns

updateColumns(UpdateTaskboardColumn[], TeamContext)

function updateColumns(updateColumns: UpdateTaskboardColumn[], teamContext: TeamContext): Promise<TaskboardColumns>

Parameters

updateColumns

UpdateTaskboardColumn[]

teamContext
TeamContext

The team context for the operation

Returns

Promise<TaskboardColumns>

updatePlan(UpdatePlan, string, string)

Update the information for the specified plan

function updatePlan(updatedPlan: UpdatePlan, project: string, id: string): Promise<Plan>

Parameters

updatedPlan
UpdatePlan

Plan definition to be updated

project

string

Project ID or project name

id

string

Identifier of the plan

Returns

Promise<Plan>

updateTaskboardCardRuleSettings(BoardCardRuleSettings, TeamContext)

Update taskboard card Rule settings

function updateTaskboardCardRuleSettings(boardCardRuleSettings: BoardCardRuleSettings, teamContext: TeamContext): Promise<void>

Parameters

boardCardRuleSettings
BoardCardRuleSettings
teamContext
TeamContext

The team context for the operation

Returns

Promise<void>

updateTaskboardCardSettings(BoardCardSettings, TeamContext)

Update taskboard card settings

function updateTaskboardCardSettings(boardCardSettingsToSave: BoardCardSettings, teamContext: TeamContext): Promise<void>

Parameters

boardCardSettingsToSave
BoardCardSettings
teamContext
TeamContext

The team context for the operation

Returns

Promise<void>

updateTeamDaysOff(TeamSettingsDaysOffPatch, TeamContext, string)

Set a team's days off for an iteration

function updateTeamDaysOff(daysOffPatch: TeamSettingsDaysOffPatch, teamContext: TeamContext, iterationId: string): Promise<TeamSettingsDaysOff>

Parameters

daysOffPatch
TeamSettingsDaysOffPatch

Team's days off patch containing a list of start and end dates

teamContext
TeamContext

The team context for the operation

iterationId

string

ID of the iteration

Returns

updateTeamFieldValues(TeamFieldValuesPatch, TeamContext)

Update team field values

function updateTeamFieldValues(patch: TeamFieldValuesPatch, teamContext: TeamContext): Promise<TeamFieldValues>

Parameters

teamContext
TeamContext

The team context for the operation

Returns

Promise<TeamFieldValues>

updateTeamSettings(TeamSettingsPatch, TeamContext)

Update a team's settings

function updateTeamSettings(teamSettingsPatch: TeamSettingsPatch, teamContext: TeamContext): Promise<TeamSetting>

Parameters

teamSettingsPatch
TeamSettingsPatch

TeamSettings changes

teamContext
TeamContext

The team context for the operation

Returns

Promise<TeamSetting>

updateWorkItemColumn(UpdateTaskboardWorkItemColumn, TeamContext, string, number)

function updateWorkItemColumn(updateColumn: UpdateTaskboardWorkItemColumn, teamContext: TeamContext, iterationId: string, workItemId: number): Promise<void>

Parameters

teamContext
TeamContext

The team context for the operation

iterationId

string

workItemId

number

Returns

Promise<void>