Azure DevOps Connector
Documentation
Version: 2
Documentation
Endpoint

Delete Work Item


Name

delete_workitem

Description

Deletes an existing work item in the default project within the organization. [API reference]

Related Tables

WorkItems

Parameters

Parameter Label Required Options Description
Project Project Name YES The Name of the project.
Id Work Item Id NO

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Raw Description
Id DT_I4 int False
project DT_WSTR nvarchar(4000) 4000 False
Title DT_WSTR nvarchar(4000) 4000 False
WorkItemType DT_WSTR nvarchar(4000) 4000 False
DeletedBy DT_WSTR nvarchar(4000) 4000 False
DeletedDate DT_WSTR nvarchar(4000) 4000 False
If the column you are looking for is missing, consider customizing Azure DevOps Connector.

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length Raw Description
Id DT_WSTR nvarchar(4000) 4000 False
Required columns that you need to supply are bolded.

Examples

SSIS

Use Azure DevOps Connector in API Source component to read data or in API Destination component to read/write data:

Delete rows from WorkItems table using API Destination

This Endpoint belongs to WorkItems table, therefore you cannot work with it directly. Use this table and table-operation pair instead:

Azure DevOps
WorkItems
Delete
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Delete work item

SELECT * FROM delete_workitem
WITH
(
    "Project" = 'abcd-1234-project'
)

Delete a specific work item by its Id

DELETE FROM WorkItems WHERE Id = 7455

Delete work items match with Wiql Query

DELETE FROM WorkItems
Where 1=1 
WITH(Query='SELECT * FROM WorkItems Where [System.TeamProject]=''MyProject'' AND ([System.Id]=6469 OR [System.Id]=6468) ')

delete_workitem endpoint belongs to WorkItems table(s), and can therefore be used via those table(s).

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Delete work item

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM delete_workitem
WITH
(
    "Project" = ''abcd-1234-project''
)';

EXEC (@MyQuery) AT [LS_TO_AZURE_DEVOPS_IN_GATEWAY];

Delete a specific work item by its Id

DECLARE @MyQuery NVARCHAR(MAX) = 'DELETE FROM WorkItems WHERE Id = 7455';

EXEC (@MyQuery) AT [LS_TO_AZURE_DEVOPS_IN_GATEWAY];

Delete work items match with Wiql Query

DECLARE @MyQuery NVARCHAR(MAX) = 'DELETE FROM WorkItems
Where 1=1 
WITH(Query=''SELECT * FROM WorkItems Where [System.TeamProject]=''''MyProject'''' AND ([System.Id]=6469 OR [System.Id]=6468) '')';

EXEC (@MyQuery) AT [LS_TO_AZURE_DEVOPS_IN_GATEWAY];

delete_workitem endpoint belongs to WorkItems table(s), and can therefore be used via those table(s).