# List Defects — Tricentis qTest

> List defects in a qTest project updated after a given start time. Use this to find defect IDs to use when getting or updating a specific defect. If the response contains a full page of results, increment the Page parameter and call again…

- Key: `tricentis_qtest-list-defects`
- Type: Action (Read-only)
- Version: 0.0.1
- App: Tricentis qTest (`tricentis_qtest`) — https://pipedream.com/apps/tricentis-qtest.md
- This page (HTML): https://pipedream.com/apps/tricentis-qtest/actions/list-defects
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/tricentis_qtest/actions/list-defects/list-defects.mjs

## Description

List defects in a qTest project updated after a given start time. Use this to find defect IDs to use when getting or updating a specific defect. If the response contains a full page of results, increment the Page parameter and call again for more. Defaults to defects updated in the last 30 days, and includes only the `Summary` property per defect to keep the response small — projects with long-running defect logs can return large payloads otherwise, since some properties (like Description) may contain lengthy text. Pass `fields` (e.g. `["Summary", "Status"]`) to include different or additional named properties instead. Use **Get Defect** for a defect's full property set. Example: `projectId: 1, startTime: "2026-09-01T00:00:00Z"` → returns `[{id: 201, properties: [{field_id: 1, field_value: "Login crash"}]}, ...]`. [See the documentation](https://docs.tricentis.com/qtest-saas/content/apis/apis/defect_apis.htm#get-recently-updated-defects)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `projectId` | `string` | Yes | The ID of a project, e.g. 1. Use the List Project ID Options action to retrieve available project IDs. |
| `startTime` | `string` | No | ISO 8601 timestamp. Only defects updated after this time are returned. Defaults to 30 days ago. |
| `page` | `integer` | No | Page number for paginated results (1-based) |
| `fields` | `string[]` | No | Optional list of property names to include per defect (e.g. ["Summary", "Status"]) — defaults to ["Summary"] to keep the response small. Pass this to include different or additional properties; use Get Defect for the full record. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "tricentis_qtest",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "tricentis_qtest-list-defects",
  arguments: {
    projectId: "Project ID",
    startTime: "Start Time",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "tricentis_qtest-list-defects",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    tricentis_qtest: { authProvisionId: "apn_xxxxxxx" },
    projectId: "Project ID",
    startTime: "Start Time",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "tricentis_qtest-list-defects",
    "configured_props": {
      "tricentis_qtest": { "authProvisionId": "apn_xxxxxxx" },
      "projectId": "Project ID",
      "startTime": "Start Time"
    }
  }'
```

---

- App: https://pipedream.com/apps/tricentis-qtest.md · All apps: https://pipedream.com/apps
