How to Trigger App Version Run via API with Tags

Modified on Sun, Jun 14 at 3:24 PM

Overview

This API triggers an App Version Run in TestGrid using a cURL request. It is useful when you want to automatically execute selected test cases on a specific app version through CI/CD pipelines, scripts, or external automation workflows.

The tags parameter allows you to run only the test cases that are mapped to specific tags.


Endpoint

URL: https://{your_domain}.testgrid.io/ci/app_version_run

Method: POST


Request Parameters

ParameterTypeRequiredDescriptionExample
user_tokenStringYesTestGrid user authentication tokenabc123xyz
application_tokenStringYesApplication token of the selected applicationapp_token_123
version_tokenStringYesVersion token of the selected app versionver_token_123
s_deviceStringYesDevice S ID on which the execution should runIP7PSK
process_typeStringYesExecution type. Supported values: oaa (Android), oia (iOS), ow (Web)oaa
app_build_idIntegerYesBuild ID of the uploaded application build1709
tagsStringNoTag used to filter test cases. Multiple tags can be passed as comma-separated valuessmoke,regression

Example Request

curl --request POST
--url https://{your_domain}.testgrid.io/ci/app_version_run
--header 'content-type: multipart/form-data'
--header 'cookie: _testgrid={your_session_cookie}'
--cookie _testgrid={your_session_cookie}
--form user_token={user_token}
--form application_token={application_token}
--form version_token={version_token}
--form s_device={s_device}
--form process_type={process_type}
--form app_build_id={app_build_id}
--form tags={tag_name}

Example with Multiple Tags

curl --request POST
--url https://{your_domain}.testgrid.io/ci/app_version_run
--header 'content-type: multipart/form-data'
--header 'cookie: _testgrid={your_session_cookie}'
--cookie _testgrid={your_session_cookie}
--form user_token={user_token}
--form application_token={application_token}
--form version_token={version_token}
--form s_device={s_device}
--form process_type={process_type}
--form app_build_id={app_build_id}
--form tags=smoke,regression,RunByTag


Example API Response

[
{
"test_suite_id": "211",
"build_data": {
"status": 0,
"msg": "Some selected test cases lack test steps. Please either add steps to these test cases or run only the test cases with existing steps."
}
},
{
"test_suite_id": "212",
"build_data": {
"status": 1,
"msg": "Successfully upload build",
"build_id": 1709,
"build_name": 15,
"temp_build_id": 40700,
"current_date": "11/27/25",
"created": "Thursday 11/27/2025 07:13:49 am EDT",
"frm_application_type": "1"
}
},
{
"test_suite_id": "213",
"build_data": {
"status": 1,
"msg": "Successfully upload build",
"build_id": 1710,
"build_name": 16,
"temp_build_id": 40702,
"current_date": "11/27/25",
"created": "Thursday 11/27/2025 07:13:49 am EDT",
"frm_application_type": "1"
}
}
]


Response Parameters

ParameterDescription
test_suite_idID of the test suite included in the triggered run
build_dataContains build trigger result details for the test suite
statusIndicates whether the build was triggered successfully
msgMessage describing the trigger result
build_idGenerated build ID for the triggered run
build_nameBuild name or sequence number
temp_build_idTemporary build reference ID
current_dateDate on which the run was triggered
createdTimestamp when the run was created
frm_application_typeApplication type associated with the triggered run

Outcome

The API triggers an App Version Run for the selected app version and device. When tags are provided, only test cases associated with those tags are executed, allowing controlled and flexible test execution.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article