The CreatorCon Call for Content is officially open! Get started here.

Out bound rest message integration with Azure devOPs workitem

anitha0887
Tera Contributor

Hi Friends,

 

Please help me  on  outbound rest message integration that when incident created in servicenow , should created incident on azure DevOps  workitem under task. I provide endpoint of  azure DevOps portals and basic authentication and method is POST.Iam getting error status 0 .iam not able to tackle exact issue why iam getting that error.Anyone help me on this that would be appreciated.attached screenshot of error.

 

Endpoint : https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/Task?api-version=7.1-preview.3

Errors is   : Error executing REST request: Invalid uri 'https://dev.azure.com/organization/project name/_apis/wit/_workitems/Task?api-version=7.1-preview.3': escaped absolute pat

 

anitha0887_0-1707859554202.png

 

1 ACCEPTED SOLUTION

Hi @anitha0887 

 

You are not passing the body correctly. Please refer this article https://medium.com/@sandeepsinh/create-work-item-with-rest-api-in-azure-devops-28f979a12f37 . You need to pass the body as a JSON array with add operation for description path as well.

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

View solution in original post

5 REPLIES 5

Amit Verma
Kilo Patron
Kilo Patron

Hi @anitha0887 

 

I think some characters in the endpoint is creating the issue. Can you test the endpoint with Postman and check if the endpoint URL is OK ?

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

Hi @Amit Verma 

Hi @Mathieu Lepoutr 

 

Thank you for your response, iam able to integrate servicenow incident with devops workitem type is task, iam want to map short description , assignment group, state , user of incident to task field, i have mapping like 

system.title=short_description(incident),"System.Description": "${description}" but did not display  decsription of incident in task description ,short decsription  was displayed on title of task. please help me on mapping and what would be backend values of task field.please refer screen shot i mapping on rest message.

anitha0887_0-1710788723283.png

 

Hi @anitha0887 

 

You are not passing the body correctly. Please refer this article https://medium.com/@sandeepsinh/create-work-item-with-rest-api-in-azure-devops-28f979a12f37 . You need to pass the body as a JSON array with add operation for description path as well.

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

I got same thing , its working now ,Thank you.