Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将JSON数据发布到Team Foundation Server 2018_Json_Api_Http Post_Postman - Fatal编程技术网

将JSON数据发布到Team Foundation Server 2018

将JSON数据发布到Team Foundation Server 2018,json,api,http-post,postman,Json,Api,Http Post,Postman,我正在尝试从带有HTTPPOST的POSTMAN使用JSON打开新的用户故事。标题中的内容类型为:application/json patch+json 文件看起来像: { "id":33560, "rev":2, "fields":{ "System.AreaPath":"EJ2TFS", "System.TeamProject":"EJ2TFS", "System.IterationPath":"EJ2TFS\\Iteration 1", "Sys

我正在尝试从带有HTTPPOST的POSTMAN使用JSON打开新的用户故事。标题中的内容类型为:application/json patch+json

文件看起来像:

{
  "id":33560,
  "rev":2,
  "fields":{
    "System.AreaPath":"EJ2TFS",
    "System.TeamProject":"EJ2TFS",
    "System.IterationPath":"EJ2TFS\\Iteration 1",
    "System.WorkItemType":"User Story",
    "System.State":"New",
    "System.Reason":"New",
    "System.AssignedTo":"User, User <firm\\user>",
    "System.Title":"Postman_POST",
    "Microsoft.VSTS.Common.Priority":2,
    "Microsoft.VSTS.Common.ValueArea":"Business",
    "System.History":"Comment"
  }
}

如果要创建工作项,请使用下面的url和正文:

职位

https://your_server:port/tfs/DefaultCollection/EJ2TFS/_apis/wit/workitems/$user story?api版本=4.0

身体

   {
    "$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",
    "typeKey": "VssPropertyValidationException",
    "errorCode": 0,
    "eventId": 3000
}
[
  {
    "op": "add",
    "path": "/fields/System.Title",
    "from": null,
    "value": "Postman_POST"
  },
  {
    "op": "add",
    "path": "/fields/System.AssignedTo",
    "from": null,
    "value": "User, User <firm\\user>"
  },
  {
    "op": "add",
    "path": "/fields/System.IterationPath",
    "from": null,
    "value": "EJ2TFS\\Iteration 1"
  }    
]