APIs allow you to trigger test and test set executions and retrieve results directly through APIs. These APIs make it easy to integrate automated testing with your CI/CD tools, such as Jenkins and others, by streamlining continuous integration and deployment workflows.
To use automation APIs, follow Panaya’s API setup guide and incorporate them into your CI/CD pipelines to enhance automation efficiency.
Authentication
Read this article explaining how to authenticate to Panaya via API.
Execute Tests
Executes one or more tests and returns the execution event id.
POST: https://{{env}}.panaya.com/api/v1/projects/{{projectID}}/pa/runTests
{
"testIds": [1024, 1025],
"description": "My description",
"webhook":
{
"url": "https://myURL/{eventId}",
"headers": {"X-Auth-Token": "", "Content-Type": "application/json"}
}
}Note
Webhooks are optional and allow you to be notified when the event is complete.
If notifications are not required, use "webhook": {}
The {eventid} in the Webhook URL is optional.
Execute Test Sets
Executes one or more test sets and returns the event id.
POST: https://{{env}}.panaya.com/api/v1/projects/{{projectID}}/pa/runTestSets
{
"testSetIds": [1,2],
"description": "My description",
"webhook":
{
"url": "https://myURL/{eventId}",
"headers": {"X-Auth-Token": "", "Content-Type": "application/json"}
}
}Note
Webhooks are optional and allow you to be notified when the event is complete.
If notifications are not required, use "webhook": {}
The {eventid} in the Webhook URL is optional.
Retrieve Test Results
Returns the event information and the run information.
GET: https://{{env}}.panaya.com/api/v1/projects/{{projectID}}/pa/getEvent/{{eventId}}
{
"eventId": 5,
"title": null,
"startTime": 1700748825000,
"endTime": null,
"totalRuns": 1,
"totalTests": 1,
"failedCount": 0,
"passedCount": 0,
"notRunCount": 0,
"skippedCount": 1,
"runningCount": 0,
"summary": 0,
"runResult": "Skipped",
"triggerType": "Planned run",
"executionState": "Completed",
"creationTime": 1700746180000,
"createdBy": "tdx panaya",
"description": null,
"webhook": null,
"queueItems": [
{
"id": 23,
"playerStartTime": null,
"playerEndTime": null,
"duration": null,
"testName": "Create Web Order",
"testId": 11062,
"testNodeId": 32462155,
"plannedRunName": "Run script",
"plannedRunOrderIndex": 1,
"status": 4,
"statusName": "Skipped",
"agent": "Arnaud_Panaya_agent",
"browserType": null,
"browserTypeName": null,
"executionId": null,
"evidenceExists": false,
"historicalResults": null,
"dataSetName": null,
"dataSetValues": null,
"statusDetails": "The test started running, but no result was reported after 24h",
"testDeleted": false,
"stepDeleted": false
}
]
}Retrieve Test Sets
Returns all the test sets in the project.
Get https://{{env}}.panaya.com/api/v1/projects/{{projectId}}/pa/getTestSets
[
{
"id": 1,
"appId": 1,
"name": "one",
"type": null,
"history": [],
"attachments": [],
"comments": [],
"customTab2CustomFields": {},
"watcherData": {
"extraWatchers": [],
"baseWatchers": [],
"groupsWatchers": [],
"watchersChanged": false
},
"deletedAttachmentsIds": [],
"actionProperties": {
"actionSource": "BY_SITE",
"fromSite": true,
"fromCloneEntity": false,
"fromImport": false,
"fromAnalysis": false,
"singleAction": true
},
"dirtyFields": null,
"customFields": null,
"groupNameToGroupMetadata": {},
"agt": false,
"description": null,
"descriptionStripped": "",
"projectId": 57,
"entityId": 16298932,
"createdBy": 91224,
"testIds": null,
"paExecutionSchedulingIds": null,
"createdByName": "John Doe",
"creationDate": 1735033912000,
"owner": 0,
"ownerName": null,
"numOfTests": 0,
"numOfScheduling": 1,
"newEntity": false,
"hashtags": []
},
{
"id": 2,
"appId": 2,
"name": "two",
"type": null,
"history": [],
"attachments": [],
"comments": [],
"customTab2CustomFields": {},
"watcherData": {
"extraWatchers": [],
"baseWatchers": [],
"groupsWatchers": [],
"watchersChanged": false
},
"deletedAttachmentsIds": [],
"actionProperties": {
"actionSource": "BY_SITE",
"fromSite": true,
"fromCloneEntity": false,
"fromImport": false,
"fromAnalysis": false,
"singleAction": true
},
"dirtyFields": null,
"customFields": null,
"groupNameToGroupMetadata": {},
"agt": false,
"description": null,
"descriptionStripped": "",
"projectId": 57,
"entityId": 16298933,
"createdBy": 91224,
"testIds": null,
"paExecutionSchedulingIds": null,
"createdByName": "John Doe",
"creationDate": 1735033929000,
"owner": 0,
"ownerName": null,
"numOfTests": 2,
"numOfScheduling": 0,
"newEntity": false,
"hashtags": []
}
]Retrieve Tests from Test Sets
Returns all the tests connected to the test set with the given ID ("appId" from the previous call).
Get https://{{env}}.panaya.com/api/v1/projects/{{projectId}}/pa/getTestsPerTestSet/{{testSetId}}
[
{
"nodeId": 2209408,
"testId": 1011,
"name": "New Automated Test (1)",
"priority": "High",
"status": "Passed",
"dueDate": null,
"inScope": true,
"inScopeDescription": "Yes",
"path": "Automation",
"module": null,
"itOwner": "",
"functionalArea": null,
"businessProcess": null,
"readyToTest": true,
"coverageEntryPoints": 0,
"cycleName": "Automation",
"foundInCycleNodeId": 2209381,
"testDbId": 1900646,
"usage": "Unknown",
"deletedTransaction": null,
"type": "Automated Test",
"changes": null,
"numOfDefects": 0,
"automationStatus": "Ready",
"orderIndex": 1
},
{
"nodeId": 2209382,
"testId": 1003,
"name": "New Automated Test",
"priority": "High",
"status": "Failed",
"dueDate": null,
"inScope": true,
"inScopeDescription": "Yes",
"path": "Automation",
"module": null,
"itOwner": "",
"functionalArea": null,
"businessProcess": null,
"readyToTest": true,
"coverageEntryPoints": 0,
"cycleName": "Automation",
"foundInCycleNodeId": 2209381,
"testDbId": 1900627,
"usage": "Unknown",
"deletedTransaction": null,
"type": "Automated Test",
"changes": null,
"numOfDefects": 1,
"automationStatus": "Ready",
"orderIndex": 2
}
]Retrieve Tests from All Test Sets
Returns all the test sets in the given project, with all the tests connected to them.
Get https://{{env}}.panaya.com/api/v1/projects/{{projectId}}/pa/getAllTestSetsTests
[
{
"id": 2,
"appId": 11,
"name": "Test set 1",
"entityId": 163076001,
"description": "<p>just a desc</p>",
"descriptionStripped": "just a desc",
"createdByName": "locota panayapanaya",
"creationDate": 1692015108000,
"ownerName": null,
"projectName": "NewTest123",
"tests": [
{
"nodeId": 17488591,
"testId": 1081,
"testName": "New Automated Test",
"testDbId": 15565131,
"orderIndex": 1,
"path": "V1.2 demo",
"testType": "Automated Test"
},
{
"nodeId": 17488590,
"testId": 1080,
"testName": "test1",
"testDbId": 15565130,
"orderIndex": 2,
"path": "V1.2 demo",
"testType": "Automated Test"
}
]
},
{
"id": 3,
"appId": 12,
"name": "Test set 2",
"entityId": 163076006,
"description": null,
"descriptionStripped": "",
"createdByName": "locota panayapanaya",
"creationDate": 1692015519000,
"ownerName": null,
"projectName": "NewTest123",
"tests": [
{
"nodeId": 17488591,
"testId": 1081,
"testName": "New Automated Test",
"testDbId": 15565131,
"orderIndex": 1,
"path": "V1.2 demo",
"testType": "Automated Test"
},
{
"nodeId": 17488590,
"testId": 1080,
"testName": "test1",
"testDbId": 15565130,
"orderIndex": 2,
"path": "V1.2 demo",
"testType": "Automated Test"
}
]
}
]Manage Test Parameters, Data Sets, and Planned Runs
Use the Test Automation APIs to retrieve test or component parameters and manage data sets and planned runs from external systems.
The endpoints below use the base URL https://{{env}}.panaya.com/api/v1. Replace the placeholders with the appropriate environment, project ID, test ID, data set name, or planned run order. For authentication, see the API setup guide.
Test Parameters
Retrieve the defined parameters for a test or component.
| Description | Method | Endpoint |
|---|---|---|
| Get parameters for a test/component | GET | /projects/{{projectID}}/pa/tests/{{testId}}/parameters |
Data Sets
List, create, retrieve, update, or delete a test's data sets. Updates can include renaming a data set and updating some of its parameters.
| Description | Method | Endpoint |
|---|---|---|
| List data sets of a test | GET | /projects/{{projectID}}/pa/tests/{{testId}}/datasets |
| Create a data set | POST | /projects/{{projectID}}/pa/tests/{{testId}}/datasets |
| Get a single data set | GET | /projects/{{projectID}}/pa/tests/{{testId}}/datasets/{{dataSetName}} |
| Update a data set (including rename; may update some parameters) | PUT | /projects/{{projectID}}/pa/tests/{{testId}}/datasets/{{dataSetName}} |
| Delete a data set | DELETE | /projects/{{projectID}}/pa/tests/{{testId}}/datasets/{{dataSetName}} |
Planned Runs
List, create, retrieve, update, or delete a test's planned runs. Updates can include renaming a planned run or changing its description.
| Description | Method | Endpoint |
|---|---|---|
| List planned runs of a test | GET | /projects/{{projectID}}/pa/tests/{{testId}}/plannedRuns |
| Create a planned run for a test | POST | /projects/{{projectID}}/pa/tests/{{testId}}/plannedRuns |
| Get a single planned run | GET | /projects/{{projectID}}/pa/tests/{{testId}}/plannedRuns/{{plannedRunOrder}} |
| Update a planned run (including name and description) | PUT | /projects/{{projectID}}/pa/tests/{{testId}}/plannedRuns/{{plannedRunOrder}} |
| Delete a planned run | DELETE | /projects/{{projectID}}/pa/tests/{{testId}}/plannedRuns/{{plannedRunOrder}} |
Note: The endpoints listed here identify the supported operations and their routes. Request and response payload details are not included in this reference.