Open Context Protocol is live! 🚀 Read the launch post

createWorkflow

Create workflow

Details

  • Method: POST
  • Path: /rest/api/3/workflow
  • Operation ID: createWorkflow

Parameters

{
  "description": {
    "description": "The description of the workflow. The maximum length is 1000 characters.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "name": {
    "description": "The name of the workflow. The name must be unique. The maximum length is 255 characters. Characters can be separated by a whitespace but the name cannot start or end with a whitespace.",
    "required": true,
    "location": "body",
    "type": "string"
  },
  "statuses": {
    "description": "The statuses of the workflow. Any status that does not include a transition is added to the workflow without a transition.",
    "required": true,
    "location": "body",
    "type": "array"
  },
  "transitions": {
    "description": "The transitions of the workflow. For the request to be valid, these transitions must:\n\n *  include one *initial* transition.\n *  not use the same name for a *global* and *directed* transition.\n *  have a unique name for each *global* transition.\n *  have a unique 'to' status for each *global* transition.\n *  have unique names for each transition from a status.\n *  not have a 'from' status on *initial* and *global* transitions.\n *  have a 'from' status on *directed* transitions.\n\nAll the transition statuses must be included in `statuses`.",
    "required": true,
    "location": "body",
    "type": "array"
  }
}

Response Schema

{
  "additionalProperties": false,
  "description": "The classic workflow identifiers.",
  "properties": {
    "entityId": {
      "description": "The entity ID of the workflow.",
      "type": "string"
    },
    "name": {
      "description": "The name of the workflow.",
      "type": "string"
    }
  },
  "required": [
    "name"
  ],
  "type": "object"
}

Usage

from ocp_agent import OCPAgent

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

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