Expand my Community achievements bar.

Do you have questions about the migration to Adobe Business Platform? Come join our upcoming coffee break and ask away!
SOLVED

API call: Attach / assign existing custom field (parameter) to existing custom form (category)

Avatar

Level 9

Hello,

 

I want to add an existing custom field to an existing custom form using the API.

 

I know how to get all custom fields assigned to a specific form using

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

but I don't know how to add another one to the categoryParameters.

 

Thanks in advance.

Regards

Lars

1 Accepted Solution

Avatar

Correct answer by
Level 9

Thank to the help of the customer support, I can now share how to do this:

 

You first have to run a GET request to get all currently assigned fields / parameters:

 

https://<domain>.my.workfront.com/attask/api/v15.0/ctgy/<categoryID>?fields=categoryParameters:*

 

In the next step, you have to run a PUT call containing the previous parameters and the new one(s):

 

PUT HTTP REQUEST URL:
https://<domain>.my.workfront.com/attask/api/v15.0/ctgy/<categoryID>


JSON BODY:
{
    "categoryParameters": [
        {
            "objCode": "CTGYPA",
            "categoryID": "<categoryID>",
            "customerID": "<customerID>",
            "displayOrder": 1,
            "hideFormulaFromDescription": false,
            "isInvalidExpression": false,
            "isRequired": false,
            "parameterGroupID": "<parameterGroupID>",
            "parameterID": "<parameterID>",
            "rowShared": false,
            "securityLevel": "LE",
            "viewSecurityLevel": "V"
        },
        {
            "objCode": "CTGYPA",
            "categoryID": "<categoryID>",
            "customerID": "<customerID>",
            "displayOrder": 2,
            "hideFormulaFromDescription": false,
            "isInvalidExpression": false,
            "isRequired": false,
            "parameterGroupID": "<parameterGroupID>",
            "parameterID": "<parameterID>",
            "rowShared": false,
            "securityLevel": "LE",
            "viewSecurityLevel": "V"
        },
        { "objCode": "CTGYPA", "categoryID": "<categoryID>", "customerID": "<customerID>", "displayOrder": 3, "hideFormulaFromDescription": false, "isInvalidExpression": false, "isRequired": false, "parameterGroupID": "<parameterGroupID>", "parameterID": "<parameterID>", "rowShared": false, "securityLevel": "LE", "viewSecurityLevel": "V" }
    ]
}

View solution in original post

1 Reply

Avatar

Correct answer by
Level 9

Thank to the help of the customer support, I can now share how to do this:

 

You first have to run a GET request to get all currently assigned fields / parameters:

 

https://<domain>.my.workfront.com/attask/api/v15.0/ctgy/<categoryID>?fields=categoryParameters:*

 

In the next step, you have to run a PUT call containing the previous parameters and the new one(s):

 

PUT HTTP REQUEST URL:
https://<domain>.my.workfront.com/attask/api/v15.0/ctgy/<categoryID>


JSON BODY:
{
    "categoryParameters": [
        {
            "objCode": "CTGYPA",
            "categoryID": "<categoryID>",
            "customerID": "<customerID>",
            "displayOrder": 1,
            "hideFormulaFromDescription": false,
            "isInvalidExpression": false,
            "isRequired": false,
            "parameterGroupID": "<parameterGroupID>",
            "parameterID": "<parameterID>",
            "rowShared": false,
            "securityLevel": "LE",
            "viewSecurityLevel": "V"
        },
        {
            "objCode": "CTGYPA",
            "categoryID": "<categoryID>",
            "customerID": "<customerID>",
            "displayOrder": 2,
            "hideFormulaFromDescription": false,
            "isInvalidExpression": false,
            "isRequired": false,
            "parameterGroupID": "<parameterGroupID>",
            "parameterID": "<parameterID>",
            "rowShared": false,
            "securityLevel": "LE",
            "viewSecurityLevel": "V"
        },
        { "objCode": "CTGYPA", "categoryID": "<categoryID>", "customerID": "<customerID>", "displayOrder": 3, "hideFormulaFromDescription": false, "isInvalidExpression": false, "isRequired": false, "parameterGroupID": "<parameterGroupID>", "parameterID": "<parameterID>", "rowShared": false, "securityLevel": "LE", "viewSecurityLevel": "V" }
    ]
}