searchForIssuesUsingJql
Currently being removed. Search for issues using JQL (GET)
Details
- Method:
GET - Path:
/rest/api/3/search - Operation ID:
searchForIssuesUsingJql
Parameters
{
"jql": {
"description": "The [JQL](https://confluence.atlassian.com/x/egORLQ) that defines the search. Note:\n\n * If no JQL expression is provided, all issues are returned.\n * `username` and `userkey` cannot be used as search terms due to privacy reasons. Use `accountId` instead.\n * If a user has hidden their email address in their user profile, partial matches of the email address will not find the user. An exact match is required.",
"required": false,
"location": "query",
"type": "string"
},
"startAt": {
"description": "The index of the first item to return in a page of results (page offset).",
"required": false,
"location": "query",
"type": "integer",
"format": "int32"
},
"maxResults": {
"description": "The maximum number of items to return per page. To manage page size, Jira may return fewer items per page where a large number of fields or properties are requested. The greatest number of items returned per page is achieved when requesting `id` or `key` only.",
"required": false,
"location": "query",
"type": "integer",
"format": "int32"
},
"validateQuery": {
"description": "Determines how to validate the JQL query and treat the validation results. Supported values are:\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\nNote: If the JQL is not correctly formed a 400 response code is returned, regardless of the `validateQuery` value.",
"required": false,
"location": "query",
"type": "string",
"enum": [
"strict",
"warn",
"none",
"true",
"false"
]
},
"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\nExamples:\n\n * `summary,comment` Returns only the summary and comments fields.\n * `-description` Returns all navigable (default) fields except description.\n * `*all,-comment` Returns all fields except comments.\n\nThis parameter may be specified multiple times. For example, `fields=field1,field2&fields=field3`.\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": "query",
"type": "array"
},
"expand": {
"description": "Use [expand](#expansion) to include additional information about 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 * `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": "query",
"type": "string"
},
"properties": {
"description": "A list of issue property keys for issue properties to include in the results. This parameter accepts a comma-separated list. Multiple properties can also be provided using an ampersand separated list. For example, `properties=prop1,prop2&properties=prop3`. A maximum of 5 issue property keys can be specified.",
"required": false,
"location": "query",
"type": "array"
},
"fieldsByKeys": {
"description": "Reference fields by their key (rather than ID).",
"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": "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('searchForIssuesUsingJql', {
# Add required parameters here
})