Search code examples
restworkfront-api

How can I post the custom field to Workfront through workfront REST API


In workfront, we want to create a custom form(custom fields) for an Issue. How can I use Workfront REST API to do a POST request and create the custom fields in a custom form for that issue in workfront?

https://developers.workfront.com/api-docs/api-explorer/


Solution

  • You POST the same as you would to a system field. Simply prefix the field name with DE:.

    attask/api-internal//user/xxxxxxxxx?DE:foo=bar
    

    The above sets the field 'foo' to the string 'bar'.

    If the custom field is not present on the object (not on a custom form already attached) then you will first need to attach one.

    attask/api-internal/user/xxxxxxxxxx?updates={objectCategories:[{categoryID:`"customformUUID`",categoryOrder:0,objCode:`"CTGY`"}]}