Skip to content

The projects of the TestRail instance, with their suite and case counts

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

Owner only: what the saved key can see, so a member does not read it. Counts are made by reading the pages (250 a request) and spend at most 40 requests over the whole listing — a count that did not fit is null. At most 100 requests a minute are sent to the instance for this connection by one Plune process (the import worker has its own count), and a request that is not answered in full within a minute ends as unreachable. Counts are of what the instance lists, a case marked deleted included. A failure of the instance is a 422 with its code. Session cookie only. 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.

id
required
string

An id from GET /v1/projects

The projects

Media type application/json
object
projects
required
Array<object>
object
id
required
integer
name
required
string
suiteMode
required

1 one suite, 2 one suite with baselines (baselines are not imported), 3 several suites.

integer
Allowed values: 1 2 3
isCompleted
required
boolean
suites
required

null when counting would pass the 40 requests one listing spends.

integer
nullable
cases
required

As suites: counted by reading the pages, so null past the budget.

integer
nullable
Example
{
"projects": [
{
"id": 1,
"name": "Project Alpha",
"suiteMode": 3,
"isCompleted": false,
"suites": 2,
"cases": 4
},
{
"id": 2,
"name": "Project Beta",
"suiteMode": 1,
"isCompleted": false,
"suites": 1,
"cases": 0
}
]
}

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

The saved key cannot be read on this server

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

The instance said no: failure is the code

Media type application/json
object
error
required
string
Example
{
"error": "TestRail does not accept the e-mail and API key",
"failure": "credentials_rejected",
"status": 401
}

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

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