The projects of the TestRail instance, with their suite and case counts
const url = 'https://beta-api.plune.ai/v1/projects/example/integrations/testrail/projects';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/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.
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 projects
object
object
1 one suite, 2 one suite with baselines (baselines are not imported), 3 several suites.
null when counting would pass the 40 requests one listing spends.
As suites: counted by reading the pages, so null past the budget.
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
object
Example
{ "error": "project owner only"}No such project among yours, or no TestRail is connected
object
Example
{ "error": "no TestRail is connected"}The saved key cannot be read on this server
object
Example generated
{ "error": "example"}The instance said no: failure is the code
object
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
object
Example generated
{ "error": "example"}Headers
Section titled “Headers ”Seconds until the window rolls over
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"}