spacemanspiff
spacemanspiff

Reputation: 11

Workfront- Tagging User in Notes via the API

I'd like to create a project-level note that tags a user via the Workfront API. I can create the note:

https://[SUBDOMAIN].attask-ondemand.com/attask/api/v5.0/note?noteText=[MESSAGE_TEXT]&noteObjCode=PROJ&objID=[PROJECT_ID]&sessionID=[SESSION_ID]&method=POST

But I'm struggling to figure out the syntax to tag a user. I've tried the following:

https://[SUBDOMAIN].attask-ondemand.com/attask/api/v5.0/note?noteText=[MESSAGE_TEXT]&noteObjCode=PROJ&objID=[PROJECT_ID]&tags:objID=[USER_ID]&tags:objObjCode=USER&sessionID=[SESSION_ID]&method=POST

But I get a

APIModel V5_0 does not support field tags:objID (Note)

message returned.

I think that it's some combination of the "ntag" or "tags" object I need to add, but not sure what I'm missing.

Upvotes: 1

Views: 533

Answers (1)

michael johnson
michael johnson

Reputation: 757

Since you are updating the Tags collection you need to do it through an updates using JSON instead of just sending URL parameters. The way you do this is the following.

api/v5.0/note?updates={ "noteText":"this is an update", "noteObjCode":"PROJ", "objID":"574f32a400333f3d00d8a0e3e5495eb2", "tags":[{"objID":"5594243d02461f451395a9d24d1639e1","objObjCode":"USER"}]}

Upvotes: 1

Related Questions