Open Context Protocol is live! 🚀 Read the launch post
searchForIssuesUsingJqlPost

searchForIssuesUsingJqlPost

Currently being removed. Search for issues using JQL (POST)

Details

  • Method: POST
  • Path: /rest/api/3/search
  • Operation ID: searchForIssuesUsingJqlPost

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.\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"
  },
  "jql": {
    "description": "A [JQL](https://confluence.atlassian.com/x/egORLQ) expression.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "maxResults": {
    "description": "The maximum number of items to return per page.",
    "required": false,
    "location": "body",
    "type": "integer"
  },
  "properties": {
    "description": "A list of up to 5 issue properties to include in the results. This parameter accepts a comma-separated list.",
    "required": false,
    "location": "body",
    "type": "array"
  },
  "startAt": {
    "description": "The index of the first item to return in the page of results (page offset). The base index is `0`.",
    "required": false,
    "location": "body",
    "type": "integer"
  },
  "validateQuery": {
    "description": "Determines how to validate the JQL query and treat the validation results. Supported values:\n\n *  `strict` Returns a 400 response code if any errors are found, along with a list of all errors (and warnings).\n *  `warn` Returns all errors as warnings.\n *  `none` No validation is performed.\n *  `true` *Deprecated* A legacy synonym for `strict`.\n *  `false` *Deprecated* A legacy synonym for `warn`.\n\nThe default is `strict`.\n\nNote: If the JQL is not correctly formed a 400 response code is returned, regardless of the `validateQuery` value.",
    "required": false,
    "location": "body",
    "type": "string",
    "enum": [
      "strict",
      "warn",
      "none",
      "true",
      "false"
    ]
  }
}

Response Schema

{
  "additionalProperties": false,
  "description": "The result of a JQL search.",
  "properties": {
    "expand": {
      "description": "Expand options that include additional search result details in the response.",
      "readOnly": true,
      "type": "string"
    },
    "issues": {
      "description": "The list of issues found by the search.",
      "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"
    },
    "maxResults": {
      "description": "The maximum number of results that could be on the page.",
      "format": "int32",
      "readOnly": true,
      "type": "integer"
    },
    "names": {
      "additionalProperties": {
        "readOnly": true,
        "type": "string"
      },
      "description": "The ID and name of each field in the search results.",
      "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 the field types in the search results.",
      "readOnly": true,
      "type": "object"
    },
    "startAt": {
      "description": "The index of the first item returned on the page.",
      "format": "int32",
      "readOnly": true,
      "type": "integer"
    },
    "total": {
      "description": "The number of results on the page.",
      "format": "int32",
      "readOnly": true,
      "type": "integer"
    },
    "warningMessages": {
      "description": "Any warnings related to the JQL query.",
      "items": {
        "readOnly": true,
        "type": "string"
      },
      "readOnly": true,
      "type": "array"
    }
  },
  "type": "object"
}

Usage

from ocp_agent import OCPAgent

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

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