How to add an additional program to the list of existing programs using a PATCH request in Jira Align

Platform Notice: Cloud and Data Center - This article applies equally to both cloud and data center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

This article shows what request body should be used in order to add additional program(s) to the list of existing programs and not replace them.

Solution

There are two options available:

1- Provide in the request body the exact list of IDs in the array of all the IDs of the program you want to have (existing and new ones).

1 2 3 4 5 6 7 [ { "op": "add", "path": "/additionalProgramIds/", "value":[1111, 1112] } ]
(Auto-migrated image: description temporarily unavailable)

If you do not provide the complete list of IDs, the existing ones will be removed as this replaces the existing values with the ones specified in the body.

As a result, the above body will replace whatever is existing with the new array containing the IDs 1111 and 1112.

2- Provide in the request body only the id(s) you want to add to the array list:

1 2 3 4 5 6 7 [ { "op": "add", "path": "/additionalProgramIds/-", "value": 1111 } ]

or more than one ID:

1 2 3 4 5 6 7 8 9 10 11 12 [ { "op": "add", "path": "/additionalProgramIds/-", "value": 1111 }, { "op": "add", "path": "/additionalProgramIds/-", "value": 1112 } ]

The above body will add the program with id 1111 (and 1112) to the existing list of arrays.

(Auto-migrated image: description temporarily unavailable)

Notice the extra hyphen '-' at the end path and the type of the value that is passed.

Updated on April 14, 2025

Still need help?

The Atlassian Community is here for you.