Forum Discussion
vishalhsingh
May 04, 2021Copper Contributor
ADO work items in Azure SQL DB using ADO REST API in ADF
Anyone managed to get the work items using ADO REST API? I have setup everything but each time I try to preview data (ADO wit) or run the activity, I am getting error:
Error occurred when deserializing source JSON file ''. Check if the data is in valid JSON object format. Unexpected character encountered while parsing value: <. Path '', line 0, position 0.>
I have constructed REST API as below and using POST method https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/wiql?api-version=6.0
My rest API url: https://dev.azure.com/MyOrg/myproj/myteam/_apis/wit/wiql?api-version=6.0
further info on variable:
@apiBody1={ "query": "Select [System.Id] From WorkItems Where [System.WorkItemType] In ('
@apiBody2=' and [System.AreaPath] = 'mypath'" } --sometime this also has '\' such as mypath\subpath
further I am concatenating the variables:
@{concat(variables('apiBody1'),item().WorkItemType,variables('apiBody2'))}
- vishalhsinghCopper Contributor
I am using PAT for authentication.