Open Context Protocol is live! 🚀 Read the launch post

getTransitions

Get transitions

Details

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

Parameters

{
  "issueIdOrKey": {
    "description": "The ID or key of the issue.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "expand": {
    "description": "Use [expand](#expansion) to include additional information about transitions in the response. This parameter accepts `transitions.fields`, which returns information about the fields in the transition screen for each transition. Fields hidden from the screen are not returned. Use this information to populate the `fields` and `update` fields in [Transition issue](#api-rest-api-3-issue-issueIdOrKey-transitions-post).",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "transitionId": {
    "description": "The ID of the transition.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "skipRemoteOnlyCondition": {
    "description": "Whether transitions with the condition *Hide From User Condition* are included in the response. Available to Connect and Forge app users with *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) and Forge apps acting on behalf of users with *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "includeUnavailableTransitions": {
    "description": "Whether details of transitions that fail a condition are included in the response",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "sortByOpsBarAndStatus": {
    "description": "Whether the transitions are sorted by ops-bar sequence value first then category order (Todo, In Progress, Done) or only by ops-bar sequence value.",
    "required": false,
    "location": "query",
    "type": "boolean"
  }
}

Response Schema

{
  "additionalProperties": false,
  "description": "List of issue transitions.",
  "properties": {
    "expand": {
      "description": "Expand options that include additional transitions details in the response.",
      "readOnly": true,
      "type": "string",
      "xml": {
        "attribute": true
      }
    },
    "transitions": {
      "description": "List of issue transitions.",
      "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"
    }
  },
  "type": "object"
}

Usage

from ocp_agent import OCPAgent

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

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