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. runs and milestones come with the history import and accept off only. 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. runs and milestones accept off only.

object
cases
string
Allowed values: off testrail
suites
string
Allowed values: off testrail
runs
string
Allowed values: off
milestones
string
Allowed values: off
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 come with the history import and can only be off for now.

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

Comes with the history import.

string
Allowed values: off testrail
milestones
required

Comes with the history import.

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, runs or milestones not off)

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"
}