Search Test Case API Example

API URl: https://qtmcloud.qmetry.com/rest/api/latest/testcases/search

Method: Post

Request Header:

  • apiKey : <your apiKey>
  • Content-Type : application/json
Request Body
{
  "filter": {
    "projectId": <"Project Id of the project of the intended Test Case">,
	"key": <"Test Case Key">
  }
}

Success: 200

Response Body
{
  "total": 1,
  "startAt": 0,
  "maxResults": 50,
  "data": [
    {
      "summary": "Track Hydration ",
      "isAutomated": false,
      "id": "42UlG9FV1M",
      "assignee": "5c4804bf137421218b598342",
      "priority": {
        "name": "Medium",
        "id": 92,
        "iconUrl": "https://s3.amazonaws.com/qtm4j-cloud-prod-4/staticResources/priorityIcons/Medium.svg"
      },
      "version": {
        "isLatestVersion": true,
        "versionNo": 1
      },
      "projectId": 10001,
      "key": "FT-TC-3",
      "status": {
        "color": "#4a6785",
        "name": "To Do",
        "id": 208
      }
    }
  ]
}

Failure: 400 Project does not exist or QMetry Test Management for JIRA

{
  "status": 404,
  "errorMessage": "Project does not exist or QMetry Test Management for JIRA is not enabled for this project",
  "timestamp": "08/Jul/2019 07:49"
}