Apps documentation
TestFLO - Test Management for Jira
TestFLO - Test Management for Jira
8.9.x
8.8.x
8.7.x
8.5.x
8.4.x
8.3.x
8.2.x
8.1.x
8.0.x
FAQ
Release notes
Last updated Feb 22, 2021

REST API

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

Info

To be able to use TestFLO elements, we have added our dedicated REST API, which is available at https://app.swaggerhub.com/apis-docs/DevinitiApps/testflo-public-api/8.6.0

Note

Since TestFLO 8.1 version the URL pattern has been changed to $jira_context/rest/tms/1.0/api/$api_endpoint. The old URL pattern is compatible but we recommend changing to the new pattern.

You can also use the Jira REST API to perform such operations as create issues, update fields, change issue status and others. For more information on using REST API in Jira, see official Atlassian documentation. Below you will find some examples of using Jira’s REST API and elements from TestFLO:

Create TC with Steps

This endpoint allows you to create Test Case with Steps. Body request should be passed as JSON.

Method: POST

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

Body request properties:

  • 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 property is true, it is a group.
    • If the property is false, then this is a step.
  • cells
    • If the isGroup property is set to true then fill in the name of the group. This property accepts only one cell.
    • If the isGroup property 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.
Example

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

Create TCT with Steps

This endpoint allows you to create Test Case Templates with Steps. Body request should be passed as JSON.

Method: POST

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

Body request properties:

  • key (project)
  • issuetype (Test Case Template)
  • customfield_ID (ID number of Steps field)
  • isGroup (value: true or false)
    • If the property is true, it is a group.
    • If the property is false, then this is a step.
  • cells
    • If the isGroup property is set to true then fill in the name of the group. This property accepts only one cell.
    • If the isGroup property 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.
Example

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

Create TCT with Preconditions

This endpoint allows you to create Test Case Templates with Preconditions. Body request should be passed as JSON.

Method: POST

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

Body request properties:

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

See the sample file with a structure - tct_create_with_preconditions.json

Update Steps at issue

This endpoint allows you to update Steps at issue. Body request should be passed as JSON.

Method: PUT

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

Body request properties:

  • customfield_ID (ID number of Steps field)
  • isGroup (value: true or false)
    • If the property is true, it is a group.
    • If the property is false, then this is a step.
  • cells
    • If the isGroup property is set to true then fill in the name of the group. This property accepts only one cell.
    • If the isGroup property 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.
Example

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

Update Preconditions at issue

This endpoint allows you to update Preconditions at issue. Body request should be passed as JSON.

Method: PUT

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

Body request properties:

  • customfield_ID (ID number of Preconditions field)
Example

See the sample file with a structure - update_preconditions_at_issue.json

Modify Enhanced Issues Picker custom field

This endpoint allows you to modify Enhanced Issues Picker custom field (Requirement custom field). Body request should be passed as JSON.

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

Method: POST

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

Body request properties:

  • customfield_ID (ID number of Requirement field)
Example

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