Skip to main content
Skip table of contents

REST API

This documentation explains the list of publicly available REST API in synapseRT NextGen to perform the products own actions via programmatically.

Add Test Cases to Test Plan

POST /rest/synapse/latest/public/testPlan/{testPlanIssueKey}/addMembers

Request

 Example

CODE
{
	"testCaseKeys":["ABC-1","ABC-2","ABC-3"]
}
Response

STATUS 200 Returned if the Test Cases are successfully added to the Test Plan

STATUS 403 Returned if the user is not authorized perform the action or there is no valid license

STATUS 404 Returned if the testPlanIssueKey provided is not found

STATUS 500 Returned if there is any validation error with input data or any unknown Internal Server Error

Add Test Cycle to Test Plan

POST /rest/synapse/latest/public/testPlan/{testPlanIssueKey}/addCycle

Request

Example

CODE
{
	"name":"Sample Cycle",
	"environment":"Firefox",
	"build":"8.1"
}
Response

STATUS 200 Returned if the Test Cycle is successfully added to the Test Plan

STATUS 403 Returned if the user is not authorized perform the action or there is no valid license

STATUS 404 Returned if the testPlanIssueKey provided is not found

STATUS 500 Returned if there is any validation error with input data or any unknown Internal Server Error

Update Test Cycle Status

PUT /rest/synapse/latest/public/testPlan/{testPlanIssueKey}/cycle/{cycleName}/wf/{action}

Request

Valid actions are

  • Start
  • Complete
  • Abort
  • Resume
Response

STATUS 200 Returned if the Test Cycle status is updated successfully

STATUS 403 Returned if the user is not authorized perform the action or there is no valid license

STATUS 404 Returned if the testPlanIssueKey provided is not found

STATUS 500 Returned if there is any validation error with input data or any unknown Internal Server Error

Update Test Run

POST /rest/synapse/latest/public/testPlan/{testPlanIssueKey}/cycle/{cycleName}/updateTestRun

Request

Example

CODE
{
	"testcaseKey":"ABC-4",
	"result":"Passed",
	"comment":"Updated through REST"
}

Response

STATUS 200 Returned if the Test Run is updated successfully

STATUS 403 Returned if the user is not authorized perform the action or there is no valid license

STATUS 404 Returned if the testPlanIssueKey provided is not found

STATUS 500 Returned if there is any validation error with input data or any unknown Internal Server Error

Link Bug to Test Run

POST /rest/synapse/latest/public/testPlan/{testPlanIssueKey}/cycle/{cycleName}/linkBugToTestRun

Request

Example

CODE
{
	"testcaseKey":"ABC-5",
	"bugs":["ABC-6","ABC-7"]
}

Response

STATUS 200 Returned if the Bug is successfully linked to the Test Run

STATUS 403 Returned if the user is not authorized perform the action or there is no valid license

STATUS 404 Returned if the testPlanIssueKey provided is not found

STATUS 500 Returned if there is any validation error with input data or any unknown Internal Server Error

Get Test Cycles in a Test Plan

GET /rest/synapse/latest/public/testPlan/{testPlanIssueKey}/cycles

Response

STATUS 200 Returned if the Test Cycles are successfully retrieved

Example

CODE
[
    {
        "ID": 1,
        "name": "Cycle 1",
        "status": "Completed",
        "draft": false,
        "deleteable": false,
        "cycleStartedDate": "2016-04-11T12:44:15.105+0530",
        "cycleCompletedDate": "2016-04-29T15:48:01.806+0530"
    },
    {
        "ID": 2,
        "name": "Cycle 2",
        "status": "Aborted",
        "draft": false,
        "deleteable": false,
        "cycleStartedDate": "2016-04-15T15:53:53.854+0530",
        "cycleCompletedDate": "2016-04-29T15:48:17.640+0530"
    },
    {
        "ID": 3,
        "name": "Cycle 3",
        "status": "Active",
        "draft": false,
        "deleteable": false,
        "cycleStartedDate": "2016-04-15T15:54:03.909+0530"
    },
    {
        "ID": 4,
        "name": "Cycle 4",
        "status": "Draft",
        "draft": true,
        "deleteable": true
    }
]

STATUS 403 Returned if the user is not authorized perform the action or there is no valid license

STATUS 404 Returned if the testPlanIssueKey provided is not found

STATUS 500 Returned if there is any validation error with input data or any unknown Internal Server Error

Get Test Runs in a Test Cycle

GET /rest/synapse/latest/public/testPlan/{testPlanIssueKey}/cycle/{cycleName}/testRuns

Response

STATUS 200 Returned if the Test Runs are successfully retrieved

Example

