Get count of defects
GET
/defects/countGet defects’ count
Example
Section titled “Example”Use resource IDs from your own project. Keep the API token in your server or CI environment.
import { createConfiguration, DefectsApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);const api = new DefectsApi(config);
const result = await api.getDefectCount({ "project": 123});console.log(result);curl --request GET \ "https://api.testcollab.io/defects/count?token=$TESTCOLLAB_TOKEN&project=123"Parameters
Section titled “Parameters”| Name | Location | Type | Required | Description |
|---|---|---|---|---|
project |
query | number | Yes | Project ID |
_filter |
query | string | No | Stringified filter object (the filtering guide) |
Response
Section titled “Response”200 — Count of defects
| Field | Type | Required | Description |
|---|---|---|---|
count |
number | Yes | — |
{ "count": 123}Errors
Section titled “Errors”| Status | Meaning |
|---|---|
403 |
Forbidden |