I'm new to SoapUI and REST testing in General. I am try to create a BUG Workitem in TFS via a REST call. The examples I have found say to use PATCH method, but when I do that in SOAPUI if get the following error: { "$id": "1", "innerException": null, "message": "You must pass a valid patch document in the body of the request.", "typeName": "Microsoft.VisualStudio.Services.Common.VssPropertyValidationException, Microsoft.VisualStudio.Services.Common, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "typeKey": "VssPropertyValidationException", "errorCode": 0, "eventId": 3000
Can you actually use PATCH to create a new Workitem?
Here is what I am sending:
patch http://tfs-app-t1.xxx.xxxx.com:8080/tfs/DEV%20xxx%20xxxxx%20xxxxxxx/XXX-East%20Region/_apis/wit/workitems/$bug?api-version=1.0
Content-Type: application/json-patch+json
[
{
"op": "add",
"path": "/fields/System.Title",
"value": "Test bug from Rest Call"
}
{
"op": "add",
"path": "/fields/System.Workstream",
"value": "EDI"
}
]
I tried to remove server name from the example
I finally figured out the problem. I was missing a comma between the 2 {} sets. It should be:
I'm new to SoapUI and REST testing in General. I am try to create a BUG Workitem in TFS via a REST call. The examples I have found say to use PATCH method, but when I do that in SOAPUI if get the following error: { "$id": "1", "innerException": null, "message": "You must pass a valid patch document in the body of the request.", "typeName": "Microsoft.VisualStudio.Services.Common.VssPropertyValidationException, Microsoft.VisualStudio.Services.Common, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "typeKey": "VssPropertyValidationException", "errorCode": 0, "eventId": 3000
Can you actually use PATCH to create a new Workitem?
Here is what I am sending:
patch http://tfs-app-t1.xxx.xxxx.com:8080/tfs/DEV%20xxx%20xxxxx%20xxxxxxx/XXX-East%20Region/_apis/wit/workitems/$bug?api-version=1.0
Content-Type: application/json-patch+json
[ { "op": "add", "path": "/fields/System.Title", "value": "Test bug from Rest Call" }, { "op": "add", "path": "/fields/System.Workstream", "value": "EDI" } ]