We are looking to move from Jira to Azure Devops with all of our projects, one of those being our helpdesk functionality.
I have been tasked with porting our current solution regarding tickets: We have a Laravel project running that checks certain email addresses for new help requests. When a new email arrives it sends a notification to our Slack where one of the team members acknowledge it and chooses where to create a ticket in Jira. Then it creates a new ticket in Jira with an api-call, based on the choice in Slack.
I have found and tried out the Azure Devops API, and can list projects and get workitems and so on. But I cannot POST a new workitem by calling
http://dev.azure.com/{organization}/{project}/_apis/wit/workitems/$task?api-version=6.1-preview.3&bypassRules=true
with a JSON body like this:
[
{
"op": "add",
"path": "/fields/System.Title",
"from": null,
"value": "Test of REST functionality"
},
{
"op": "add",
"path": "/fields/System.State",
"from": null,
"value": "New"
}
]
I get a JSON response like this
{
"fields": {
"System.WorkItemType": "Task",
"System.AreaPath": "xxxxx",
"System.TeamProject": "xxxx",
"System.IterationPath": "xxxx",
"System.State": "New",
"System.Reason": "New",
"Microsoft.VSTS.Common.StateChangeDate": "1753-01-01T00:00:00Z",
"System.ChangedBy": {
"displayName": "xxxx",
"url": "xxxx",
"_links": {
"avatar": {
"href": "xxxx"
}
},
"id": "xxxx",
"uniqueName": "xxxx",
"imageUrl": "xxxx",
"descriptor": "xxxx"
},
"System.CreatedBy": {
"displayName": "xxxx",
"url": "xxxx",
"_links": {
"avatar": {
"href": "xxxx"
}
},
"id": "xxxx",
"uniqueName": "xxxx",
"imageUrl": "xxxx",
"descriptor": "xxxx"
},
"Microsoft.VSTS.Common.Priority": 2
},
"_links": {
"workItemType": {
"href": "https://dev.azure.com/{organization}/{project}/_apis/wit/workItemTypes/Task"
},
"fields": {
"href": "https://dev.azure.com/{organization}/{project}/_apis/wit/fields"
}
},
"url": "https://dev.azure.com/{organization}/{project}/_apis/wit/workItems"
}
That last url refers me to a page with a JSON object containing this message:
No HTTP resource was found that matches the request URI 'https://dev.azure.com/{project}/_apis/wit/workItems'
and no new tasks are created.
I started with consulting the documentation.
I have tried editing and regenerating my Personal Access Token with several different combinations of permissions regarding work items. I have tried giving the PAT full access.
I have tried calling different versions of the API.
I have tried adding fields besides title and state that are listed as required, ending with setting bypassRules to true.
Google and the /r/azuredevops subreddit returned no results that worked.
Can anyone point me in the direction of where I should go, or what I'm missing? Thanks in advance :-)
EDIT: I am POSTing.
EDIT FOR SOLUTION:
I feel so stupid. When POSTing in Postman, I used http:// instead of https:// Using https:// solved the issue.











