Open Context Protocol is live! 🚀 Read the launch post

getIssue

Get issue

Details

  • Method: GET
  • Path: /rest/api/3/issue/{issueIdOrKey}
  • Operation ID: getIssue

Parameters

{
  "issueIdOrKey": {
    "description": "The ID or key of the issue.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "fields": {
    "description": "A list of fields to return for the issue. This parameter accepts a comma-separated list. Use it to retrieve a subset of fields. Allowed values:\n\n *  `*all` Returns all fields.\n *  `*navigable` Returns navigable fields.\n *  Any issue field, prefixed with a minus to exclude.\n\nExamples:\n\n *  `summary,comment` Returns only the summary and comments fields.\n *  `-description` Returns all (default) fields except description.\n *  `*navigable,-comment` Returns all navigable fields except comment.\n\nThis parameter may be specified multiple times. For example, `fields=field1,field2& fields=field3`.\n\nNote: All fields are returned by default. This differs from [Search for issues using JQL (GET)](#api-rest-api-3-search-get) and [Search for issues using JQL (POST)](#api-rest-api-3-search-post) where the default is all navigable fields.",
    "required": false,
    "location": "query",
    "type": "array"
  },
  "fieldsByKeys": {
    "description": "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.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "expand": {
    "description": "Use [expand](#expansion) to include additional information about the issues in the response. This parameter accepts a comma-separated list. Expand options include:\n\n *  `renderedFields` Returns field values rendered in HTML format.\n *  `names` Returns the display name of each field.\n *  `schema` Returns the schema describing a field type.\n *  `transitions` Returns all possible transitions for the issue.\n *  `editmeta` Returns information about how each field can be edited.\n *  `changelog` Returns a list of recent updates to an issue, sorted by date, starting from the most recent.\n *  `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.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "properties": {
    "description": "A list of issue properties to return for the issue. This parameter accepts a comma-separated list. Allowed values:\n\n *  `*all` Returns all issue properties.\n *  Any issue property key, prefixed with a minus to exclude.\n\nExamples:\n\n *  `*all` Returns all properties.\n *  `*all,-prop1` Returns all properties except `prop1`.\n *  `prop1,prop2` Returns `prop1` and `prop2` properties.\n\nThis parameter may be specified multiple times. For example, `properties=prop1,prop2& properties=prop3`.",
    "required": false,
    "location": "query",
    "type": "array"
  },
  "updateHistory": {
    "description": "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. This also populates the [JQL issues search](#api-rest-api-3-search-get) `lastViewed` field.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "failFast": {
    "description": "Whether to fail the request quickly in case of an error while loading fields for an issue. For `failFast=true`, if one field fails, the entire operation fails. For `failFast=false`, the operation will continue even if a field fails. It will return a valid response, but without values for the failed field(s).",
    "required": false,
    "location": "query",
    "type": "boolean"
  }
}

Response Schema

