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

readWorkflowSchemes

Bulk get workflow schemes

Details

  • Method: POST
  • Path: /rest/api/3/workflowscheme/read
  • Operation ID: readWorkflowSchemes

Parameters

{
  "projectIds": {
    "description": "The list of project IDs to query.",
    "required": false,
    "location": "body",
    "type": "array"
  },
  "workflowSchemeIds": {
    "description": "The list of workflow scheme IDs to query.",
    "required": false,
    "location": "body",
    "type": "array"
  }
}

Response Schema

{
  "items": {
    "additionalProperties": false,
    "properties": {
      "defaultWorkflow": {
        "additionalProperties": false,
        "description": "Workflow metadata and usage detail.",
        "properties": {
          "description": {
            "description": "The description of the workflow.",
            "type": "string"
          },
          "id": {
            "description": "The ID of the workflow.",
            "type": "string"
          },
          "name": {
            "description": "The name of the workflow.",
            "type": "string"
          },
          "version": {
            "additionalProperties": false,
            "description": "The current version details of this workflow scheme.",
            "properties": {
              "id": {
                "description": "The version UUID.",
                "type": "string"
              },
              "versionNumber": {
                "description": "The version number.",
                "format": "int64",
                "type": "integer"
              }
            },
            "type": "object"
          }
        },
        "required": [
          "description",
          "id",
          "name",
          "version"
        ],
        "type": "object"
      },
      "description": {
        "description": "The description of the workflow scheme.",
        "nullable": true,
        "type": "string"
      },
      "id": {
        "description": "The ID of the workflow scheme.",
        "type": "string"
      },
      "name": {
        "description": "The name of the workflow scheme.",
        "type": "string"
      },
      "scope": {
        "additionalProperties": false,
        "description": "The scope of the workflow.",
        "properties": {
          "project": {
            "additionalProperties": false,
            "description": "Project ID details.",
            "nullable": true,
            "properties": {
              "id": {
                "description": "The ID of the project.",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          },
          "type": {
            "description": "The scope of the workflow. `GLOBAL` for company-managed projects and `PROJECT` for team-managed projects.",
            "enum": [
              "PROJECT",
              "GLOBAL"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "taskId": {
        "description": "Indicates if there's an [asynchronous task](#async-operations) for this workflow scheme.",
        "nullable": true,
        "type": "string"
      },
      "version": {
        "additionalProperties": false,
        "description": "The current version details of this workflow scheme.",
        "properties": {
          "id": {
            "description": "The version UUID.",
            "type": "string"
          },
          "versionNumber": {
            "description": "The version number.",
            "format": "int64",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "workflowsForIssueTypes": {
        "description": "Mappings from workflows to issue types.",
        "items": {
          "additionalProperties": false,
          "description": "The workflow metadata and issue type IDs which use this workflow.",
          "properties": {
            "issueTypeIds": {
              "description": "The list of issue type IDs for the mapping.",
              "items": {
                "description": "The list of issue type IDs for the mapping.",
                "type": "string"
              },
              "type": "array"
            },
            "workflow": {
              "additionalProperties": false,
              "description": "Workflow metadata and usage detail.",
              "properties": {
                "description": {
                  "description": "The description of the workflow.",
                  "type": "string"
                },
                "id": {
                  "description": "The ID of the workflow.",
                  "type": "string"
                },
                "name": {
                  "description": "The name of the workflow.",
                  "type": "string"
                },
                "version": {
                  "additionalProperties": false,
                  "description": "The current version details of this workflow scheme.",
                  "properties": {
                    "id": {
                      "description": "The version UUID.",
                      "type": "string"
                    },
                    "versionNumber": {
                      "description": "The version number.",
                      "format": "int64",
                      "type": "integer"
                    }
                  },
                  "type": "object"
                }
              },
              "required": [
                "description",
                "id",
                "name",
                "version"
              ],
              "type": "object"
            }
          },
          "required": [
            "issueTypeIds",
            "workflow"
          ],
          "type": "object"
        },
        "type": "array"
      }
    },
    "required": [
      "id",
      "name",
      "scope",
      "version",
      "workflowsForIssueTypes"
    ],
    "type": "object"
  },
  "type": "array"
}

Usage

from ocp_agent import OCPAgent

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

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