Post a Note to a project or task and direct it to a team or list of User IDs

StackOverflow https://stackoverflow.com/questions/21688447

  •  09-10-2022
  •  | 
  •  

Question

How can I post a comment to a project or task and direct it to a team or list of User IDs?

I tried

/note?noteText=testing&projectID=529647ad007235fbf7f1ce1d839xxxxx&sessionID=cb4c001c6d884beda1e1c085295xxxxx

but I get back:

{"error":{"class":"com.attask.common.InvalidParameterException","message":"noteObjCode cannot be null","title":null,"msgKey":"exception.attask","attributes":[""],"code":0}}

There isn't any guidance on what a noteObjCode is, and I don't see a collection where I would put the User IDs or Team ID.

thanks

Était-ce utile?

La solution

You can post a note to many different objects within AtTask (User, Project, Task, Issue, Portfolio, Program, etc) and the "noteObjCode" attribute is what AtTask uses to determine what type of object the note is being posted to. To see other relevant fields and each object a note can be attached to please visit http://developers.attask.com/api-docs/api-explorer/#?selected=NOTE.

As for posting a note to an object and directing that note to a list of users or teams you can use something like the following:

/v4.0/note?
sessionID=cb4c001c6d884beda1e1c085295xxxxx&
updates={
    noteText:"testing",
    objID:"529647ad007235fbf7f1ce1d839xxxxx",
    noteObjCode:"PROJ",
    tags:[{
        objID:"4c7875600000c9e1bcfd09ac06axxxxx",
        objObjCode:"USER"
    },{
        objID:"4c7875600000c9e1bcfd09ac06axxxxx",
        objObjCode:"TEAMOB"
    }]
}


In the example above:

  1. sessionID = sessionID returned from a login
  2. updates = data you wish to be assigned to specified attributes
  3. noteText = what you want the note to say
  4. objID = what object you want the note to be on
  5. noteObjCode = the type of object you want the note to be on
  6. tags = who you want the note to be directed too
    • objID = the team ID or the user ID you want the note to be directed to
    • objObjCode = the type of object you are directing the note to ("TEAMOB" or "USER")

Autres conseils

If you are sending via the browser, or not explicitly setting the HTTP Method.

append &method=post to the end of your URL.

/note?noteText=testing&projectID=529647ad007235fbf7f1ce1d839xxxxx&sessionID=cb4c001c6d884beda1e1c085295xxxxx**&method=POST**

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top