Skip to content

Set the sync mode of the entities

PUT
/v1/projects/{id}/integrations/testrail/sync/modes
curl --request PUT \
--url https://beta-api.plune.ai/v1/projects/example/integrations/testrail/sync/modes \
--header 'Content-Type: application/json' \
--cookie plune_session=<plune_session> \
--data '{ "cases": "testrail", "suites": "testrail", "runs": "off", "milestones": "off", "fields": "off" }'

Owner only. off (the default) or testrail (“TestRail is the source of truth”: a sync brings its changes in) for each entity named; the others stay. There is no mode in which Plune writes to TestRail: that needs a decision and an ADR of its own. Recorded in the audit feed as a testrail_connection entry (update) with the modes before and after. Session cookie only.

id
required
string

An id from GET /v1/projects

Media type application/json

The entities named change, the others stay.

object
cases
string
Allowed values: off testrail
suites
string
Allowed values: off testrail
runs
string
Allowed values: off testrail
milestones
string
Allowed values: off testrail
fields
string
Allowed values: off testrail
Example
{
"cases": "testrail",
"suites": "testrail",
"runs": "off",
"milestones": "off",
"fields": "off"
}

The modes now

Media type application/json
object
modes
required

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
cases
required

Folders and cases: names, preconditions, steps, expected results, priority, location.

string
Allowed values: off testrail
suites
required

The suites of an imported project (the folders made for them).

string
Allowed values: off testrail
runs
required

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.

string
Allowed values: off testrail
milestones
required

The Release: label of a run follows its milestone; a milestone deleted in TestRail leaves the label in place.

string
Allowed values: off testrail
fields
required

The custom case fields the import created (the field of TestRail’s references).

string
Allowed values: off testrail
Example
{
"modes": {
"cases": "testrail",
"suites": "testrail",
"runs": "off",
"milestones": "off",
"fields": "off"
}
}

Invalid body (an unknown entity, a mode that does not exist)

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

No / invalid session — a CLI token is refused here

You are in the project, but not as its owner

Media type application/json
object
error
required
string
Example
{
"error": "project owner only"
}

No such project among yours, or no TestRail is connected

Media type application/json
object
error
required
string
Example
{
"error": "no TestRail is connected"
}

Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}
Retry-After
integer

Seconds until the window rolls over

The server has no key to keep TestRail keys under

Media type application/json
object
error
required
string
Example
{
"error": "the TestRail bridge is not configured on this server - contact your operator"
}