Expand my Community achievements bar.

SOLVED

Workfront API call to create record and attach MULTIPLE custom forms simultaneously

Avatar

Level 4

Hi Community,

can anyone please advise me if / how I can use the Workfront API to create a record in WF and attach multiple custom forms to that simultaneously, at creation time?

 

It's straightforward to create a record with 1 CF attached, for example, to create a Program:

POST to the /PRGM end point.

Body: {"name":"Foo", "portfolioID":"<portfolioID>", "categoryID":"<ID of Custom form to attach>"}

Is there a way to attach multiple custom forms?

 

I assume the API supports that, because the recently added new "Create record" Workfront Module in Fusion allows us to do that.

But I can't figure out how to do it.

 

Appreciate any help with this.

Thank you,

Tibor

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You would have to post a collection. I had to ask copilot how to do this, and the response was:

 

Step 1: Open Postman

  • Launch Postman and create a new request.

Step 2: Configure the API Request

  • Method: POST

  • URL: https://<your-instance>.attask/api/v14.0/project

  • Headers:

    • Content-Type: application/json

    • Authorization: Bearer <your-access-token>

Step 3: Set Up the Request Body

In Postman, choose "Body" → "Raw" and enter this JSON payload:

 

(At this point, I put in something that looked similar to this: )

 

{
  "name": "New Project",
  "templateID": "12345",
  "description": "API-created project",
  "objectCategories": [
    { "categoryID": "2468" },
    { "categoryID": "1357" }
  ]
}

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

You would have to post a collection. I had to ask copilot how to do this, and the response was:

 

Step 1: Open Postman

  • Launch Postman and create a new request.

Step 2: Configure the API Request

  • Method: POST

  • URL: https://<your-instance>.attask/api/v14.0/project

  • Headers:

    • Content-Type: application/json

    • Authorization: Bearer <your-access-token>

Step 3: Set Up the Request Body

In Postman, choose "Body" → "Raw" and enter this JSON payload:

 

(At this point, I put in something that looked similar to this: )

 

{
  "name": "New Project",
  "templateID": "12345",
  "description": "API-created project",
  "objectCategories": [
    { "categoryID": "2468" },
    { "categoryID": "1357" }
  ]
}

Avatar

Level 4

Hi Skye,

thanks a million!

It was the collection bit that was missing for me:

 "objectCategories": [
    { "categoryID": "2468" },
    { "categoryID": "1357" }
  ]

I tested this and it works nicely. 🙂

Best,

Tibor