Open Context Protocol is live! 🚀 Read the launch post

bulkFetchIssues

Bulk fetch issues

Details

  • Method: POST
  • Path: /rest/api/3/issue/bulkfetch
  • Operation ID: bulkFetchIssues

Parameters

{
  "expand": {
    "description": "Use [expand](#expansion) to include additional information about issues in the response. Note that, unlike the majority of instances where `expand` is specified, `expand` is defined as a list of values. The expand options are:\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 *  `operations` Returns all possible operations 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. This returns a maximum of 40 changelogs. If you require more, please refer to [Bulk fetch changelogs](#api-rest-api-3-changelog-bulkfetch-post).\n *  `versionedRepresentations` Instead of `fields`, returns `versionedRepresentations` a JSON array containing each version of a field's value, with the highest numbered item representing the most recent version.",
    "required": false,
    "location": "body",
    "type": "array"
  },
  "fields": {
    "description": "A list of fields to return for each issue, use it to retrieve a subset of fields. This parameter accepts a comma-separated list. Expand options include:\n\n *  `*all` Returns all fields.\n *  `*navigable` Returns navigable fields.\n *  Any issue field, prefixed with a minus to exclude.\n\nThe default is `*navigable`.\n\nExamples:\n\n *  `summary,comment` Returns the summary and comments fields only.\n *  `-description` Returns all navigable (default) fields except description.\n *  `*all,-comment` Returns all fields except comments.\n\nMultiple `fields` parameters can be included in a request.\n\nNote: All navigable fields are returned by default. This differs from [GET issue](#api-rest-api-3-issue-issueIdOrKey-get) where the default is all fields.",
    "required": false,
    "location": "body",
    "type": "array"
  },
  "fieldsByKeys": {
    "description": "Reference fields by their key (rather than ID). The default is `false`.",
    "required": false,
    "location": "body",
    "type": "boolean"
  },
  "issueIdsOrKeys": {
    "description": "An array of issue IDs or issue keys to fetch. You can mix issue IDs and keys in the same query.",
    "required": true,
    "location": "body",
    "type": "array"
  },
  "properties": {
    "description": "A list of issue property keys of issue properties to be included in the results. A maximum of 5 issue property keys can be specified.",
    "required": false,
    "location": "body",
    "type": "array"
  }
}

Response Schema

{
  "additionalProperties": false,
  "description": "The list of requested issues & fields.",
  "properties": {
    "issueErrors": {
      "description": "When Jira can't return an issue enumerated in a request due to a retriable error or payload constraint, we'll return the respective issue ID with a corresponding error message. This list is empty when there are no errors Issues which aren't found or that the user doesn't have permission to view won't be returned in this list.",
      "items": {
        "additionalProperties": false,
        "description": "Describes the error that occurred when retrieving data for a particular issue.",
        "properties": {
          "errorMessage": {
            "description": "The error that occurred when fetching this issue.",
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "description": "The ID of the issue.",
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "readOnly": true,
      "type": "array"
    },
    "issues": {
      "description": "The list of issues.",
      "items": {
        "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"
        }
      },
      "readOnly": true,
      "type": "array"
    }
  },
  "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('bulkFetchIssues', {
    # Add required parameters here
})