Expand my Community achievements bar.

Latest Community Ideas Review is Out: Discover What’s New and What to Expect!
SOLVED

API call: Get all custom fields (parameters) assigned to a section (parameter group) within a custom form (category)

Avatar

Level 10

Hello,

 

I need help writing an API call to get all custom fields, which are assigned to a section within a custom form.

 

I do know how to get the section ID

https://<domainname>.my.workfront.com/attask/api/v15.0/pgrp/<sectionId>

 

But I want to get all fields (parameters) within this section. To get all fields within a form I use

https://<domainname>.my.workfront.com/attask/api/v15.0/ctgy/<customFormId>?fields=categoryParameters:parameter

 

Thanks in advance. 

Regards

Lars

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You need to search for Category Parameters (specific occurrences of a custom field). This isn't a top level object and cannot be searched directly, so you have to search the Parameter object and use an EXISTS filter that specifies the specific occurrences where the parameter exists on a certain custom form and section. EXISTS only work in the unsupported API.

 

 

https://<domain>.my.workfront.com/attask/api/unsupported/param/search?EXISTS:a:$$EXISTSMOD=EXISTS&EXISTS:a:$$OBJCODE=CTGYPA&EXISTS:a:parameterID=FIELD:ID&EXISTS:a:categoryID=<categoryID>&EXISTS:a:categoryID_Mod=eq&EXISTS:a:parameterGroupID=<sectionID>&EXISTS:a:parameterGroupID_Mod=eq

 

 

 

If you like my content, please take a moment to view and vote on my Idea Requests: https://tinyurl.com/4rbpr7hf

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

You need to search for Category Parameters (specific occurrences of a custom field). This isn't a top level object and cannot be searched directly, so you have to search the Parameter object and use an EXISTS filter that specifies the specific occurrences where the parameter exists on a certain custom form and section. EXISTS only work in the unsupported API.

 

 

https://<domain>.my.workfront.com/attask/api/unsupported/param/search?EXISTS:a:$$EXISTSMOD=EXISTS&EXISTS:a:$$OBJCODE=CTGYPA&EXISTS:a:parameterID=FIELD:ID&EXISTS:a:categoryID=<categoryID>&EXISTS:a:categoryID_Mod=eq&EXISTS:a:parameterGroupID=<sectionID>&EXISTS:a:parameterGroupID_Mod=eq

 

 

 

If you like my content, please take a moment to view and vote on my Idea Requests: https://tinyurl.com/4rbpr7hf

Avatar

Level 10

Hello William,

 

thanks a lot, this works.

It is a pity that it is not possible with the supported API.

 

Regards

Lars