If your pipeline uses the v1 Trigger a schedule
request (PUT /api/v1/run-configurations/{id}/execute), move it to the /v2
API described in the quick start. The v2 requests, IDs and
responses are different, so update each step of the integration.
| In v1 | In v2 |
|---|---|
Shared host (testops.katalon.io) and /api/v1 paths | Your tenant host, https://<tenant>.katalon.io, and /v2/schedules paths. |
Basic auth with username:API_KEY | Basic auth with an empty username: base64(:API_KEY). Send x-project-id on every request. |
| One run-configuration ID for every request | Separate IDs for the schedule, its schedulers, each test run, and each test result. Look the IDs up again in the new project; v1 IDs do not carry over. |
Start a run with PUT .../run-configurations/{id}/execute | Start a saved schedule's occurrence with POST /v2/schedules/test-runs/{schedulerId}/run?startTime=<nextTime>, or start a run without a schedule with POST /v2/schedules/test-runs. Both return the new test run's id. |
| Follow the job IDs that the trigger returned | Follow the test run with GET /v2/schedules/test-runs/{id}. A run can have several jobs; a job ID is not a test-run ID. |
Job SUCCESS means the tests passed | The run passed only when stage is COMPLETED, status is PASSED, numberOfTestCases is greater than 0, and every test result passed. |
Stop a run with POST /api/v1/executions/terminate | Cancel it with POST /v2/schedules/test-runs/{id}/cancel. |
Download a report with GET /api/v1/executions/{id}/export | Request the file with POST .../test-runs/{id}/export/enqueue-file, wait until check-exist-file returns true, then download it with GET .../export. |
| No log request | List the run's jobs with GET /v2/schedules/jobs?executionId={id}, then get a log with GET /v2/schedules/jobs/{jobId}/get-log. |
| JSON search body | List requests take q, page and size query parameters, and return items in content[]. |
POST /v2/schedules/{id}/run is the closest match to the v1 trigger, but it
returns no test-run ID. Use it only when you do not need to follow the run.
PowerShell
In PowerShell 5.1, build the headers like this:
if ([string]::IsNullOrWhiteSpace($KatalonApiKey)) { throw 'Missing Katalon API key' }
$encodedKey = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes(":$KatalonApiKey"))
$headers = @{
Authorization = "Basic $encodedKey"
'x-project-id' = "$KatalonProjectId"
}Then follow the steps in the quick start: start the run, keep
its id, poll until it finishes, cancel it at your deadline, and pass the step
only when the run passed.
Do not log the API key, the encoded key, the headers, or full test output.