{
  "additionalProperties": false,
  "description": "Details about an issue.",
  "properties": {
    "changelog": {
      "allOf": [
        {
          "$ref": "#/components/schemas/PageOfChangelogs"
        }
      ],
      "description": "Details of changelogs associated with the issue.",
      "readOnly": true
    },
    "editmeta": {
      "allOf": [
        {
          "$ref": "#/components/schemas/IssueUpdateMetadata"
        }
      ],
      "description": "The metadata for the fields on the issue that can be amended.",
      "readOnly": true
    },
    "expand": {
      "description": "Expand options that include additional issue details in the response.",
      "readOnly": true,
      "type": "string",
      "xml": {
        "attribute": true
      }
    },
    "fields": {
      "additionalProperties": {},
      "type": "object"
    },
    "fieldsToInclude": {
      "additionalProperties": false,
      "properties": {
        "actuallyIncluded": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "uniqueItems": true
        },
        "excluded": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "uniqueItems": true
        },
        "included": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "uniqueItems": true
        }
      },
      "type": "object"
    },
    "id": {
      "description": "The ID of the issue.",
      "readOnly": true,
      "type": "string"
    },
    "key": {
      "description": "The key of the issue.",
      "readOnly": true,
      "type": "string"
    },
    "names": {
      "additionalProperties": {
        "readOnly": true,
        "type": "string"
      },
      "description": "The ID and name of each field present on the issue.",
      "readOnly": true,
      "type": "object"
    },
    "operations": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Operations"
        }
      ],
      "description": "The operations that can be performed on the issue.",
      "readOnly": true
    },
    "properties": {
      "additionalProperties": {
        "readOnly": true
      },
      "description": "Details of the issue properties identified in the request.",
      "readOnly": true,
      "type": "object"
    },
    "renderedFields": {
      "additionalProperties": {
        "readOnly": true
      },
      "description": "The rendered value of each field present on the issue.",
      "readOnly": true,
      "type": "object"
    },
    "schema": {
      "additionalProperties": {
        "additionalProperties": false,
        "description": "The schema of a field.",
        "properties": {
          "configuration": {
            "additionalProperties": {
              "readOnly": true
            },
            "description": "If the field is a custom field, the configuration of the field.",
            "readOnly": true,
            "type": "object"
          },
          "custom": {
            "description": "If the field is a custom field, the URI of the field.",
            "readOnly": true,
            "type": "string"
          },
          "customId": {
            "description": "If the field is a custom field, the custom ID of the field.",
            "format": "int64",
            "readOnly": true,
            "type": "integer"
          },
          "items": {
            "description": "When the data type is an array, the name of the field items within the array.",
            "readOnly": true,
            "type": "string"
          },
          "system": {
            "description": "If the field is a system field, the name of the field.",
            "readOnly": true,
            "type": "string"
          },
          "type": {
            "description": "The data type of the field.",
            "readOnly": true,
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "description": "The schema describing each field present on the issue.",
      "readOnly": true,
      "type": "object"
    },
    "self": {
      "description": "The URL of the issue details.",
      "format": "uri",
      "readOnly": true,
      "type": "string"
    },
    "transitions": {
      "description": "The transitions that can be performed on the issue.",
      "items": {
        "additionalProperties": true,
        "description": "Details of an issue transition.",
        "properties": {
          "expand": {
            "description": "Expand options that include additional transition details in the response.",
            "readOnly": true,
            "type": "string"
          },
          "fields": {
            "additionalProperties": {
              "additionalProperties": false,
              "description": "The metadata describing an issue field.",
              "properties": {
                "allowedValues": {
                  "description": "The list of values allowed in the field.",
                  "items": {
                    "readOnly": true
                  },
                  "readOnly": true,
                  "type": "array"
                },
                "autoCompleteUrl": {
                  "description": "The URL that can be used to automatically complete the field.",
                  "readOnly": true,
                  "type": "string"
                },
                "configuration": {
                  "additionalProperties": {
                    "readOnly": true
                  },
                  "description": "The configuration properties.",
                  "readOnly": true,
                  "type": "object"
                },
                "defaultValue": {
                  "description": "The default value of the field.",
                  "readOnly": true
                },
                "hasDefaultValue": {
                  "description": "Whether the field has a default value.",
                  "readOnly": true,
                  "type": "boolean"
                },
                "key": {
                  "description": "The key of the field.",
                  "readOnly": true,
                  "type": "string"
                },
                "name": {
                  "description": "The name of the field.",
                  "readOnly": true,
                  "type": "string"
                },
                "operations": {
                  "description": "The list of operations that can be performed on the field.",
                  "items": {
                    "readOnly": true,
                    "type": "string"
                  },
                  "readOnly": true,
                  "type": "array"
                },
                "required": {
                  "description": "Whether the field is required.",
                  "readOnly": true,
                  "type": "boolean"
                },
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/JsonTypeBean"
                    }
                  ],
                  "description": "The data type of the field.",
                  "readOnly": true
                }
              },
              "required": [
                "key",
                "name",
                "operations",
                "required",
                "schema"
              ],
              "type": "object",
              "xml": {
                "name": "availableField"
              }
            },
            "description": "Details of the fields associated with the issue transition screen. Use this information to populate `fields` and `update` in a transition request.",
            "readOnly": true,
            "type": "object"
          },
          "hasScreen": {
            "description": "Whether there is a screen associated with the issue transition.",
            "readOnly": true,
            "type": "boolean"
          },
          "id": {
            "description": "The ID of the issue transition. Required when specifying a transition to undertake.",
            "type": "string"
          },
          "isAvailable": {
            "description": "Whether the transition is available to be performed.",
            "readOnly": true,
            "type": "boolean"
          },
          "isConditional": {
            "description": "Whether the issue has to meet criteria before the issue transition is applied.",
            "readOnly": true,
            "type": "boolean"
          },
          "isGlobal": {
            "description": "Whether the issue transition is global, that is, the transition is applied to issues regardless of their status.",
            "readOnly": true,
            "type": "boolean"
          },
          "isInitial": {
            "description": "Whether this is the initial issue transition for the workflow.",
            "readOnly": true,
            "type": "boolean"
          },
          "looped": {
            "type": "boolean"
          },
          "name": {
            "description": "The name of the issue transition.",
            "readOnly": true,
            "type": "string"
          },
          "to": {
            "allOf": [
              {
                "$ref": "#/components/schemas/StatusDetails"
              }
            ],
            "description": "Details of the issue status after the transition.",
            "readOnly": true
          }
        },
        "type": "object"
      },
      "readOnly": true,
      "type": "array"
    },
    "versionedRepresentations": {
      "additionalProperties": {
        "additionalProperties": {
          "readOnly": true
        },
        "readOnly": true,
        "type": "object"
      },
      "description": "The versions of each field on the issue.",
      "readOnly": true,
      "type": "object"
    }
  },
  "type": "object",
  "xml": {
    "name": "issue"
  }
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('jira')

# Call this tool
result = await agent.call_tool('getIssue', {
    # Add required parameters here
})