Skip to main content

Create Advanced Test Plans in Bulk (API)

Create several Advanced Test Plans in one request, link their requirements, and save the plan and first-iteration identifiers.

Create several Advanced Test Plans in one request. For each plan, you can set dates, choose a Test Plan Folder, and link requirements from Jira work items or Test Folders.

Vansah creates iteration 1 for each plan and includes the Test Cases already linked to its selected requirements. This request creates plans and their links; it does not execute tests.

Before you begin

  • Create a Vansah API token and use the Vansah URL supplied for your workspace.

  • Make sure the token account can access the destination Jira space and the work items or Test Folders you want to include.

  • Collect the Jira work item keys and Test Folder UUIDs for the requirements.

  • If you want to organize the plans in a Test Plan Folder, have that folder’s UUID. It must belong to the destination Jira space.

The examples use Bash and cURL. Set VANSAH_URL to your Vansah base URL without a trailing slash and VANSAH_TOKEN to your API token. Replace DEMO with your Jira space key. Keep your token private.

Endpoint and headers

POST /api/v2/advancedTestPlan/bulk?projectKey=DEMO

Header

Value

Authorization

Your Vansah API token, without a Bearer prefix.

Content-Type

application/json

Accept

application/json

The query parameter projectKey is the Jira space key where the plans will be created. All plans in the request use that destination space.

1. Prepare the request

Send a JSON object containing a data array. Each item describes a new plan.

Field inside each plan

What to send

name

Required string, 1–255 characters. Use a descriptive plan name.

startDate

Optional start date in YYYY-MM-DD format.

endDate

Optional end date in YYYY-MM-DD format. If both dates are supplied, the end date must be on or after the start date.

testPlanFolder.identifier

Optional UUID of an existing Test Plan Folder in the destination Jira space. Omit it to create the plan without a folder association.

requirements.issue

Optional array of objects with a Jira work item key, for example {"key":"DEMO-123"}.

requirements.testFolder

Optional array of objects with an existing Test Folder UUID in identifier.

A Test Plan Folder organizes plans. A Test Folder under requirements identifies a requirement and supplies its linked Test Cases. Their identifiers are different.

Minimal example

This creates one plan without dates or requirements:

{
"data": [
{
"name": "Release 3.2 Regression"
}
]
}

Example: two plans with requirements

Save this as advanced-plans.json. Replace the work item keys, folder UUIDs, names, and dates with your own values. Omit optional fields you do not need.

{
"data": [
{
"name": "Release 3.2 Regression",
"startDate": "2026-11-16",
"endDate": "2026-11-20",
"testPlanFolder": {
"identifier": "4df41ddc-facf-41ef-892e-2e4c1a6a0f74"
},
"requirements": {
"issue": [
{
"key": "DEMO-123"
},
{
"key": "DEMO-124"
}
],
"testFolder": [
{
"identifier": "675ab256-06c5-4f09-bf96-a6c5c347d057"
}
]
}
},
{
"name": "Release 3.2 Smoke",
"startDate": "2026-11-16",
"endDate": "2026-11-16",
"requirements": {
"issue": [
{
"key": "DEMO-125"
}
]
}
}
]
}

Find folder identifiers

  • Use GET /api/v2/testplan/folders?projectKey=DEMO&type=list to retrieve Test Plan Folders for organizing the plans.

  • Use GET /api/v2/testFolders?projectKey=DEMO&type=list to retrieve Test Folders for requirements.

Use the returned identifier, not a folder name or copied folder path, in this request.

2. Create the plans

curl --request POST \
--url "$VANSAH_URL/api/v2/advancedTestPlan/bulk?projectKey=DEMO" \
--header "Authorization: $VANSAH_TOKEN" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data-binary @advanced-plans.json

For each plan, Vansah links the selected requirements, includes their active linked Test Case versions, and creates the first iteration using the plan’s dates. A plan with no selected requirements starts without linked requirement Test Cases.

Check before retrying: Repeating the request creates new plans. After a timeout or error, review Vansah to see what was created before sending it again. A failure partway through a batch can leave plans already created.

3. Save the returned identifiers

Example successful response:

{
"success": true,
"message": "Advanced Test Plan/s created successfully",
"data": [
{
"identifier": "0403a89d-0ac3-41f0-b619-a6332c493f52",
"name": "Release 3.2 Regression",
"iterationIdentifier": "0404ecee-0ac3-41f0-b619-a6332c493f52",
"tpKey": "DEMO-P79"
},
{
"identifier": "04211097-0ac3-41f0-b619-a6332c493f52",
"name": "Release 3.2 Smoke",
"iterationIdentifier": "04220207-0ac3-41f0-b619-a6332c493f52",
"tpKey": "DEMO-P80"
}
]
}

Response field

Meaning

success and message

Whether the request succeeded and a summary of the outcome.

data

The array of created plans.

data[].identifier

The plan’s UUID.

data[].name

The saved plan name.

data[].iterationIdentifier

The UUID of the first iteration created for the plan.

data[].tpKey

The readable Test Plan key, such as DEMO-P79.

Open the plans in Vansah and confirm their dates, requirements, and Test Cases. To execute a linked Test Case, use Create a Test Run in an Advanced Test Plan (API) with the returned plan key and the intended iteration and requirement.

Troubleshooting

Message or issue

What to check

One or more validation errors found.

Inspect data.errors. Check names, dates, array structures, and Test Folder UUIDs.

endDate must be greater than or equal to startDate

Set the end date to the same day as, or later than, the start date.

Invalid Issues provided: ...

Check the work item keys and the token account’s access to each work item.

Not able to verify the following folders: ...

Check the Test Folder UUIDs and their workspace.

Invalid Test Plan Folder Identifier/s provided: ...

Use an active Test Plan Folder UUID from the destination Jira space.

Please provide space information

Include the correct projectKey, which is the Jira space key.

Missing Test Cases in a new plan

Check that the intended versions are linked to the selected requirements before creating the plan. Selecting a folder does not automatically select every subfolder.

Something went wrong while Creating Advanced Test Plan/s

Check which plans were created before retrying. If the issue continues, contact Vansah Support with the request and response, without your token.

Example validation error:

{
"success": false,
"message": "One or more validation errors found.",
"data": {
"errors": [
{
"value": "2026-11-15",
"msg": "endDate must be greater than or equal to startDate",
"param": "data[0].endDate",
"location": "body"
}
]
}
}

You can also view this request in the Vansah API collection in Postman.

Did this answer your question?