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

getWorkflowsPaginated

Get workflows paginated

Details

  • Method: GET
  • Path: /rest/api/3/workflow/search
  • Operation ID: getWorkflowsPaginated

Parameters

{
  "startAt": {
    "description": "The index of the first item to return in a page of results (page offset).",
    "required": false,
    "location": "query",
    "type": "integer",
    "format": "int64"
  },
  "maxResults": {
    "description": "The maximum number of items to return per page.",
    "required": false,
    "location": "query",
    "type": "integer",
    "format": "int32"
  },
  "workflowName": {
    "description": "The name of a workflow to return. To include multiple workflows, provide an ampersand-separated list. For example, `workflowName=name1&workflowName=name2`.",
    "required": false,
    "location": "query",
    "type": "array"
  },
  "expand": {
    "description": "Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Expand options include:\n\n *  `transitions` For each workflow, returns information about the transitions inside the workflow.\n *  `transitions.rules` For each workflow transition, returns information about its rules. Transitions are included automatically if this expand is requested.\n *  `transitions.properties` For each workflow transition, returns information about its properties. Transitions are included automatically if this expand is requested.\n *  `statuses` For each workflow, returns information about the statuses inside the workflow.\n *  `statuses.properties` For each workflow status, returns information about its properties. Statuses are included automatically if this expand is requested.\n *  `default` For each workflow, returns information about whether this is the default workflow.\n *  `schemes` For each workflow, returns information about the workflow schemes the workflow is assigned to.\n *  `projects` For each workflow, returns information about the projects the workflow is assigned to, through workflow schemes.\n *  `hasDraftWorkflow` For each workflow, returns information about whether the workflow has a draft version.\n *  `operations` For each workflow, returns information about the actions that can be undertaken on the workflow.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "queryString": {
    "description": "String used to perform a case-insensitive partial match with workflow name.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "orderBy": {
    "description": "[Order](#ordering) the results by a field:\n\n *  `name` Sorts by workflow name.\n *  `created` Sorts by create time.\n *  `updated` Sorts by update time.",
    "required": false,
    "location": "query",
    "type": "string",
    "enum": [
      "name",
      "-name",
      "+name",
      "created",
      "-created",
      "+created",
      "updated",
      "+updated",
      "-updated"
    ]
  },
  "isActive": {
    "description": "Filters active and inactive workflows.",
    "required": false,
    "location": "query",
    "type": "boolean"
  }
}

Response Schema

