# Get Available Plans Executions — Talend

> List all plan executions the user is granted visibility on. For each plan execution returns execution and plan identifiers, start and finish timestamps, execution status and counters on done and planned executables within plan. See the…

- Key: `talend-get-available-plans-executions`
- Type: Action (Read-only)
- Version: 0.0.2
- App: Talend (`talend`) — https://pipedream.com/apps/talend.md
- This page (HTML): https://pipedream.com/apps/talend/actions/get-available-plans-executions
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/talend/actions/get-available-plans-executions/get-available-plans-executions.mjs

## Description

List all plan executions the user is granted visibility on. For each plan execution returns execution and plan identifiers, start and finish timestamps, execution status and counters on done and planned executables within plan. [See the documentation](https://api.talend.com/apis/processing/2021-03/#operation_get-available-plans-executions).

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `workspaceId` | `string` | No | Workspace ID the plans should belong to Options are loaded from the connected account. |
| `environmentId` | `string` | No | Environment ID the plans should belong to Options are loaded from the connected account. |
| `lastDays` | `integer` | No | Filter by last days |
| `from` | `string` | No | From date time filter. You can use either ISO8601 date format or timestamp. |
| `to` | `string` | No | To date time filter. You can use either ISO8601 date format or timestamp. |
| `status` | `string` | No | Filter by status |
| `maximumItems` | `integer` | No | Maximum number of items to return |

## 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": "talend",
      },
    },
  },
)

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: "talend-get-available-plans-executions",
  arguments: {
    workspaceId: "Workspace",
    environmentId: "Environment",
  },
})
```

**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: "talend-get-available-plans-executions",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    talend: { authProvisionId: "apn_xxxxxxx" },
    workspaceId: "Workspace",
    environmentId: "Environment",
  },
})

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": "talend-get-available-plans-executions",
    "configured_props": {
      "talend": { "authProvisionId": "apn_xxxxxxx" },
      "workspaceId": "Workspace",
      "environmentId": "Environment"
    }
  }'
```

---

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