Before you begin using these API calls for CI and CD using Jenkins, we recommend reading the The Jenkins Integration Example for CI and CD overview article.
-
Execute Campaign
Executes the specified Cyara Campaign with the supplied PortalURL, AccountID and CampaignID.
POST https://{portalURL}/v3.0/accounts/{accountId}/campaigns/{CampaignId}/execute
-
Retrieve Campaign Results
Retrieves a JSON object with the Campaign Run Results with the supplied PortalURL, AccountID, CampaignID and CampaignRunID.
GET https://{portalURL}v3.0/accounts/{accountId}/campaigns/{campaignId}/runs/{campaignRunId}
Here are detailed steps for Test Execution leveraging API 3.0:
1) Fetching Authorization Key
- Login to Cyara portal and click the arrow next to your name on top right corner.
- Observe the option ‘API’ along with ‘Change Password’, ‘Notifications’ etc.
- Click ‘API’ and on the following page, click ‘Generate Token’ button.
- Under the section ‘Usage’, select the text displayed against ‘Authorization’ including ‘APIKey’ and use it for authorization.
2) Execute Campaign
Sample accountId: 797
Sample campaignId: 517
Executed using API call:
https://cyaraportal.us/CyaraWebApi/v3.0/accounts/797/campaigns/517/execute
Output:
{ "campaignRunId": "d2bfe0ec-c796-4ef0-b53f-a39f89c0d120", "url": "https://cyaraportal.us/CyaraWebApi/v3.0/accounts/797/campaigns/517/runs/d2bfe0ec-c796-4ef0-b53f-a39f89c0d120" }
3) Retrieve Campaign Run results
Executed using API call:
https://cyaraportal.us/CyaraWebApi/v3.0/accounts/797/campaigns/517/runs/d2bfe0ec-c796-4ef0-b53f-a39f89c0d120
Output
{
"runId": 18,
"campaignId": 517,
"campaignName": "Campaign 31024098",
"requestedRunDate": "2019-08-17T00:01:23.82Z",
"startDate": "2019-08-16T00:26:53.4588933Z",
"endDate": "2019-08-16T00:26:54.1383267Z",
"planType": "Velocity",
"channel": "Voice",
"status": "Completed",
"result": "Success",
"detail": null,
"url": "https://qadocker001.cyara-qa.com/CyaraWebApi/v3.0/accounts/797/campaigns/517"
}
Comments
0 comments
Please sign in to leave a comment.