Skip to content

REST API

The new HTTP/JSON API exposes business operations from the MCP catalog without a JSON-RPC envelope. Available operations depend on the installed server version. It is an operation-oriented API, not a separate CRUD interface for each database table.

For existing CI pipelines see Send results from CI.

Access and permissions

Send an existing MCP API key as Authorization: Bearer <key>. MCP must be enabled globally and for the project. Project keys also require X-ZTM-Project-UniqueId. Global keys need explicit project access for project operations. Browser and Windows sign-in do not replace an API key.

User permissions, write gates, allowed capabilities and demo restrictions apply just as they do for MCP. Use HTTPS outside local tests. Never put keys in URLs, source code or logs. See Safe actions and MCP.

Discover operations

Request Result
GET /api/v1/operations Operations and input contracts available to the current key and project
GET /api/v1/operations/{operationId} One operation contract
GET /api/v1/openapi.json OpenAPI 3.1 for the same authorization context
POST /api/v1/operations/{operationId} Execute with the argument object as the request body
POST /api/v1/resources/read Read a key-bound export resource

OpenAPI contains a concrete POST path for each available operation. Inputs use the same schemas as MCP. Library health, result stability, project attachments and release comparisons/snapshots have typed output schemas. Other dynamic query/action results retain extensible JSON contracts. The catalog includes shared query and action tools; not every Web menu item has a dedicated endpoint.

