Question

I have a custom field called 'Labels'. When I get a task, here's how AtTask responds:

GET /attask/api/v3.0/task/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx?fields=DE:Labels

Response

{
  data: {
    ID: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    name: "Task Name",
    objCode: "TASK",
    DE:Labels: [
      "a",
      "b",
      "c"
    ]
  }
}

When I attempt to update the field with a new set of values I get this error:

PUT /attask/api/v3.0/task/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx?DE:Labels=["a","b","c"]

Response
Type: com.attask.common.InvalidParameterException
Message: Invalid Parameter: Labels value "["a","b","c"]"

I've also tried these formats:

["a","b","c"]
a,b,c
[a,b,c]
"a","b","c"

Thanks in advance for any help!

Était-ce utile?

La solution

I found an answer to this. You need to use JSON Edits for this scenario.

http://developers.attask.com/api-docs/#JSONEdits

PUT /attask/api/v3.0/task/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx?updates={DE:Labels=["a","b","c"]}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top