Move objects between Workfront environments using the Workfront Environment Promotion API
The Environment Promotion capability allows you to move configuration-related objects from one environment to another. You can move these objects using the Workfront API as described in this article.
For instructions on moving objects between environments using the Workfront application, see:
Access requirements
You must have the following:
For more detail about the information in this table, see Access requirements in Workfront documentation.
Prerequisites
The Create Promotion Package endpoint assumes that you have already configured the source environment. This API call requires manually creating an object map of Workfront objCodes and object GUIDs. The specific structure of this map is described below.
Supported objects for environment promotion
The Environment Promotion capability is intended to provide the ability to move configuration-related objects from one environment to another. It does not support the ability to move transactional objects (with limited exceptions).
For a list of promotable objects and their included promotable sub-objects, see Supported objects for environment promotion in the article Overview of moving objects between Workfront environments.
Authentication
The API authenticates each request to ensure that the client has access to view or modify a requested object.
Authentication is performed by passing in a session ID or API key, which can be given using the following method:
Request Header Authentication
The preferred method of authentication is to pass a request header named SessionID containing the session token. This has the advantage of being safe against Cross-site Request Forgery (CSRF) attacks and not interfering with the URI for caching purposes.
The following is an example of a request header:
GET /attask/api/v15.0/project/search
SessionID: abc1234
API Endpoints
Create a package
This call executes a multi-step process.
The first step results in the creation of an empty promotion package in the status of “ASSEMBLING”.
The second step uses the the objectCollections
array provided in the POST body to assemble the requested records from Workfront. This step may take several minutes to complete, depending on the number of records requested and your Workfront configuration. At the end of this process, the empty promotion package is updated with the packageEntities
and the status is automatically set to “DRAFT”.
objectCollections
array.objCode
key that corresponds to the object code documented in the Workfront API Explorer.entities
collection. This expects the ID
field. It can also accept an optional name
attribute to make it easier to know what the ID
represents.objectCollections
list, see the Supported objects for environment promotion section in this article.URL
POST https://{domain}.{environment}.workfront.com/environment-promotion/api/v1/packages
Headers
{
"apikey": "**********",
"Content-Type": "application/json"
}
Or
{
"sessionID": "*****************",
"Content-Type": "application/json"
}
Body
{
"name": "Agency Onboarding - 2023-06-06",
"description": "This promotion package contains configuration to support the agency onboarding processes...",
"source": "https://{domain}.{environment}.workfront.com",
"objectCollections": [
{
"objCode": "PROJ",
"entities": [
{
"ID": "6419b8b9001151ee258921a4f7597ba1",
"name": "Agency Request"
}
]
},
{
"objCode": "TMPL",
"entities": [
{
"ID": "6419b8b9001151ee258921a4f7597bb2",
"name": "New Agency Onboarding"
},
{
"ID": "6419b8b9001151ee258921a4f7597bc3",
"name": "New Agency Offboarding"
}
]
},
{
"objCode": "PTLTAB",
"entities": [
{
"ID": "645e6435000b4aaebe4776f4a42ed5ad",
"name": "Agency Performance and Readiness"
}
]
}
]
}
Response
200
{
"data": {
"id": "1d5693b9-b7b5-492d-8219-c21f34bcaca6",
"name": "Agency Onboarding - 2023-06-06",
"description": "This promotion package contains configuration to support the agency onboarding processes...",
"source": "https://{domain}.{environment}.workfront.com",
"status": "ASSEMBLING",
"version": 1,
"createdAt": "2023-06-06T17:29:21.600Z",
"createdById": "61aa9d0e0005fcee8f212835bdaa2619",
"publishedAt": null,
"customerId": "61aa9d090005fa42152c1cb66659f38d"
}
}
Get a list of packages
This call returns an unfiltered list of promotion packages belonging to the customer.
The response will include all packages created from any of the customer’s sandbox, preview, or production instances of Workfront.
URL
GET https://{domain}.{environment}.workfront.com/environment-promotion/api/v1/packages
Headers
{
"apikey": "**********"
}
Or
{
"sessionID": "*****************"
}
Body
Empty
Response
200
{
"data": [
{
"id": "1d5693b9-b7b5-492d-8219-c21f34bcaca6",
"name": "Agency Onboarding - 2023-06-06",
"description": "This promotion package contains configuration to support the agency onboarding processes...",
"status": "ASSEMBLING",
"createdAt": "2023-06-06T17:29:21.600Z",
"deletedAt": null
},
{...}
]
}
Get a package by ID
This call returns a the details of a requested promotion package.
The request can be made through any environment regardless of the original source of the promotion package.
URL
GET https://{domain}.{environment}.workfront.com/environment-promotion/api/v1/packages/{id}
Headers
{
"apikey": "**********"
}
Or
{
"sessionID": "*****************"
}
Body
Empty
Response
200
{
"data": {
"id": "1d5693b9-b7b5-492d-8219-c21f34bcaca6",
"name": "Agency Onboarding - 2023-06-06",
"description": "This promotion package contains configuration to support the agency onboarding processes...",
"source": "https://{domain}.{environment}.workfront.com",
"status": "DRAFT",
"version": 1,
"createdAt": "2023-06-06T17:29:21.600Z",
"publishedAt": null,
"customerId": "61aa9d090005fa42152c1cb66659f38d",
"packageEntities": {
"GROUP": [
{
"id": "52aa9d0e0005fcee8f212835bdaa2691",
"name": "Default Group",
"description": "null"
- or -
"description": "..."
}
],
"ROLE": [
{...}
],
...
}
}
}
Update specific properties of a package
This call updates any of the contents of the promotion package that are provided in the PATCH body.
The editable attributes are:
- name (string)
- description (string)
- status (string with value validation)
For a detailed description of available statuses, see Environment promotion statuses in the article Overview of moving objects between Workfront environments.
URL
PATCH https://{domain}.{environment}.workfront.com/environment-promotion/api/v1/packages/{id}
Headers
{
"apikey": "**********",
"Content-Type": "application/json"
}
Or
{
"sessionID": "*****************",
"Content-Type": "application/json"
}
Body
{
"status": "ACTIVE"
}
Response
200
{
"data": {
"id": "1d5693b9-b7b5-492d-8219-c21f34bcaca6",
"name": "Agency Onboarding - 2023-06-06",
"description": "This promotion package contains configuration to support the agency onboarding processes...",
"source": "https://{domain}.{environment}.workfront.com",
"status": "ACTIVE",
"version": 1,
"createdAt": "2023-06-06T17:29:21.600Z",
"publishedAt": "2023-06-06T19:39:01.600Z",
"customerId": "61aa9d090005fa42152c1cb66659f38d",
"packageEntities": {
"GROUP": [
{
"id": "52aa9d0e0005fcee8f212835bdaa2691",
"name": "Default Group",
"description": "..."
}
],
"ROLE": [
{...}
],
...
}
}
}
Delete a package
This call deletes the promotion package record. This action is irreversible.
URL
DELETE https://{domain}.{environment}.workfront.com/environment-promotion/api/v1/packages/{id}
Headers
{
"apikey": "**********"
}
Or
{
"sessionID": "*****************"
}
Body
Empty
Response
200
Deleted
Execute a pre-run
This call conducts a comparison between the package definition and the target environment identified in the URL.
The result is a JSON body that identifies whether a promotion object is found or not in the target environment.
For each promotion object, one of the following actions
will be set:
There is currently no support for an UPDATE action
in the alpha capabilities of this service. The option to allow for an UPDATE action
is something we are researching.
URL
POST https://{domain}.{environment}.workfront.com/environment-promotion/api/v1/packages/:id/prepare-installation
Headers
{
"apikey": "**********",
"Content-Type": "application/json"
}
Or
{
"sessionID": "*****************",
"Content-Type": "application/json"
}
Body
{}
Response
200
{
"environmentPromotionPackageId": "45f2ae94-76c0-4b13-8f3b-f688de83043d",
"environmentPromotionPackageVersion": 1,
"id": "c0bc79bd-c9c1-4b5b-b118-b1241392de0e",
"userId": "5ba38da500b752fd66439d4f6a9999a1",
"customerId": "5ba38d9d00b74f0c7a38b1b487fc9710",
"status": "PREPARING",
"environment": "mmi.my.workfront.com",
"registeredAt": "2023-10-19T20:00:16.697Z",
"updatedAt": "2023-10-19T20:00:16.701Z",
"translationMap": {
"CTGY": {
"62d9c9a0000013aeeefe7242a0a5fdb2": {
"name": "Example Document Form",
"action": "USEEXISTING",
"isValid": true,
"targetId": "62d9c9a0000013aeeefe7242a0a5fdb2"
}
},
"PGRP": {
"62d1eee4001c6618e6b9f9a588ba1598": {
"name": "Asset Detail",
"action": "USEEXISTING",
"isValid": true,
"targetId": "62d1eee4001c6618e6b9f9a588ba1598"
}
},
"GROUP": {
"5ba38da500b752b0f46d13186030b7ad": {
"name": "Default Group",
"action": "USEEXISTING",
"isValid": true,
"targetId": "5ba38da500b752b0f46d13186030b7ad"
}
},
"PARAM": {
"62d1eee400f8578895166ee91a83f97a": {
"name": "Asset Type",
"action": "USEEXISTING",
"isValid": true,
"targetId": "62d1eee400f8578895166ee91a83f97a"
},
"62d1eee50001407c713514a8970b58e4": {
"name": "Keywords",
"action": "USEEXISTING",
"isValid": true,
"targetId": "62d1eee50001407c713514a8970b58e4"
},
"62d1eee5000333ac3981ea4f3df6d88e": {
"name": "Permitted Uses",
"action": "USEEXISTING",
"isValid": true,
"targetId": "62d1eee5000333ac3981ea4f3df6d88e"
},
"62d1eee5000b188e9ec8039a097fc7ab": {
"name": "File Format",
"action": "USEEXISTING",
"isValid": true,
"targetId": "62d1eee5000b188e9ec8039a097fc7ab"
},
"62d1eee500100c159fd5f838ce560507": {
"name": "CTA",
"action": "USEEXISTING",
"isValid": true,
"targetId": "62d1eee500100c159fd5f838ce560507"
},
"62d9c988001c1f23954dbb9d646335b5": {
"name": "Other CTA",
"action": "USEEXISTING",
"isValid": true,
"targetId": "62d9c988001c1f23954dbb9d646335b5"
},
"62d9c9880070f546cf4c798ea6c3eaa4": {
"name": "Other Audience",
"action": "USEEXISTING",
"isValid": true,
"targetId": "62d9c9880070f546cf4c798ea6c3eaa4"
},
"62d9c990006258baf1b40f2569c3eab7": {
"name": "Target Audience",
"action": "USEEXISTING",
"isValid": true,
"targetId": "62d9c990006258baf1b40f2569c3eab7"
}
}
}
}
id
field. In this example, the id
field is third from the top, and has a value beginning with c0bc79bd
.Execute an installation
This call initiates an installation attempt of a promotion package into the target environment identified in the POST URL.
URL
POST https://{domain}.{environment}.workfront.com/environment-promotion/api/v1/installations/{id}/install
Headers
{
"apikey": "**********",
"Content-Type": "application/json"
}
Or
{
"sessionID": "*****************",
"Content-Type": "application/json"
}
Body
{
}
Response
202
{}
Get a list of installations for a specific package
The results include installation events from all environments the package has been deployed to. They are not limited to the installations for the environment through which the request is being made. This allows you to identify which environments have received this package.
URL
GET https://{domain}.{environment}.workfront.com/environment-promotion/api/v1/installations?environmentPromotionPackageId={environmentPromotionPackageId}
Headers
{
"apikey": "**********"
}
Or
{
"sessionID": "*****************"
}
Body
Empty
Response
200
[
{
"id": "2892b936-e09e-455a-935f-e1462ab9753c",
"environmentPromotionPackageId": "4fae2b9d-d315-45f4-909f-a0c0d79fc65d",
"environmentPromotionPackageVersion": 1,
"userId": "8fbbc5bcf4f94a5b862483ee05573e73",
"customerId": "54286d78b064451096752b99bf968481",
"status": "INSTALLED",
"environment": "https://{domain}.{environment}.workfront.com",
"registeredAt": "2021-03-16T02:21:31.908Z",
"updatedAt": null,
"translationMap": {
"ROLE": {
"5f6d114f006883209828ddd9088e63b3": {
"name": "DAM Curator",
"action": "USEEXISTING",
"isValid": true,
"targetId": "600f4bed00028a718599f29575840053"
},
"ad535a9ebe647361e053a7656a0a1575": {
"name": "Copywriter",
"action": "USEEXISTING",
"isValid": true,
"targetId": "600f162700001ca051081c06667b14a4"
},
...
},
"TMPL": {
"5f9b317c00b3db5af69abcd1ed5f82aa": {
"name": "Digital Asset Production (Integrated)",
"action": "CREATE",
"isValid": true,
"targetId": "6054cda40000d5af63dc811d9c2b3a07"
},
...
},
...
}
},
{...}
]
Get the installation details for an installation
This call will return the final translationMap
produced by the installation service for a specific installation.
Each record will state what the prescribed action
was and whether that action was successful or not.
For records with a CREATE action
the targetId
field will be set with the value of the newly created record in the target system. Additionally, the installationStatus
field will be set to INSTALLED.
For records with the USEEXISTING action
the targetId
field will also be set, and the installationStatus
field will be set to REGISTERED. This signifies that the mapping process was complete and the installation service acknowledges that it has evaluated the record and there is nothing to act on.
If the record has a CREATE action
but it fails to successfully create the record, then the installationStatus
will be set to FAILED and the reason for the failure will also be provided.
URL
GET https://{domain}.{environment}.workfront.com/environment-promotion/api/v1/installations/{id}
Headers
{
"apikey": "**********"
}
Or
{
"sessionID": "*****************"
}
Body
Empty
Response
200
{
"id": "2892b936-e09e-455a-935f-e1462ab9753c",
"environmentPromotionPackageId": "4fae2b9d-d315-45f4-909f-a0c0d79fc65d",
"environmentPromotionPackageVersion": 1,
"userId": "8fbbc5bcf4f94a5b862483ee05573e73",
"customerId": "54286d78b064451096752b99bf968481",
"status": "INSTALLED",
"environment": "https://{domain}.{environment}.workfront.com",
"registeredAt": "2021-03-16T02:21:31.908Z",
"updatedAt": null,
"translationMap": {
"ROLE": {
"5f6d114f006883209828ddd9088e63b3": {
"name": "DAM Curator",
"action": "USEEXISTING",
"isValid": true,
"targetId": "600f4bed00028a718599f29575840053"
},
...
},
"TMPL": {
"5f9b317c00b3db5af69abcd1ed5f82aa": {
"name": "Digital Asset Production (Integrated)",
"action": "CREATE",
"isValid": true,
"targetId": "6054cda40000d5af63dc811d9c2b3a07"
},
...
},
...
}
}
Overwriting
This is a three step process.
- Create a translation map (this is analogous to the “prepare installation” phase)
- Edit the generated translation map, setting the
action
andtargetId
fields for any object that they want to overwrite. The action should beOVERWRITING
, and thetargetId
should be the uuid of the object that should be overwritten - Execute the installation.
Step 1 - Create a Translation Map
URL
POST https://{domain}.{environment}.workfront.com/environment-promotion/api/v1/packages/{id}/translation-map
Body
None
Response
A translation map, with a 202 - OK
status
{
{objcode}: {
{object uuid}: {
"targetId": {uuid of object in destination},
"action": {installation action},
"name": {name of the object},
"isValid": true
},
{...more objects}
},
{...more objcodes}
}
Example
{
"UIVW": {
"109f611680bb3a2b0c0a8c1f5ec63f6d": {
"targetId": "6643a26b0001401ff797ccb318f97aa6",
"action": "CREATE",
"name": "Actual Portfolio Cost by Program",
"isValid": true
}
},
"UIGB": {
"edb4c6c127d38910e4860eb25569a5cc": {
"targetId": "6643a26b000178fb5cc27b74cc1e87ec",
"action": "USEEXISTING",
"name": "Actual Portfolio Cost by Program",
"isValid": true
}
},
"UIFT": {
"f97b662e229fd09ee595d8d359ec88bd": {
"targetId": "6643a26b00015cdd6727b76d6fda1d1d",
"action": "USEEXISTING",
"name": "Actual Portfolio Cost by Program",
"isValid": true
}
},
"PTLSEC": {
"4bb80aa88a96420296a7f47bf866f162": {
"targetId": "4bb80aa88a96420296a7f47bf866f162",
"action": "USEEXISTING",
"name": "Actual Portfolio Cost by Program",
"isValid": true
}
},
"EXTSEC": {
"65f8637900015e4dceb6fe079bd5409d": {
"targetId": "65f8637900015e4dceb6fe079bd5409d",
"action": "USEEXISTING",
"name": "Asnyc List",
"isValid": true
}
},
"PTLTAB": {
"65f8638a00016422a83ddc3508852d0f": {
"targetId": "65f8638a00016422a83ddc3508852d0f",
"action": "CREATEWITHALTNAME",
"name": "Cool 2.0 The Best",
"isValid": true
}
}
}
Step 2 - Modify the Translation Map
There is no endpoint for this step.
-
In the translation map returned in Step 1 - Create a Translation Map, inspect the list of objects that will be installed.
-
Update the action field on each object to the desired install action.
-
Validate the
targetId
on each object. If the set action isUSEEXISTING
orOVERWRITING
, thetargetId
should be set to the UUID of the target object in the destination environment. For any other action, the targetId should be an empty string.note note NOTE The targetId
is already populated if a collision was detected.
Step 3 - Install
URL
POST https://{domain}.{environment}.workfront.com/environment-promotion/api/v1/packages/{id}/install
Body
This is an object with a single field translationMap
, which should equal the modified translation map from Step 2 - Modify the Translation Map.
{
"translationMap": {
{objcode}: {
{object uuid}: {
"targetId": {uuid of object in destination},
"action": {installation action},
"name": {name of the object},
"isValid": true
},
{...more objects}
},
{...more objcodes}
}
}
Example
{
"translationMap": {
"UIVW": {
"109f611680bb3a2b0c0a8c1f5ec63f6d": {
"targetId": "6643a26b0001401ff797ccb318f97aa6",
"action": "USEEXISTING",
"name": "Actual Portfolio Cost by Program",
"isValid": true
}
},
"UIGB": {
"edb4c6c127d38910e4860eb25569a5cc": {
"targetId": "6643a26b000178fb5cc27b74cc1e87ec",
"action": "USEEXISTING",
"name": "Actual Portfolio Cost by Program",
"isValid": true
}
},
"UIFT": {
"f97b662e229fd09ee595d8d359ec88bd": {
"targetId": "6643a26b00015cdd6727b76d6fda1d1d",
"action": "OVERWRITING",
"name": "Actual Portfolio Cost by Program",
"isValid": true
}
},
"PTLSEC": {
"4bb80aa88a96420296a7f47bf866f162": {
"targetId": "4bb80aa88a96420296a7f47bf866f162",
"action": "USEEXISTING",
"name": "Actual Portfolio Cost by Program",
"isValid": true
}
},
"EXTSEC": {
"65f8637900015e4dceb6fe079bd5409d": {
"targetId": "65f8637900015e4dceb6fe079bd5409d",
"action": "USEEXISTING",
"name": "Asnyc List",
"isValid": true
}
},
"PTLTAB": {
"65f8638a00016422a83ddc3508852d0f": {
"targetId": "65f8638a00016422a83ddc3508852d0f",
"action": "CREATEWITHALTNAME",
"name": "Cool 2.0 The Best",
"isValid": true
}
}
}
}
Response
The response includes the {uuid of the created installation}
and a 202 - ACCEPTED
status.
Example: b6aa0af8-3520-4b25-aca3-86793dff44a6