Apps documentation
TestFLO - Test Management for Jira
TestFLO - Test Management for Jira
7.9.x
7.8.x
7.7.x
7.6.x
7.5.x
7.4.x
7.2.x
7.1.x
7.0.x
FAQ
Release notes
Last updated Aug 26, 2019

REST API

This section provides information on how to use the REST API with TestFLO elements.

You can use the Jira REST API to perform such operations as:

  • Create Test Case Templates and Test Plans
  • Change status of Test Case and Test Plans
  • Update fields on your TC, TP
  • Attach test result to TC
  • Others

We have extended REST API with following methods:

Change Steps status

Below you can find REST endpoint for the Change Steps status. Parameters should be passed in a JSON file.

Method: PUT

URL: $jira_context/rest/tms/1.0/steps/status

Parameters:

  • issueId (ID issue number in which the status in the Steps has to be changed)
  • rowIndex (number of row index in Steps without counting groups, starting from 0)
  • status (name of status configured in Steps status in project)

See the sample file with a structure - change_steps_status.json

Create TC with Steps

Below you can find REST endpoint for the Create Test Case with Steps. Parameters should be passed in a JSON file.

Method: POST

URL: $jira_context/rest/api/2/issue

Parameters:

  • key (project)

  • parent (key of parent issue)

  • issuetype (Test Case)

  • customfield_ID (ID number of TC Template field, issuekey of TCT)

  • customfield_ID (ID number of Steps field)

  • isGroup (value: true or false)

    • If the parameter is true, it is a group.
    • If the parameter is false, then this is a step.
  • cells

    • If the isGroup parameter is set to true then fill in the name of the group. This parameter accepts only one cell.
    • If the isGroup parameter is set to false then fill the data for the row from the Steps field. The number of columns in the file has to be the same as Steps columns configuration from the project.

See the sample file with a structure (configuration of three columns in Steps) - tc_create_with_steps.json

Create TCT with Steps

Below you can find REST endpoint for the Create Test Case Templates with Steps. Parameters should be passed in a JSON file.

Method: POST

URL: $jira_context/rest/api/2/issue

Parameters:

  • key (project)

  • issuetype (Test Case Template)

  • customfield_ID (ID number of Steps field)

  • isGroup (value: true or false)

    • If the parameter is true, it is a group.
    • If the parameter is false, then this is a step.
  • cells

    • If the isGroup parameter is set to true then fill in the name of the group. This parameter accepts only one cell.
    • If the isGroup parameter is set to false then fill the data for the row from the Steps field. The number of columns in the file has to be the same as Steps columns configuration from the project.

See the sample file with a structure (configuration of three columns in Steps) - tct_create_with_steps.json

Create TCT with Preconditions

Below you can find REST endpoint for the Create Test Case Templates with Preconditions. Parameters should be passed in a JSON file.

Method: POST

URL: $jira_context/rest/api/2/issue

Parameters:

  • key (project)
  • issuetype (ID of Test Case Template issue type)
  • customfield_ID (ID number of Preconditions field)

See the sample file with a structure - tct_create_with_preconditions.json

Update Steps at issue

Below you can find REST endpoint for the Update Steps at issue. Parameters should be passed in a JSON file.

Method: PUT

URL: $jira_context/rest/api/2/issue/{ISSUE-KEY}

Parameters:

  • customfield_ID (ID number of Steps field)

  • isGroup (value: true or false)

    • If the parameter is true, it is a group.
    • If the parameter is false, then this is a step.
  • cells

    • If the isGroup parameter is set to true then fill in the name of the group. This parameter accepts only one cell.
    • If the isGroup parameter is set to false then fill the data for the row from the Steps field. The number of columns in the file has to be the same as Steps columns configuration from the project.

See the sample file with a structure (configuration of three columns in Steps) - update_steps_at_issue.json

Update Preconditions at issue

Below you can find REST endpoint for the Update Preconditions at issue. Parameters should be passed in a JSON file.

Method: PUT

URL: $jira_context/rest/api/2/issue/{ISSUE-KEY}

Parameters:

  • customfield_ID (ID number of Preconditions field)

See the sample file with a structure - update_preconditions_at_issue.json

Copy Test Plan

Below you can find REST endpoint for the Copy Test Plan operation. Parameters should be passed in a JSON file.

Method: POST

URL: $jira_context/rest/tms/1.0/testplan/copy

Parameters:

  • testPlanKey - issue key of the source test plan.

  • projects (optional) - list of projects, in which test plan copies will be created, if skipped default project comes from copied test plan.

  • copyStrategy (optional) - method of creating test cases on test plan copies. Valid values:

    * **BY_TEST_CASE_TEMPLATES** (default) - test cases will be created with data from their templates.
    * **BY_TEST_CASES** - test cases will be created with data from test cases from source test plan.
    
  • issueIds (optional) - list of test cases/test case templates ids to copy, if not provided then all issues are copied.

  • async (optional) - should request be executed asynchronously, default is false. If true then result will not contain created test cases.

See the sample file with a structure - copy_tp.json

Get Test Case ids on Test Plan

Below you can find REST endpoint for the getting test case ids on test plan. Returned ids are ordered same as on test plan.

Method: GET

URL: $jira_context/rest/tms/1.0/testplan/test-case-ids/{TEST-PLAN-KEY}

Get Test Case Template ids on Test Plan

Below you can find REST endpoint for the getting test case template ids on test plan. Returned ids are unique and ordered the same as test cases on test plan. Parameters should be passed in a JSON file.

Method: GET

URL: $jira_context/rest/tms/1.0/testplan/test-case-template-ids/{TEST-PLAN-KEY}?onlyActive=false

Parameters:

  • onlyActive (value: true/false):
    • if parameter is true, then returns only active templates.
    • if parameter is false, then returns all templates (active and inactive). This parameter is set as the default.

Modify Enhanced Issues Picker custom field

Below you can find REST endpoint for modifying Enhanced Issues Picker custom field (Requirement custom field). Parameters should be passed in a JSON file.

Below you will find an example creating Test Case Template with Requirement value.

Method: POST

URL: $jira_context/rest/api/2/issue

Parameters:

  • customfield_ID (ID number of Requirement field)

See the sample file with a structure - modify-eip.json