WorkRestClient class
Base class that should be used (derived from) to make requests to VSS REST apis
- Extends
public static RESOURCE_AREA_ID: "1d4f49f9-02b9-4e26-b826-2cdb6195f2a9" = "1d4f49f9-02b9-4e26-b826-2cdb6195f2a9"
Property Value
"1d4f49f9-02b9-4e26-b826-2cdb6195f2a9"
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>
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>
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>
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
Promise<BacklogLevelConfiguration>
Gets backlog configuration for a team
function getBacklogConfigurations(teamContext: TeamContext): Promise<BacklogConfiguration>
Parameters
- teamContext
- TeamContext
The team context for the operation
Returns
Promise<BacklogConfiguration>
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
Promise<BacklogLevelWorkItems>
List all backlog levels
function getBacklogs(teamContext: TeamContext): Promise<BacklogLevelConfiguration[]>
Parameters
- teamContext
- TeamContext
The team context for the operation
Returns
Promise<BacklogLevelConfiguration[]>
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>
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>
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>
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
Promise<BoardCardRuleSettings>
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
Promise<BoardCardSettings>
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>
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[]>
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[]>
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[]>
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[]>
Get boards
function getBoards(teamContext: TeamContext): Promise<BoardReference[]>
Parameters
- teamContext
- TeamContext
The team context for the operation
Returns
Promise<BoardReference[]>
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
Promise<BoardUserSettings>
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>
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
Promise<TeamMemberCapacityIdentityRef>
function getColumns(teamContext: TeamContext): Promise<TaskboardColumns>
Parameters
- teamContext
- TeamContext
The team context for the operation
Returns
Promise<TaskboardColumns>
Get available board columns in a project
function getColumnSuggestedValues(project?: string): Promise<BoardSuggestedValue[]>
Parameters
- project
-
string
Project ID or project name
Returns
Promise<BoardSuggestedValue[]>
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>
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
Promise<IterationWorkItems>
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>
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[]>
Get process configuration
function getProcessConfiguration(project: string): Promise<ProcessConfiguration>
Parameters
- project
-
string
Project ID or project name
Returns
Promise<ProcessConfiguration>
Get available board rows in a project
function getRowSuggestedValues(project?: string): Promise<BoardSuggestedValue[]>
Parameters
- project
-
string
Project ID or project name
Returns
Promise<BoardSuggestedValue[]>
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
Promise<TeamSettingsDaysOff>
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>
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
Promise<TeamSettingsIteration>
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
Promise<TeamSettingsIteration[]>
Get a team's settings
function getTeamSettings(teamContext: TeamContext): Promise<TeamSetting>
Parameters
- teamContext
- TeamContext
The team context for the operation
Returns
Promise<TeamSetting>
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
Promise<IterationCapacity>
function getWorkItemColumns(teamContext: TeamContext, iterationId: string): Promise<TaskboardWorkItemColumn[]>
Parameters
- teamContext
- TeamContext
The team context for the operation
- iterationId
-
string
Returns
Promise<TaskboardWorkItemColumn[]>
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
Promise<TeamSettingsIteration>
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[]>
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[]>
Replace a team's capacity
function replaceCapacitiesWithIdentityRef(capacities: TeamMemberCapacityIdentityRef[], teamContext: TeamContext, iterationId: string): Promise<TeamMemberCapacityIdentityRef[]>
Parameters
- capacities
Team capacity to replace
- teamContext
- TeamContext
The team context for the operation
- iterationId
-
string
ID of the iteration
Returns
Promise<TeamMemberCapacityIdentityRef[]>
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}>
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>
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
Promise<BoardCardRuleSettings>
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
Promise<BoardCardSettings>
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>
Update columns on a board
function updateBoardColumns(boardColumns: BoardColumn[], teamContext: TeamContext, board: string): Promise<BoardColumn[]>
Parameters
- boardColumns
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[]>
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[]>
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
Promise<BoardUserSettings>
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
Promise<TeamMemberCapacityIdentityRef>
function updateColumns(updateColumns: UpdateTaskboardColumn[], teamContext: TeamContext): Promise<TaskboardColumns>
Parameters
- updateColumns
- teamContext
- TeamContext
The team context for the operation
Returns
Promise<TaskboardColumns>
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>
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>
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>
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
Promise<TeamSettingsDaysOff>
Update team field values
function updateTeamFieldValues(patch: TeamFieldValuesPatch, teamContext: TeamContext): Promise<TeamFieldValues>
Parameters
- patch
- TeamFieldValuesPatch
- teamContext
- TeamContext
The team context for the operation
Returns
Promise<TeamFieldValues>
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>
function updateWorkItemColumn(updateColumn: UpdateTaskboardWorkItemColumn, teamContext: TeamContext, iterationId: string, workItemId: number): Promise<void>
Parameters
- updateColumn
- UpdateTaskboardWorkItemColumn
- teamContext
- TeamContext
The team context for the operation
- iterationId
-
string
- workItemId
-
number
Returns
Promise<void>