Expand my Community achievements bar.

The first Coffee Break sweepstakes in the Workfront Community is TOMORROW at 8:30AM PST! Share your Project Template and Timeline best practices or ask a related question for an opportunity to win Workfront swag.
SOLVED

Regarding convertToProject API

Avatar

Level 2

I am attempting to convert an existing issue into a project using the API. I tried making the following API call:
https://HOST_NAME/attask/api/issue/123456789/convertToProject?apiKey=1232323232&updates={"options":["preserveIssue","preservePrimaryContact"],"project":{"name":"Converted Project Name","templateID":""}}
The response I received was a 200k response with the following data:

"data": {
"ID": "123456789",
"name": "Issue Name",
"objCode": "OPTASK",
"plannedCompletionDate": "2023-09-13T18:00:00:000-0600",
"status": "NEW",
"primaryAssignment": null
}
However, I noticed that the project was not created in Workfront for the issue with ID 123456789.
I was actually expecting the API to convert the issue along with its custom form field values, attached documents, and all other details of the issue.

 

Thanks 

1 Accepted Solution

Avatar

Correct answer by
Level 7

Your call is incorrect.

URL: {your workfront api URL}/OPTASK/{issue ID}

Method: PUT

Query String: action=convertToProject

In the header, include apiKey

In the body, include this JSON:

{

  "project": {

    "name": {project name},

    "templateID": {template ID if desired

  },

  "options": [

    {any options you want to include}

  ]

}

View solution in original post

1 Reply

Avatar

Correct answer by
Level 7

Your call is incorrect.

URL: {your workfront api URL}/OPTASK/{issue ID}

Method: PUT

Query String: action=convertToProject

In the header, include apiKey

In the body, include this JSON:

{

  "project": {

    "name": {project name},

    "templateID": {template ID if desired

  },

  "options": [

    {any options you want to include}

  ]

}