# List Requirement Fields — Tricentis qTest

> List all available fields for requirements in a qTest project, including field IDs, types, and allowed values. Use this to discover field IDs before creating or updating requirements. Pass fields (e.g. ["id", "label", "required"]) to keep…

- Key: `tricentis_qtest-list-requirement-fields`
- 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-requirement-fields
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/tricentis_qtest/actions/list-requirement-fields/list-requirement-fields.mjs

## Description

List all available fields for requirements in a qTest project, including field IDs, types, and allowed values. Use this to discover field IDs before creating or updating requirements. Pass `fields` (e.g. `["id", "label", "required"]`) to keep only those attributes per field — some fields' `allowed_values` lists are long, so omitting them when you only need the field ID/label keeps the response small. Example: `projectId: 1` → returns `[{id: 3, label: "Priority", attribute_type: "String", allowed_values: [{label: "High", value: "1"}, {label: "Medium", value: "2"}], required: false}]`. [See the documentation](https://docs.tricentis.com/qtest-saas/content/apis/apis/requirement_apis.htm#get-all-requirement-fields)

## 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. |
| `fields` | `string[]` | No | Optional list of attribute names to include per field object (e.g. ["id", "label", "required"]) — omit to return every attribute, including allowed_values (today's default). |

## 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-requirement-fields",
  arguments: {
    projectId: "Project ID",
    fields: ["Fields"],
  },
})
```

**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-requirement-fields",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    tricentis_qtest: { authProvisionId: "apn_xxxxxxx" },
    projectId: "Project ID",
    fields: ["Fields"],
  },
})

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-requirement-fields",
    "configured_props": {
      "tricentis_qtest": { "authProvisionId": "apn_xxxxxxx" },
      "projectId": "Project ID",
      "fields": ["Fields"]
    }
  }'
```

---

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