{
  "additionalProperties": false,
  "description": "A page of items.",
  "properties": {
    "isLast": {
      "description": "Whether this is the last page.",
      "readOnly": true,
      "type": "boolean"
    },
    "maxResults": {
      "description": "The maximum number of items that could be returned.",
      "format": "int32",
      "readOnly": true,
      "type": "integer"
    },
    "nextPage": {
      "description": "If there is another page of results, the URL of the next page.",
      "format": "uri",
      "readOnly": true,
      "type": "string"
    },
    "self": {
      "description": "The URL of the page.",
      "format": "uri",
      "readOnly": true,
      "type": "string"
    },
    "startAt": {
      "description": "The index of the first item returned.",
      "format": "int64",
      "readOnly": true,
      "type": "integer"
    },
    "total": {
      "description": "The number of items returned.",
      "format": "int64",
      "readOnly": true,
      "type": "integer"
    },
    "values": {
      "description": "The list of items.",
      "items": {
        "additionalProperties": false,
        "description": "Details about a workflow.",
        "properties": {
          "created": {
            "description": "The creation date of the workflow.",
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "description": "The description of the workflow.",
            "type": "string"
          },
          "hasDraftWorkflow": {
            "description": "Whether the workflow has a draft version.",
            "type": "boolean"
          },
          "id": {
            "additionalProperties": false,
            "description": "Properties that identify a published workflow.",
            "properties": {
              "entityId": {
                "description": "The entity ID of the workflow.",
                "type": "string"
              },
              "name": {
                "description": "The name of the workflow.",
                "type": "string"
              }
            },
            "required": [
              "name"
            ],
            "type": "object"
          },
          "isDefault": {
            "description": "Whether this is the default workflow.",
            "type": "boolean"
          },
          "operations": {
            "additionalProperties": false,
            "description": "Operations allowed on a workflow",
            "properties": {
              "canDelete": {
                "description": "Whether the workflow can be deleted.",
                "type": "boolean"
              },
              "canEdit": {
                "description": "Whether the workflow can be updated.",
                "type": "boolean"
              }
            },
            "required": [
              "canDelete",
              "canEdit"
            ],
            "type": "object"
          },
          "projects": {
            "description": "The projects the workflow is assigned to, through workflow schemes.",
            "items": {
              "additionalProperties": false,
              "description": "Details about a project.",
              "properties": {
                "avatarUrls": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/AvatarUrlsBean"
                    }
                  ],
                  "description": "The URLs of the project's avatars.",
                  "readOnly": true
                },
                "id": {
                  "description": "The ID of the project.",
                  "type": "string"
                },
                "key": {
                  "description": "The key of the project.",
                  "readOnly": true,
                  "type": "string"
                },
                "name": {
                  "description": "The name of the project.",
                  "readOnly": true,
                  "type": "string"
                },
                "projectCategory": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/UpdatedProjectCategory"
                    }
                  ],
                  "description": "The category the project belongs to.",
                  "readOnly": true
                },
                "projectTypeKey": {
                  "description": "The [project type](https://confluence.atlassian.com/x/GwiiLQ#Jiraapplicationsoverview-Productfeaturesandprojecttypes) of the project.",
                  "enum": [
                    "software",
                    "service_desk",
                    "business"
                  ],
                  "readOnly": true,
                  "type": "string"
                },
                "self": {
                  "description": "The URL of the project details.",
                  "readOnly": true,
                  "type": "string"
                },
                "simplified": {
                  "description": "Whether or not the project is simplified.",
                  "readOnly": true,
                  "type": "boolean"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "schemes": {
            "description": "The workflow schemes the workflow is assigned to.",
            "items": {
              "additionalProperties": false,
              "description": "The ID and the name of the workflow scheme.",
              "properties": {
                "id": {
                  "description": "The ID of the workflow scheme.",
                  "type": "string"
                },
                "name": {
                  "description": "The name of the workflow scheme.",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "statuses": {
            "description": "The statuses of the workflow.",
            "items": {
              "additionalProperties": false,
              "description": "Details of a workflow status.",
              "properties": {
                "id": {
                  "description": "The ID of the issue status.",
                  "type": "string"
                },
                "name": {
                  "description": "The name of the status in the workflow.",
                  "type": "string"
                },
                "properties": {
                  "additionalProperties": {
                    "description": "Additional properties that modify the behavior of issues in this status. Supports the properties <code>jira.issue.editable</code> and <code>issueEditable</code> (deprecated) that indicate whether issues are editable."
                  },
                  "description": "Additional properties that modify the behavior of issues in this status. Supports the properties `jira.issue.editable` and `issueEditable` (deprecated) that indicate whether issues are editable.",
                  "type": "object"
                }
              },
              "required": [
                "id",
                "name"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "transitions": {
            "description": "The transitions of the workflow.",
            "items": {
              "additionalProperties": false,
              "description": "Details of a workflow transition.",
              "properties": {
                "description": {
                  "description": "The description of the transition.",
                  "type": "string"
                },
                "from": {
                  "description": "The statuses the transition can start from.",
                  "items": {
                    "description": "The statuses the transition can start from.",
                    "type": "string"
                  },
                  "type": "array"
                },
                "id": {
                  "description": "The ID of the transition.",
                  "type": "string"
                },
                "name": {
                  "description": "The name of the transition.",
                  "type": "string"
                },
                "properties": {
                  "additionalProperties": {
                    "description": "The properties of the transition."
                  },
                  "description": "The properties of the transition.",
                  "type": "object"
                },
                "rules": {
                  "additionalProperties": false,
                  "description": "A collection of transition rules.",
                  "properties": {
                    "conditionsTree": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/WorkflowSimpleCondition"
                        },
                        {
                          "$ref": "#/components/schemas/WorkflowCompoundCondition"
                        }
                      ],
                      "additionalProperties": false,
                      "description": "The workflow transition rule conditions tree.",
                      "discriminator": {
                        "mapping": {
                          "compound": "#/components/schemas/WorkflowCompoundCondition",
                          "simple": "#/components/schemas/WorkflowSimpleCondition"
                        },
                        "propertyName": "nodeType"
                      },
                      "type": "object"
                    },
                    "postFunctions": {
                      "description": "The workflow post functions.",
                      "items": {
                        "additionalProperties": false,
                        "description": "A workflow transition rule.",
                        "properties": {
                          "configuration": {
                            "description": "EXPERIMENTAL. The configuration of the transition rule."
                          },
                          "type": {
                            "description": "The type of the transition rule.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "validators": {
                      "description": "The workflow validators.",
                      "items": {
                        "additionalProperties": false,
                        "description": "A workflow transition rule.",
                        "properties": {
                          "configuration": {
                            "description": "EXPERIMENTAL. The configuration of the transition rule."
                          },
                          "type": {
                            "description": "The type of the transition rule.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                },
                "screen": {
                  "additionalProperties": false,
                  "description": "The details of a transition screen.",
                  "properties": {
                    "id": {
                      "description": "The ID of the screen.",
                      "type": "string"
                    },
                    "name": {
                      "description": "The name of the screen.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id"
                  ],
                  "type": "object"
                },
                "to": {
                  "description": "The status the transition goes to.",
                  "type": "string"
                },
                "type": {
                  "description": "The type of the transition.",
                  "enum": [
                    "global",
                    "initial",
                    "directed"
                  ],
                  "type": "string"
                }
              },
              "required": [
                "description",
                "from",
                "id",
                "name",
                "to",
                "type"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "updated": {
            "description": "The last edited date of the workflow.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "description",
          "id"
        ],
        "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('getWorkflowsPaginated', {
    # Add required parameters here
})