在Attask Api C#中创建和更新parameterValues

时间:2015-09-19 22:14:42

标签: attask workfront-api

{
  "data": [
{
  "ID": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "name": "Testing Project API",
  "objCode": "PROJ",
  "parameterValues": {
    "DE:Complete Sales Package": [
      "Parcel Register",
      "Signed Lease / Contract"
    ],
    "DE:Temp ID": 1234d5.0,
    "DE:Estimated Yearly Revenue": 0.0,
    "DE:Monitoring Required": "Yes",
    "DE:Lease Rate Annually": xxx,
    "DE:Project DC Size in W": 0.0,
    "DE:Sales Person": "xxC",
    "DE:Project": "xxxx - xxxxxxxx",
    "DE:IESO status name": "OPA",
    "DE:MicroFIT Rate": 333
  },
  "category": {
    "ID": "xxxxxxxxxxxxxxxxxx",
    "name": "xxxxxxxxxxxxxxxxxxx",
    "objCode": "CTGY"
  }
}

] }

我通过模板手动创建项目时收到的响应名为" DE:Complete Sales Package"它自己作为自定义提交多个复选框,因此它有多个值。如何创建也更新thorugh api ..

我的请求就像单个值一样: https://mycompany.attask-ondemand.com/attask/api-unsupported/proj?method=post&apiKey=apiKey&templateID=templateID&companyID=companyID&name=Testing项目API-12345& DE:Temp ID = 12345

当选中多个复选框时,请求是什么?我用这个 得到错误.... https://mycompany.attask-ondemand.com/attask/api-unsupported/proj?method=post&apiKey=apiKey&templateID=templateID&companyID=companyID&name=Testing项目API-12345& DE:完整销售包= [签署租约/合同,包裹登记]

??任何帮助如何发布这种类型的paramaterValue有多个值,如:

" DE:完整的销售包":[           " A&#34 ;,           " B"," C"         ],

1 个答案:

答案 0 :(得分:0)

您需要通过更新调用执行此操作,以下内容应该有效。

https://mycompany.attask-ondemand.com/attask/api-unsupported/proj?method=post&apiKey=apiKey&updates={"templateID":"templateID","companyID":"companyID","name":"Testing Project API-12345","DE:Complete Sales Packag":["SSigned Lease / Contract","Parcel Register"]}