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

createIssueTypeAvatar

Load issue type avatar

Details

  • Method: POST
  • Path: /rest/api/3/issuetype/{id}/avatar2
  • Operation ID: createIssueTypeAvatar

Parameters

{
  "id": {
    "description": "The ID of the issue type.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "x": {
    "description": "The X coordinate of the top-left corner of the crop region.",
    "required": false,
    "location": "query",
    "type": "integer",
    "format": "int32"
  },
  "y": {
    "description": "The Y coordinate of the top-left corner of the crop region.",
    "required": false,
    "location": "query",
    "type": "integer",
    "format": "int32"
  },
  "size": {
    "description": "The length of each side of the crop region.",
    "required": true,
    "location": "query",
    "type": "integer",
    "format": "int32"
  }
}

Response Schema

{
  "additionalProperties": true,
  "description": "Details of an avatar.",
  "properties": {
    "fileName": {
      "description": "The file name of the avatar icon. Returned for system avatars.",
      "readOnly": true,
      "type": "string"
    },
    "id": {
      "description": "The ID of the avatar.",
      "type": "string"
    },
    "isDeletable": {
      "description": "Whether the avatar can be deleted.",
      "readOnly": true,
      "type": "boolean"
    },
    "isSelected": {
      "description": "Whether the avatar is used in Jira. For example, shown as a project's avatar.",
      "readOnly": true,
      "type": "boolean"
    },
    "isSystemAvatar": {
      "description": "Whether the avatar is a system avatar.",
      "readOnly": true,
      "type": "boolean"
    },
    "owner": {
      "description": "The owner of the avatar. For a system avatar the owner is null (and nothing is returned). For non-system avatars this is the appropriate identifier, such as the ID for a project or the account ID for a user.",
      "readOnly": true,
      "type": "string"
    },
    "urls": {
      "additionalProperties": {
        "format": "uri",
        "readOnly": true,
        "type": "string"
      },
      "description": "The list of avatar icon URLs.",
      "readOnly": true,
      "type": "object"
    }
  },
  "required": [
    "id"
  ],
  "type": "object"
}

Usage

from ocp_agent import OCPAgent

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

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