The sync from TestRail: modes, imported projects, last sync
const url = 'https://beta-api.plune.ai/v1/projects/example/integrations/testrail/sync';const options = {method: 'GET', headers: {cookie: 'plune_session=<plune_session>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://beta-api.plune.ai/v1/projects/example/integrations/testrail/sync \ --cookie plune_session=<plune_session>Every member of the project, a reader too. A project that has no TestRail connected answers 404. Session cookie only.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”An id from GET /v1/projects
Responses
Section titled “ Responses ”The sync of the project
The sync of a project from TestRail: its modes, what can be asked for, which TestRail projects were imported on this connection (a sync needs one) and the last sync that finished.
object
The mode of each entity, off by default. runs and milestones (#1963) look at the window of the history import, and a sync of either is applied from its dry run.
object
Folders and cases: names, preconditions, steps, expected results, priority, location.
The suites of an imported project (the folders made for them).
Runs and their results, within the window of the history import: the runs created since, renames, descriptions, environments, Plan: labels and the runs TestRail closed.
The Release: label of a run follows its milestone; a milestone deleted in TestRail leaves the label in place.
The custom case fields the import created (the field of TestRail’s references).
The entities a sync can look at now.
object
How far back a sync of the runs of this TestRail project would look now: the window of the last import with history (months counted back from now), or since the first import when none had history, cut by the plan. null: no limit (an import of all history).
The days of runs the plan keeps (Free: 30), when it cuts them.
object
Cases that a sync found gone from TestRail and that have not come back. None was deleted.
Example
{ "modes": { "cases": "testrail", "suites": "testrail", "runs": "off", "milestones": "off", "fields": "off" }, "available": [ "cases", "suites", "runs", "milestones", "fields" ], "imported": [ { "trProjectId": 1, "trProjectName": "Project Alpha", "finishedAt": "2026-09-16T09:12:04.151Z", "runsSince": "2025-10-30T09:00:00.000Z", "planDays": null } ], "lastSync": { "id": "c2a1d7f4-3b52-4c1e-8d2a-5a6f0e9b7c10", "trProjectId": 1, "which": "all", "entities": [ "cases", "suites" ], "finishedAt": "2026-09-16T09:12:04.151Z" }, "goneCount": 1}No / invalid session — a CLI token is refused here
No such project among yours, or no TestRail is connected
object
Example
{ "error": "no TestRail is connected"}The server has no key to keep TestRail keys under
object
Example
{ "error": "the TestRail bridge is not configured on this server - contact your operator"}