# Get Issue — Jira

> Gets the details for an issue. See the documentation

- Key: `jira-get-issue`
- Type: Action (Read-only)
- Version: 0.1.27
- App: Jira (`jira`) — https://pipedream.com/apps/jira.md
- This page (HTML): https://pipedream.com/apps/jira/actions/get-issue
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/jira/actions/get-issue/get-issue.mjs

## Description

Gets the details for an issue. [See the documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-get)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `cloudId` | `string` | Yes | The Jira Cloud site ID (for example, 11223344-a1b2-3b33-c444-def123456789). Use Get Cloud ID to discover IDs. See the documentation Options are loaded from the connected account. |
| `issueIdOrKey` | `string` | Yes | The ID or key of an issue Options are loaded from the connected account. |
| `fields` | `string` | No | A list of fields to return for the issue. This parameter accepts a comma-separated list. Use it to retrieve a subset of fields. All fields are returned by default. Allowed values: *all Returns all fields. *navigable Returns navigable fields. Any issue field, prefixed with a minus to exclude, as in -description . |
| `fieldsByKeys` | `boolean` | No | Whether fields in fields are referenced by keys rather than IDs. This parameter is useful where fields have been added by a connect app and a field's key may differ from its ID. |
| `properties` | `string` | No | A list of issue properties to return for the issue. This parameter accepts a comma-separated list. Allowed values: *all Returns all issue properties. Any issue property key, prefixed with a minus to exclude. |
| `updateHistory` | `boolean` | No | Whether the project in which the issue is created is added to the user's Recently viewed project list, as shown under Projects in Jira |
| `expand` | `string` | No | Use expand to include additional information about the issues in the response. This parameter accepts a comma-separated list. Expand options include: renderedFields Returns field values rendered in HTML format. names Returns the display name of each field. schema Returns the schema describing a field type. transitions Returns all possible transitions for the issue. editmeta Returns information about how each field can be edited. changelog Returns a list of recent updates to an issue, sorted by date, starting from the most recent. versionedRepresentations Returns a JSON array for each version of a field's value, with the highest number representing the most recent version. Note: When included in the request, the fields parameter is ignored. |

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

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: "jira-get-issue",
  arguments: {
    cloudId: "Cloud ID",
    issueIdOrKey: "Issue ID or Key",
  },
})
```

**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: "jira-get-issue",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    jira: { authProvisionId: "apn_xxxxxxx" },
    cloudId: "Cloud ID",
    issueIdOrKey: "Issue ID or Key",
  },
})

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": "jira-get-issue",
    "configured_props": {
      "jira": { "authProvisionId": "apn_xxxxxxx" },
      "cloudId": "Cloud ID",
      "issueIdOrKey": "Issue ID or Key"
    }
  }'
```

---

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