createIssue
Create issue
Details
- Method:
POST - Path:
/rest/api/3/issue - Operation ID:
createIssue
Parameters
{
"updateHistory": {
"description": "Whether the project in which the issue is created is added to the user's **Recently viewed** project list, as shown under **Projects** in Jira. When provided, the issue type and request type are added to the user's history for a project. These values are then used to provide defaults on the issue create screen.",
"required": false,
"location": "query",
"type": "boolean"
},
"fields": {
"description": "List of issue screen fields to update, specifying the sub-field to update and its value for each field. This field provides a straightforward option when setting a sub-field. When multiple sub-fields or other operations are required, use `update`. Fields included in here cannot be included in `update`.",
"required": false,
"location": "body",
"type": "object"
},
"historyMetadata": {
"description": "Additional issue history details.",
"required": false,
"location": "body",
"type": "string"
},
"properties": {
"description": "Details of issue properties to be add or update.",
"required": false,
"location": "body",
"type": "array"
},
"transition": {
"description": "Details of a transition. Required when performing a transition, optional when creating or editing an issue.",
"required": false,
"location": "body",
"type": "string"
},
"update": {
"description": "A Map containing the field field name and a list of operations to perform on the issue screen field. Note that fields included in here cannot be included in `fields`.",
"required": false,
"location": "body",
"type": "object"
}
}Response Schema
{
"additionalProperties": false,
"description": "Details about a created issue or subtask.",
"properties": {
"id": {
"description": "The ID of the created issue or subtask.",
"readOnly": true,
"type": "string"
},
"key": {
"description": "The key of the created issue or subtask.",
"readOnly": true,
"type": "string"
},
"self": {
"description": "The URL of the created issue or subtask.",
"readOnly": true,
"type": "string"
},
"transition": {
"allOf": [
{
"$ref": "#/components/schemas/NestedResponse"
}
],
"description": "The response code and messages related to any requested transition.",
"readOnly": true
},
"watchers": {
"allOf": [
{
"$ref": "#/components/schemas/NestedResponse"
}
],
"description": "The response code and messages related to any requested watchers.",
"readOnly": true
}
},
"type": "object"
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('jira')
# Call this tool
result = await agent.call_tool('createIssue', {
# Add required parameters here
})