$headers = @{
    Authorization = "Bearer $env:ZTM_API_KEY"
    'X-ZTM-Project-UniqueId' = $env:ZTM_PROJECT_UNIQUE_ID
}
$baseUrl = 'https://your-server.example'
Invoke-RestMethod "$baseUrl/api/v1/operations" -Headers $headers
Invoke-RestMethod "$baseUrl/api/v1/operations/ztm_usage_guide" `
    -Method Post -Headers $headers -ContentType 'application/json' -Body '{}'

These environment variables are read by the calling PowerShell script; they do not automatically configure the server. Route projects using headers, not operation arguments. JSON bodies are limited to 1 MiB and 32 nesting levels. Duplicate property names are rejected.

Read the Office preview setting

A global MCP API key can read the installation's effective XLSX mode with POST /api/v1/operations/ztm_admin_office_preview_settings_get and the body {}. An example response is {"xlsxPreviewMode":"HtmlTable"}; the other possible value is DevExpressPdf. A project key is insufficient. This operation is read-only. Use server administration to change the setting.

Writes and exports

Follow each operation's preview and explicit commit contract, for example ztm_project_action_prepare and ztm_project_action_commit. API access does not replace business approval. Keep previews, idempotency keys and commits bound to the same user and project context. After a timeout, check the action's status rather than blindly repeating a write.

Exports may return a resourceUri. Read it through POST /api/v1/resources/read with {"uri":"<resourceUri>"} using the same key and project. The response contains contents with text or Base64 data and a MIME type. Tickets may expire or allow a single read; treat resource URIs as confidential.

Errors

Errors return HTTP status and application/problem+json containing code and traceId: 400 invalid input, 401 missing/rejected authentication, 403 insufficient permissions, 404 unavailable object or operation, 409 action conflict, 413 oversized body, 415 unsupported content type, 500 internal failure. Conflicts require review, not automatic retries. Give support the traceId, never keys or confidential payloads.

Prerequisite rules and blocked tests

ztm_project_query includes rule for library and planned dependencies: 0 = Hint only, 1 = Must succeed, 2 = Must not have failed.

To change an existing library dependency, use ztm_project_action_context, then ztm_project_action_prepare with capabilityId: project.test-case.dependency.set-rule and arguments testCaseId, dependencyId, rule. Review the preview and confirm it with ztm_project_action_commit. The key requires this explicit write capability. Creation stays compatible: a new relationship starts as a hint; its rule can then be changed. Existing plans and runs are not synchronized automatically.

POST /api/v1/operations/ztm_test_prerequisites_read with {"plannedVariantId":123} evaluates a visible planned test. The response includes isBlocked, needsRecheck and blockers. Invisible or missing predecessors are not disclosed by name; hasHiddenPrerequisites indicates them. This point-in-time assessment does not grant execution rights or replace personal retest confirmation. The same operation is available through MCP.

Project attachments

ztm_project_attachments_read lists project attachments and their ownerId, with offset and limit (maximum 100). Supply attachmentId to download contentBase64 (maximum 32 MiB). An active project administrator or project manager is required. Dynamically linked files are listed but cannot be downloaded through this operation.

Writes require the separate project.attachment.upload, project.attachment.update or project.attachment.delete capability. Existing planning-attachment grants do not grant project-file access. Use the returned ownerId, which can be 0 for a project.

  1. Upload: call ztm_project_attachment_stage with targetKind: "project", targetId: <ownerId>, fileName, mimeType and contentBase64. The existing staging limit is 512 KiB per file.
  2. Call ztm_project_action_prepare with the capability, a new idempotencyKey and arguments. Upload arguments: ownerKind: "project", ownerId, the ticket's attachmentReferenceId, optional displayName and remarks. Metadata update: ownerKind, ownerId, attachmentId, displayName, remarks. Delete: ownerKind, ownerId, attachmentId.
  3. Review the preview and confirm through ztm_project_action_commit with the same key. Concurrent edits cause a conflict; replaying a successful commit does not create another attachment.

Release comparisons and decisions

ztm_release_snapshots_list lists readable saved comparisons with an optional targetId filter. Pass the returned NextCursor as cursor to read the next page.

ztm_release_compare accepts baseId, targetId, explicit baseRunIds/targetRunIds and optional baseScopeRunIds/targetScopeRunIds arrays of { "runId": 123, "scopeRunId": 123 }. Optional baseSnapshotId/targetSnapshotId select saved evidence. It returns the Web comparison including Fingerprint, applying the same selection and object-permission rules.

To save evidence, explicitly grant project.release-review.snapshot-create and prepare/commit arguments query (the comparison argument object), name and fingerprint. Evidence changes are rejected. Read the saved comparison, decisionRevision and decision history with ztm_release_snapshot_read and snapshotId; historyBeforeRevision pages older decisions.

A decision also requires project.release-review.decision-record, project-management permission and explicit human authorization. Prepare accepts snapshotId, targetId, revision, outcome (1 accepted, 2 accepted with conditions, 3 rejected, 4 revoked), responsibleUserId, comment, openPoints (one per line) and humanConfirmed: true. The server records the authenticated actor; the flag does not replace actual human approval. Review the preview, then commit. Web rules still apply: current revision, eligible responsible user, explanation, complete scope and unchanged evidence. Historical project copies cannot receive a new decision.

Coverage and limits

REST and MCP share their operation catalog. This does not imply complete coverage of every Web feature. Project attachments now have a separate write contract; existing test-case, requirement and planning upload contracts remain separate. Deferred operations remain visible in the capability catalog.

Browser presentation, file-picker dialogs and interactive login do not need separate domain endpoints. Personal confirmation of an actual manual retest is not generated automatically on a tester's behalf. Release overview/PDF and automation imports use their existing operations; the REST transport does not expand their domain coverage. Project attachment writes and release comparison/decision operations are now available as described above. Arbitrary server paths and Local Bridge file links remain outside these API operations. Standalone variant copying and manifest file imports are not separate actions in the reviewed Web implementation. Typed outputs cover project attachments and release comparisons/snapshots; existing dynamic query/action outputs remain extensible JSON, not fully typed SDK models.

Test case versions

Test case versioning is available through POST /api/v1/operations/ztm_project_test_case_versions. Use operation: "list", testCaseID and optional skip and take for a bounded list with the current head. read also requires revisionID, while compare adds otherRevisionID; asset uses revisionID and assetID and returns base64-encoded bytes. restore-preview checks revisionID against expectedHead.

Prepare restoration through ztm_project_action_prepare, capability project.test-case-version.restore, and arguments testCaseID, revisionID, expectedHead, optional note and options. Confirm the returned token through ztm_project_action_commit. options may contain explicitly excluded excludedAttributeIDs and flattenUnavailableReusableSteps. Project binding, active user identity, object permissions, write scopes and demo protection still apply. Never put API keys into examples, logs or shell history.

Library health and result stability

These read operations use the same services and object permissions as the Web reports. No write grant is required. They do not modify, delete or execute tests.

Operation Optional filters
ztm_library_health_read unitId including descendants or caseId; ageDays 1–36500 (default 180); reason; page from 1; pageSize 1–100 (default 50)
ztm_test_stability_read testPlanId; testEnvironmentId (0 for no environment); fromUtc, toUtc as UTC timestamps such as 2026-11-08T12:00:00Z; lookbackRuns 1–200 (default 50)

Example: POST /api/v1/operations/ztm_library_health_read with {"ageDays":180,"reason":"NoVisibleUsage","pageSize":25}. The typed response includes Findings, CandidateCount, ScannedCaseCount, IsComplete, Limit, Page and PageSize. Reasons are NoVisibleUsage, NeverVisiblyExecuted, LongUnchanged, MissingTitle, MissingSteps, MissingExpectedResults, EmptyQuickContent and NoVariants. Reasons can overlap. No visible usage does not establish that a test is unused across the project; long-unchanged content is not automatically obsolete. Analysis is limited to 2000 visible cases and 20000 visible usages. When usage analysis is incomplete, negative usage indicators are suppressed.

Example: POST /api/v1/operations/ztm_test_stability_read with {"lookbackRuns":50}. The response includes Series, FailureGroups, individual Evidence and the counts EligibleRuns, IncludedRuns, EligibleResults, IncludedResults, Truncated and InvalidEvidenceCount. It uses the current result per run/case/variant in visible finished runs, not the complete execution history. At most 20000 result observations are analyzed. Variants, environments and origin are separated; build differences remain visible. ContentDifferences and ContentFingerprint compare only the saved test-case description, not the complete historical specification. Result changes are indicators, not proof of flakiness. Matching failure text does not prove a shared cause. Origin: 0 = verified current automation, 1 = other or unverified origin, 2 = changed or invalid automation evidence.

Use the shown input casing. Invalid ranges, timestamps or unknown filters return 400; unreadable explicit library objects return 403. The same tools and filters are available through MCP.

Reference baselines

Reference baselines provide typed operations for scope options, listing, historical contents, current comparison and saved files. Creation uses prepare/commit with the explicitly granted project.library-baseline.create capability; there is no edit, restore or delete operation. See the linked chapter for tool names, scope arguments, retry rules and the 512 KiB limit for API file responses.

Planning tree and custom result statuses

ztm_project_planning_tree_read returns the permitted planning tree together with available result definitions and run filters. Example request:

{"resultDefinitionIds": [12, 15], "includeNoResult": true}

Use actual IDs from resultDefinitions; the example IDs are placeholders. Status IDs use OR; the optional treeFilterObjectId further restricts runs. Omitted selections mean no filter for that request, independently of saved UI preferences. The result follows the user's tree visibility settings and returns only permitted nodes. Unknown explicit IDs are rejected. The read operation does not change personal preferences or test results. The same contract is available through MCP.

Change the review group for a requirement chapter

  1. Call ztm_project_action_context over MCP or REST with capabilityId: project.requirement-chapter.review-settings.update and the chapter ID in itemId. The context shows the assigned group, project default and available groups.
  2. Use ztm_project_action_prepare with the same capability and arguments itemId and reviewUserGroupId. Use 0 to inherit the project default. Changing the group clears the last comment displayed on the chapter and preserves the review status and history.
  3. Review the preview and confirm it with ztm_project_action_commit. If you encounter a conflict, read the current state and prepare the change again.

The user key needs this explicit write capability. Requirements and reviews must be enabled. The same chapter permissions and object locks apply as in the Web client. Use the dedicated actions to start a review or submit a decision.

Change requirement attributes

  1. Call ztm_project_action_context with the write capability for the attribute type, itemKind, and itemId. Use requirement-folder, requirement-document, or requirement-chapter.
  2. Prepare the change with ztm_project_action_prepare. For project.requirements.promoted-attributes.update, pass values with fieldId and value. For project.requirements.object-attributes.apply, pass attributes and deletedAttributeIds. Omit the attribute ID when adding a value. When editing, use the ID and name from the context. Set entail to control whether child items inherit the value.
  3. Confirm the preview with ztm_project_action_commit. If the item changed or is locked, read it again and prepare a new preview.

The project key requires the explicit write capability. Editing an inherited value creates a direct override. Only direct attributes can be deleted. Password fields are excluded from these interfaces.

Attribute value origin

For existing attribute actions, ztm_project_action_context adds Metadata to PromotedFields and ObjectAttributes. It includes AttributeId, AttributeStyleFieldId, field name, style ID and name, field type, owner kind and ID, Entail, and SourceKind (direct, inherited, default). An unsaved default has no owner ID. Missing field definitions retain their original field ID while their definition details are null.

The same information is available through MCP and POST /api/v1/operations/ztm_project_action_context. The existing attribute action's permissions and capabilities still apply; context access does not grant additional read permission. Password fields are excluded. Reading context does not persist defaults. Attributes explains the difference between inheritance by name and promoted fields.

Targeted result feedback

Read-only tools ztm_result_feedback_read, ztm_result_feedback_preview and ztm_result_feedback_export are also available as POST operations below /api/v1/operations/. Each requires its Read capability project.result-feedback.read, .preview or .export, plus read access to the selected objects.

read accepts testRunId. preview adds resultItemIds (1 to 100 unique IDs), optionally recipient, subject, message, externalReference and includeResultText (default false). Its response includes the reviewed content's Fingerprint. export uses the same input plus expectedFingerprint, format (html or xlsx) and optionally language (de or en). The response contains FileName, ContentType and ContentBase64.

Changed content requires another preview. Inaccessible selected results reject the whole output; there is no silent partial export. No operation sends messages or stores recipients in the project. See Share test results for the user flow and content limits.

AD role rules

ztm_ldap_role_rules_get reads an import configuration's rules; ztm_ldap_role_rules_save saves them with an expected revision; ztm_ldap_role_rules_preview previews membership changes. ztm_ldap_import_run runs the existing AD import including the saved rules. The same operations are available as MCP tools.

All calls require configurationId. Save, preview and import also require expectedRevision from the latest read response. Save accepts rules containing stable rule IDs, enabled state, attribute name, exact value, role and a dedicated group name. Callers do not choose group IDs. Generated OpenAPI contracts describe the complete fields.

Save and import are administrative writes requiring an enabled administrative key with project access and the matching scope. Project administration permissions are checked as well. Preview changes no memberships but needs access to the configured directory. The public demo blocks these administration calls. On revision conflict, read and review the configuration again rather than blindly retrying an import with outdated settings.

Freshness and manual release defect assessments

ztm_release_evidence_read, ztm_release_evidence_configure and ztm_release_evidence_observe read age limits or store limits and explicitly manual defect assessments. They use the matching MCP contracts and current expectedRevision. Re-read after conflict (409); do not blindly retry. observe requires the actual referenceId and sourceFingerprint from the overview's report.EvidenceAssessment.Defects, plus state, criticality, observedUtc with an explicit time zone, and comment.

Dedicated write scopes are project.release-evidence.configure and project.release-evidence.observe. Enabled project writes and the same release-management permissions as Web also apply. Statements include the recording user and time; they are not automatically verified tracker data and must not be invented without explicit human instruction. ztm_release_overview_read adds EvidenceAssessment for new live captures; the existing assessment level and reasons incorporate it. Historical captures remain unchanged. See Release comparison and acceptance.

Structured test data sets

These MCP tools are also available as POST /api/v1/operations/<tool-name> with the same contracts. See Test data matrix for functional rules.

Tool (prefix ztm_test_data_set_) Arguments Result
list none permitted data sets in items
read dataSetId data set with revision and stable row IDs
save data, expectedRevision, confirmed:true persisted data set with a new revision
delete dataSetId, expectedRevision, confirmed:true deleted:true; referenced data remains protected
binding variantId binding or null
preview variantId, dataSetId, rowId texts, diagnostics and fingerprint without changes
apply preview arguments, expectedFingerprint, confirmed:true persisted binding and resolved texts
unbind variantId, expectedFingerprint, confirmed:true unbound:true; resolved texts are preserved
export dataSetId XLSX fileName, mimeType, contentBase64
import_preview dataSetId, expectedRevision, contentBase64 unsaved proposal; explicitly call save afterwards

Data set fields are Id, TestUnitId, Name, Revision, Columns and Rows; rows contain Id and Values. Creation uses the zero GUID for Id and an empty expectedRevision. Rows require unique nonzero GUIDs. Updates require the revision read previously. After conflicts, read again and review the changes.

The four writes require individual scopes project.test-data-set.save, .delete, .apply or .unbind, enabled project writes and the relevant object permissions. Import preview never persists, but requires owner edit permission just like Web. Demo restrictions also apply through APIs. REST uses bearer keys rather than browser cookies and does not require a CSRF token; Web forms still require antiforgery tokens.

XLSX uses one worksheet with _RowId as the first column. Formulas, macros and external references are rejected. Limits: 4 MiB XLSX, 16 MiB expanded content, 30 data columns, 1,000 rows, 32,767 characters per cell and 2 MiB per data set. Only save and import preview accept up to 6 MiB JSON transport including Base64; other operations retain the existing 1-MiB limit.

binding also returns frozen bindings whose source is unavailable: SourceAvailable:false and diagnostic SourceUnavailable. Saved text remains readable when the variant is readable. Refreshing requires access to the source; unbinding uses the current binding fingerprint.

Import from another test tool

The current development build provides POST /api/v1/operations/ztm_vendor_migration_preview and POST /api/v1/operations/ztm_vendor_migration_apply for migration from another tool. The equivalent MCP tools share this contract.

For a durable job with up to 20,000 cases, use ztm_vendor_migration_background_preview followed by ztm_vendor_migration_background_apply with the same inputs, the fingerprint, confirmed: true, and a stable operationId. The response contains the JobId. With the same operation prefix, list shows your recent jobs and status shows progress. cancel stops at a batch boundary, resume continues the same job, and receipt returns committed batches as JSON. Supply jobId to these four operations. Starting, canceling, and resuming require the project.vendor-migration.apply scope. Each request checks access to the target again. The shared 6 MiB JSON request limit applies.

Supply targetUnitId, sourceKey, workbookBase64 and optionally attachmentsZipBase64.

For a vendor table, add provider (testrail, xray, zephyr, qase or neutral) and fileName ending in .xlsx or .csv. Continue sending the bytes in workbookBase64. Detected columns are used by default. Use mapping to assign ExternalId, Name, FolderPath, Description, Prerequisites, Steps, ExpectedResult and AttachmentPath to existing headings. Use the same source, file and mapping when applying the preview. Neutral XLSX requests without these fields keep their existing behavior.

For a TestRail XML export, send provider: "testrail" and a fileName ending in .xml. XML uses the same preview, field decisions, and receipt.

For TestLink XML, use provider: "testlink". TestLink requires an external ID for each test case. For Azure Test Plans CSV or XLSX, set provider: "azure-test-plans". Rows that share a work item ID are grouped in step-number order. For Xray Server or Data Center, keep provider: "xray" and send the Jira CSV or XLSX with the Manual Test Steps column. Both documented JSON step formats are supported. For a qTest Test Case Detail report, set provider: "qtest" and use the report ZIP, XLS or XLSX as workbookBase64.

For a result file, send latestResults with fileName, workbookBase64 and environmentId. For Azure Test Plans, Qase, Zephyr Scale Server or Data Center, and qTest, the JSON preview reports unmappable statuses in Diagnostics with BlocksImport: false. ImportedResultCount counts the results eligible for import. If it is zero, the receipt returns no ImportedResultRunId.

For custom source fields, you can send fieldDecisions. Each entry includes source and action. Use create with optional name and fieldType (text, integer, boolean, date), map with targetFieldId, or omit. Fields without a decision are omitted. Preview returns Candidates with suggested types and FieldOptions with target fields and creation permission. Preview and receipt include Fields with the target, status, and counts of imported and omitted values. Apply with the same field decisions.

Preview uses the read capability project.vendor-migration.preview. A project read key is sufficient; its user also needs permission to create cases in the target. No write scope is required for preview. It returns Fingerprint, Items, Diagnostics and CanApply without saving. Apply only when CanApply is true; review a new preview after changes.

To apply, send the same files, the preview fingerprint as expectedFingerprint, a fresh UUID as operationId and confirmed: true. Retry the same operation with the same UUID after a network interruption.

Applying requires enabled write actions and the project.vendor-migration.apply scope. Object permissions and demo restrictions match the Web workflow. The JSON request including Base64 data is limited to 6 MiB.

When the project database is busy, REST returns HTTP 503 with DatabaseBusy and Retry-After: 2. MCP returns actionErrorCode: "DatabaseBusy" and retryAfterSeconds: 2 in the error data. After access is released, retry the same request with the same operationId; saved receipts are returned after checking permissions and current content again, without creating further copies.

Hand over a test run

Use a personal project key with the project.test-run.handover write scope to read the eligible recipients and the current revision. MCP and REST use the same arguments.

  1. Call ztm_project_action_context with {"capabilityId":"project.test-run.handover","itemKind":"test-run","itemId":23}.
  2. Choose an ID from Recipients and use Revision as expectedRevision. For example, call ztm_run_handover or POST /api/v1/operations/ztm_run_handover with {"runId":23,"recipientUserId":7,"expectedRevision":0}.

Applied confirms that the handover was saved. mailStatus reports delivery status (Sent, NotConfigured, MissingAddress, MissingLink or Failed). Repeating the request for the current recipient returns AlreadyApplied with mailStatus: null. Read the context again after a conflict (HTTP 409). The key owner needs permission to edit the run. Global keys and demo instances cannot perform handovers.

Assign planned test cases

  1. Use ztm_project_action_context to read the current state for each run. Send {"capabilityId":"project.test-run.assign","itemKind":"test-run","itemId":23}. Choose cases from Cases and a recipient from Recipients.
  2. Call ztm_run_assign in MCP or send POST /api/v1/operations/ztm_run_assign. For an unassigned case, send for example {"recipientUserId":7,"selection":[{"caseId":42,"runId":23,"expected":null}]}. If the case is already assigned, pass its userId, assignedUtc and assignedByUserId under expected. Pass recipientUserId: null to clear the assignment.
  3. Read workload through ztm_run_workload_read or POST /api/v1/operations/ztm_run_workload_read with {"planId":9}.

The write requires a personal key with the project.test-run.assign scope, run edit permission and access to the selected cases. It is unavailable in the public demo. On conflict, read the current state again. Each request saves its selection in one operation. Workload includes only visible open runs.

Read release coverage

  1. Call ztm_coverage_matrix_read in MCP or send POST /api/v1/operations/ztm_coverage_matrix_read with {}. Releases contains the visible release IDs and names.
  2. Send the selected releaseId and optionally filter. For example, {"releaseId":"6bebaee0-20b9-4ff8-b4d1-abdd5d37833c","filter":"without-result"}. The filters all, without-test, without-result and failed match the browser view.
  3. Read Rows by requirement, test case and environment. Status is 0 for no result, 1 for not assessable, 2 for passed, 3 for failed and 4 for partially passed. Where saved evidence is visible, cells include ResultItemId, RunTitle, RecordedUtc and Tester. Totals counts filtered requirements. One requirement may contribute to several categories.

You need a personal project key and read access to the requested data. The Requirements feature must be enabled for the project. This operation reads the matrix.

Call ztm_share_link_create in MCP or POST /api/v1/operations/ztm_share_link_create in REST. Both accept the same JSON body.

{"targetKind":"run","targetId":"23","validityDays":7,"requestId":"869744c5-8cdb-45e1-a300-918d308345f1","includeErrors":false,"includeFindings":false}

Set targetKind to run, plan or release. Supply the target ID as a string, using its UUID for a release. Choose 7 or 30 days. Issues and findings are hidden by default. Add recipientEmail to send the link by project email.

Keep shareId for revocation. The response returns the guest address in url once, together with expiresUtc and mailStatus (NotRequested, Sent or Failed). Resolve a relative guest address against the API endpoint's origin. Treat the address, including its fragment, like a password. If delivery fails, the link has already been created. Retrying with the same requestId cannot create another link or send another email. If the response was lost, revoke the original entry in Shared links before creating a replacement.

Revoke with ztm_share_link_revoke or POST /api/v1/operations/ztm_share_link_revoke and {"shareId":"<share UUID>"}. The response contains shareId and revokedUtc. Repeated revocation returns the original timestamp.

Both actions require HTTPS (loopback is allowed locally), enabled project writes and a personal project key with the relevant project.share-link.create or project.share-link.revoke scope. Target permissions and demo restrictions apply as in the web client. See guest access.

Invite guest testers

Call ztm_guest_tester_read with {"runId": 42} to list selectable cases and invitation progress. Cases contains planned test case IDs. The list contains no guest URLs.

Create an invitation with ztm_guest_tester_invite. Supply caseIds, or set allUnassigned to true and omit caseIds. Set validityDays to a value from 1 to 30.

{
  "runId": 42,
  "requestId": "e3a0cde2-41df-4d20-9603-5185ef9184d8",
  "name": "Léa",
  "caseIds": [301, 302],
  "validityDays": 7
}

The response returns Url once. Treat the full link, including its fragment, like a password. Retrying the same requestId creates no additional invitation. With optional email, the server attempts delivery through the project mail settings. MailStatus is NotRequested, Sent or Failed. The link remains valid if delivery fails. Use greeting to add a welcome message.

Call ztm_guest_tester_revoke with runId and invitationId to revoke the link. Repeating revocation returns the original RevokedUtc timestamp. Saved results remain in the run.

For REST, post the same JSON to POST /api/v1/operations/<tool-name>. All three operations require a personal project key and permission to edit the run. Creation and revocation require the separate write scopes project.guest-tester.invite and project.guest-tester.revoke. The same license limit applies as in the web client. REST returns HTTP 409 when the limit is reached. The operations are unavailable in the public demo.

Manage recurring status reports

The operations use the same arguments in MCP and REST. For REST, send POST /api/v1/operations/<name>.

  1. Read your subscriptions with ztm_status_report_schedule_read and {}. Supply scheduleId to read a single subscription. The response contains items with each ID, revision, configuration and next send time.
  2. Call ztm_status_report_schedule_set with mode: "preview" to review the target, recipients and schedule. To edit, also pass the scheduleId and revision returned by the read operation.
{
  "mode": "preview",
  "idempotencyKey": "923c2df3-1772-467f-ac06-4936bd010272",
  "targetKind": "run",
  "targetId": "23",
  "configuration": {
    "recipients": ["qa@example.test"],
    "rhythm": "weekly",
    "time": "08:00",
    "timeZoneId": "W. Europe Standard Time",
    "weekday": 1,
    "endMode": "completed",
    "attachment": "xlsx"
  }
}
  1. Confirm within five minutes using {"mode":"confirm","previewToken":"<token from the preview>"}. The response contains schedule with the ID, revision and next send time. Retry the same confirmation with the same token if the receipt was lost.
  2. Stop the subscription with ztm_status_report_schedule_stop and {"scheduleId":42,"revision":3}. To send an extra report, choose Send now under Shared links.

targetKind accepts run, plan and release. rhythm accepts daily, weekly and monthly. weekday runs from 0 for Sunday to 6 for Saturday. For monthly, set monthDay. endMode: "date" requires endDate in YYYY-MM-DD format. Use includeErrors, includeFindings and attachment to select optional content.

Use a personal project key with current sharing permissions. Setting up and stopping require enabled write actions and the project.status-report-schedule.set and project.status-report-schedule.stop scopes respectively. The preview is bound to the project, creator and key. Read the subscription again if its revision changes. The operating and access rules apply to both interfaces.

Capture several checks at once

Call ztm_library_quick_capture in MCP or POST /api/v1/operations/ztm_library_quick_capture in REST. Request a preview first.

{"operation":"preview","parentUnitId":42,"mode":"checklist","text":"Check sign-in\nCheck sign-out","title":"Sign-in"}

Set mode to checklist for one quick test case or cases for individual cases. title is optional in checklist mode. Review the unit, case and row counts, then send {"operation":"apply","previewToken":"<PreviewToken from the preview>"}.

The token is bound to the personal project key and expires after 15 minutes. Repeating an apply with the same token returns the same IDs while the server retains it. If the token has expired, check whether the cases were created before requesting another preview. Use a personal project key with write actions enabled and the project.test-library.quick-capture scope. The API checks current create permissions on the destination unit. Global keys and demo access are blocked.

Find similar test cases

Call ztm_library_similar_cases_read in MCP or POST /api/v1/operations/ztm_library_similar_cases_read in REST with {"title":"Sign in with an incorrect password"}. The response includes the draft title and up to five visible matches with ID, title, test unit and the High flag. A personal project key with read access is sufficient.

Edit several test cases

Call ztm_library_bulk_update in MCP or POST /api/v1/operations/ztm_library_bulk_update. For example, preview setting a module attribute:

{"operation":"preview","action":"attribute","caseIds":[12,31],"attributeName":"Modul","attributeValue":"Checkout"}

Check Rows. Then set operation to apply and submit the same parameters with the returned Fingerprint in fingerprint. Add a UUID in requestId for retries. Repeating the same request with that ID returns its receipt while the server retains the job. HTTP 409 requires a fresh preview.

Use targetUnitId with move or archive, reviewGroupId with review, and variantValueIds with variant. An archive destination must be marked as an archive unit. Each request accepts up to 200 test cases. Use a personal project key with the project.test-library.bulk-update scope. The server checks current rights for each case. Global keys and demo access are blocked.

Use {"operation":"undo","requestId":"<RequestId from receipt>"} with the same project key to undo moves or attribute changes while the job remains in server memory. Permissions and intervening changes are checked again.

The optional boolean isArchive in project.test-unit.update arguments marks a unit as an archive. Use the existing preview/commit flow with itemId and title. Omitting isArchive preserves its value. Project Knowledge unit reads also expose isArchive.

Retest selected findings

ztm_library_retest or POST /api/v1/operations/ztm_library_retest uses the same workflow as Maintain test library:

  1. Send operation: "options" and findings to read allowed source runs, environments and testers. Each finding contains caseId, plannedCaseId or resultId; include known variantId, planId and runId. Explicitly choose a context when several are available.
  2. Send operation: "preview", the same selection, and planId, runId, environment and testerId. Items lists the effective variants, including mandatory prerequisites. Skipped identifies excluded findings by their zero-based selection index. Set acceptOldTemplate: true only after explicitly deciding to use outdated templates.
  3. Send operation: "create" with identical inputs, the returned Fingerprint as fingerprint, and RequestId as requestId. The receipt includes RunId, Url and skipped findings. After a connection failure, retry the same request ID to avoid creating a second run.

Previews expire after 30 minutes and belong to the project and user. Changes to selection, permissions or content require a fresh preview. Each request accepts at most 200 findings; an existing source run is required. The optional tab parameter (health, impact, results) also checks that the respective tab is available.

Use a personal project key with write scope project.test-library.retest and permission to create runs in the selected plan. Global administrator keys and public demo mode are excluded. Existing tools and synchronization through project.planned-test-case.synchronize-from-library remain unchanged.

Object comments

Use ztm_comment_read to read comments and activity for one object. Supply kind (test-case, requirement, run, result) and id. offset and activityOffset page independently. Use commentId to locate the page containing a comment. Treat returned Markdown as user content.

ztm_comment_add saves markdown with a client-generated UUID as commentId. Supply parentId to reply. You can use mentionUserIds to notify explicitly selected project users with read access. The text must include their mention. Retry with the same UUID and content. Created distinguishes a new comment from a retry. MailFailed reports a delivery problem while the comment stays saved.

Both tools require comments to be enabled for the project. They use the active owner of a personal project key and check current object permissions. Posting requires project writes and the project.comments.add scope. REST uses POST /api/v1/operations/ztm_comment_read and POST /api/v1/operations/ztm_comment_add. Web workflow

Create a retest from a run

Use ztm_retest_ready_read over MCP or POST /api/v1/operations/ztm_retest_ready_read to read a personal list of results ready to retest. Send {} for all visible entries or use a filter such as {"planId": 20, "runId": 22}. The call uses the last stored ticket state and requires a personal project key. Each result in items includes run, case and result identifiers, the title, visible ticket links and CanCreate to indicate run creation permission. Use the existing ztm_library_retest operation to schedule individual results.

The MCP tool ztm_retest_create and the REST route POST /api/v1/operations/ztm_retest_create accept the same arguments. Preview the selection first. This example includes untested variants in addition to failed and blocked ones.

{"mode":"preview","sourceRunId":36,"includeUntested":true}

Review RequestedCount, additional prerequisites (RequiredCount) and Errors. Use the environment (Environment), a tester ID from Testers and the ComparisonToken from this preview. Replace the example values and generate a fresh UUID for each new request. If RequiresOldTemplate is true, creation requires explicit approval with acceptOldTemplate: true.

{
  "mode": "create",
  "sourceRunId": 36,
  "includeUntested": true,
  "environment": "Staging",
  "testerId": 7,
  "comparisonToken": "<ComparisonToken>",
  "creationId": "179e6928-a673-4dac-acae-b913914a13df"
}

The response contains the new, unstarted run's testRunId. If the connection fails, retry the identical request, including its creationId. Both modes require writes to be enabled, the project.retest.create scope and project and object permissions to view the source and create the run. Demo restrictions also apply. Using the web dashboard.

Create an issue from a test result

ztm_issue_create_from_result · POST /api/v1/operations/ztm_issue_create_from_result

Use the MCP tool or its matching REST operation with the personal write scope project.defect.create. The testCaseId is the planned variant ID. For structured steps, Quick rows and list items, stepIndex starts at zero. Omit it for overall results and unstructured text.

{"mode":"prepare","testRunId":40,"testCaseId":371,"stepKind":"structured","stepIndex":3}

Review the returned fields and attachment options. After confirmation, use the returned RequestId as requestId and send the chosen values and accessible result attachment IDs.

{"mode":"create","testRunId":40,"testCaseId":371,"requestId":"4c2ef7c8-b3a2-43e4-a721-6f04bb164b42","attachmentIds":[38]}

After Retryable, retry with the same ID once the tracker is available. After Unknown, check the tracker and send the existing number as existingIssueReference. After LinkPending, repeat the request to link the known issue. To paste a screenshot directly, use the web dialog.

Personal project notifications

Use ztm_notifications_read to read your own inbox. Optional arguments are kind (the event kind), limit (1 to 100, default 30) and beforeId (pass the returned NextBeforeId to get the next page). UnreadCount counts unread notifications across all kinds. Each row contains the entry and the local destination in TargetPath.

Use ztm_notifications_mark_read with notificationId to mark one entry as read or all: true to clear the unread status of your entire inbox. Use the read operation to preview the inbox and confirm the selection with confirmed: true. For example, {"notificationId":42,"confirmed":true}. You can retry this operation. It requires project write access and the project.notifications.mark-read scope. Both tools use the active owner of a personal project key and check current permissions on each target. REST uses POST /api/v1/operations/ztm_notifications_read and POST /api/v1/operations/ztm_notifications_mark_read.

Automation draft

Call POST /api/v1/operations/ztm_ai_automation_draft_create or use the MCP tool of the same name. With operation: "submit", send testCaseId, variantId, framework (TypeScript or DotNet) and a UUID as clientRequestId. hints is optional. Reuse the UUID when retrying the same input.

Poll with operation: "status", testCaseId and the returned ExecutionId as executionId. On success, File contains the file name and content. cancel accepts the same fields as status. A personal project key needs the explicit project.test-library.automation-draft.create permission because generation can incur AI costs. This operation leaves test case data intact. Use the separate attachment workflow to save the file.

Merge test cases

ztm_library_merge_cases uses the same workflow as Possible duplicates. In MCP or at POST /api/v1/operations/ztm_library_merge_cases, first send operation: "preview" with sourceCaseId and targetCaseId. Optionally include includeVariants and archiveUnitId. If the response is Code: "ready", review the preview, then send the same inputs with operation: "apply" and the returned Fingerprint. Existing runs retain their original case and variant references. The source of a quick-test merge goes to the archive. A preview with Code: "quick-mapping" reports tables, variants or template references that cannot be matched safely. Use a personal project key with project.test-library.merge-cases.

Run a test case query plan

Send the plan to POST /api/v1/operations/ztm_query_plan_run or as arguments to the MCP tool of the same name. Each call applies the current read permissions of the active user behind the project key. This operation requires a user-bound project key. An AI provider is optional.

Use project-knowledge-query/v1 with one to four test_case steps. count counts matches and list returns rows for the specified fields. You can select, filter or sort by id, title, testUnitId, isQuick and estimatedDurationSeconds. Send filter values as strings. The default list limit is 50 and the maximum is 200.

{
  "plan": {
    "version": "project-knowledge-query/v1",
    "steps": [
      {
        "stepId": "matches",
        "entity": "test_case",
        "operation": "list",
        "fields": ["id", "title"],
        "filters": [{"field": "title", "operator": "contains", "value": "Review"}],
        "sortBy": "title",
        "limit": 20
      }
    ]
  }
}

Version project-knowledge-query/v2 also permits test_result list and count steps. Available fields are id, testCaseTitle, testCaseId, testRunTitle, testRunId, outcome, outcomeModeCode and completedUtc.

A v2 test_case step may include this example in its relations array to find cases without a visible execution since 1 March 2026:

{"targetEntity":"test_result","operator":"notExists","targetFilters":[
  {"field":"outcomeModeCode","operator":"notEquals","value":"None"},
  {"field":"completedUtc","operator":"greaterThanOrEqual","value":"2026-03-01"}
]}

A date without a time means midnight UTC. Use exists to require a matching execution. The operation is read-only. Use ztm_library_retest to preview or create a retest from result IDs.

Steps contains TotalCount, Rows, Sources and IsTruncated for each step. Rows[].Values contains the values as strings. Send the plan again to read current data.