CODE
[
	{
		"ID": 1,
		"summary": "Case 1",
		"status": "Failed",
		"testCaseKey": "TP-3",
		"executedBy": "admin",
		"attachments":
		[
			{
				"ID": 2,
				"fileName": "atlassian-jira (1).log",
				"mimeType": "application/octet-stream"
			}
		],
		"bugs":
		[
			{
				"id": 10100,
				"key": "TP-6",
				"summary": "bug"
			}
		],
		"executionTimeStamp": "2016-04-29T19:15:57.105+0530"
	},
	{
		"ID": 2,
		"summary": "Case 2",
		"status": "Not Tested",
		"testCaseKey": "TP-4",
		"executedBy": "admin",
		"bugs":
		[
			{
				"id": 10100,
				"key": "TP-6",
				"summary": "bug"
			},
			{
				"id": 10300,
				"key": "TP-9",
				"summary": "test 1"
			},
			{
				"id": 10301,
				"key": "TP-10",
				"summary": "bug-2"
			}
		],
		"executionTimeStamp": "2016-04-29T11:06:30.011+0530"
	}
]

STATUS 403 Returned if the user is not authorized perform the action or there is no valid license

STATUS 404 Returned if the testPlanIssueKey provided is not found

STATUS 500 Returned if there is any validation error with input data or any unknown Internal Server Error

Add Test Steps to a Test Case

POST /rest/synapse/latest/public/testCase/{testCaseIssueKey}/addSteps

Request

Example

CODE
[
	{
		"step":"Login with valid username and password",
		"expectedResult":"Successful Login"
	},
	{
		"step":"Check if Dashboard is loaded",
		"expectedResult":"Default Dashboard successfully loaded"
	}
]
Response

STATUS 200 Returned if the Test Steps are successfully added to the Test Case

Example

CODE
[
	{
		"ID":1,
		"tcId":10001,
		"step":"Login with valid username and password",
		"expectedResult":"Successful Login",
		"sequenceNumber":1
		
	},
	{
		"ID":2,
		"tcId":10001,
		"step":"Check if Dashboard is loaded",
		"expectedResult":"Default Dashboard successfully loaded",
		"sequenceNumber":2
	}
]

STATUS 403 Returned if the user is not authorized perform the action or there is no valid license

STATUS 404 Returned if the testCaseIssueKey provided is not found

STATUS 500 Returned if there is any validation error with input data or any unknown Internal Server Error

Get Test Steps of a Test Case

GET /rest/synapse/latest/public/testCase/{testCaseIssueKey}/steps

Response

STATUS 200 Returned if the Test Steps are successfully retrieved from the Test Case

Example

CODE
[
	{
		"ID":1,
		"tcId":10001,
		"step":"Login with valid username and password",
		"expectedResult":"Successful Login",
		"sequenceNumber":1
		
	},
	{
		"ID":2,
		"tcId":10001,
		"step":"Check if Dashboard is loaded",
		"expectedResult":"Default Dashboard successfully loaded",
		"sequenceNumber":2
	}
]

STATUS 403 Returned if the user is not authorized perform the action or there is no valid license

STATUS 404 Returned if the testCaseIssueKey provided is not found

STATUS 500 Returned if there is any validation error with input data or any unknown Internal Server Error

Link Test Case to a Requirement

POST /rest/synapse/latest/public/requirement/{requirementIssueKey}/linkTestCase

Request

Example

CODE
{
	"testCaseKeys":["ABC-10","ABC-11"]
}
Response

STATUS 200 Returned if the Test Cases are successfully linked to the Requirement

STATUS 403 Returned if the user is not authorized perform the action or there is no valid license

STATUS 404 Returned if the requirementIssueKey provided is not found

STATUS 500 Returned if there is any validation error with input data or any unknown Internal Server Error

Add Child Requirements to a Requirement

POST /rest/synapse/latest/public/requirement/{requirementIssueKey}/addChildren

Request

Example

CODE
{
	"requirementKeys":["ABC-12","ABC-13"]
}
Response

STATUS 200 Returned if the Child Requirements are successfully linked to the Requirement

STATUS 403 Returned if the user is not authorized perform the action or there is no valid license

STATUS 404 Returned if the requirementIssueKey provided is not found

STATUS 500 Returned if there is any validation error with input data or any unknown Internal Server Error

 

Get Test Cases in a Test Plan

GET /rest/synapse/latest/public/testPlan/{testplanIssueKey}/members

Response

STATUS 200 Returned if the Test Cases are successfully retrieved from the Test Plan

Example

CODE
[
  {
    "ID": 1138,
    "tcId": 15414,
    "tpId": 15416,
    "testCaseKey": "SPC-1",
    "testCaseSummary": "Verify if the user name is correct"
  },
  {
    "ID": 1140,
    "tcId": 15415,
    "tpId": 15416,
    "testCaseKey": "SPC-2",
    "testCaseSummary": "Verify if the age name is correct"
  }
]

STATUS 403 Returned if the user is not authorized perform the action or there is no valid license

STATUS 404 Returned if the testPaseIssueKey provided is not found

STATUS 500 Returned if there is any validation error with input data or any unknown Internal Server Error

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.