Skip to content

Check the saved TestRail connection

POST
/v1/projects/{id}/integrations/testrail/test
curl --request POST \
--url https://beta-api.plune.ai/v1/projects/example/integrations/testrail/test \
--cookie plune_session=<plune_session>

Owner only. Asks the instance for its first project (get_projects, one record) with the saved key — the cheapest question that needs it — and keeps what it found as the connection’s status. A check that went wrong is a 200 with ok: false and a code, not an error of this API. Only GET get_* methods are ever sent to a TestRail: the client has no other. A failure carries one of these codes: address_rejected - the address is not https, or does not resolve to a public address; unreachable - the instance did not answer in 30 seconds; credentials_rejected - TestRail answered 401 or 403: the e-mail and API key are not accepted (a revoked key included); rate_limited - TestRail asked Plune to wait: a short pause (30 seconds at most) is waited out up to three times in a call, a longer one ends the call at once; an import then goes on after the pause by itself, and fails after 20 pauses without progress; redirect_refused - the address answers with a redirect, which Plune never follows; not_json - the address answers, but not like TestRail; too_large - an answer past 20 MB; pagination_unsupported - the instance does not page its answers (limit and offset need TestRail 6.7): import a file instead; unexpected - a status the call did not expect: status carries it. The instance’s own text is never passed on. At most 10 requests a minute for a project, this, the list of projects and the two starts together, counted after the role. Session cookie only.

id
required
string

An id from GET /v1/projects

What the check found

Media type application/json
object
ok
required
boolean
failure

Present exactly when ok is false.

string
Allowed values: address_rejected unreachable credentials_rejected rate_limited redirect_refused not_json too_large pagination_unsupported unexpected
status

The HTTP status TestRail answered with, when it did. Never its body.

integer
testedAt
required
string format: date-time
Examples

The key works

{
"ok": true,
"testedAt": "2026-09-16T09:12:04.151Z"
}

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
Examples

No such project among yours

{
"error": "project 'u-shop::default' not found"
}

The saved key does not open under this server’s key (the platform key was replaced): connect again with the key

Media type application/json
object
error
required
string
Example
{
"error": "the saved key cannot be read on this server - connect again with the key"
}

More than 10 requests to TestRail in a minute for this project. 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; nothing was sent

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