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

getIssueWatchers

Get issue watchers

Details

  • Method: GET
  • Path: /rest/api/3/issue/{issueIdOrKey}/watchers
  • Operation ID: getIssueWatchers

Parameters

{
  "issueIdOrKey": {
    "description": "The ID or key of the issue.",
    "required": true,
    "location": "path",
    "type": "string"
  }
}

Response Schema

{
  "additionalProperties": false,
  "description": "The details of watchers on an issue.",
  "properties": {
    "isWatching": {
      "description": "Whether the calling user is watching this issue.",
      "readOnly": true,
      "type": "boolean"
    },
    "self": {
      "description": "The URL of these issue watcher details.",
      "readOnly": true,
      "type": "string"
    },
    "watchCount": {
      "description": "The number of users watching this issue.",
      "format": "int32",
      "readOnly": true,
      "type": "integer"
    },
    "watchers": {
      "description": "Details of the users watching this issue.",
      "items": {
        "additionalProperties": false,
        "description": "User details permitted by the user's Atlassian Account privacy settings. However, be aware of these exceptions:\n\n *  User record deleted from Atlassian: This occurs as the result of a right to be forgotten request. In this case, `displayName` provides an indication and other parameters have default values or are blank (for example, email is blank).\n *  User record corrupted: This occurs as a results of events such as a server import and can only happen to deleted users. In this case, `accountId` returns *unknown* and all other parameters have fallback values.\n *  User record unavailable: This usually occurs due to an internal service outage. In this case, all parameters have fallback values.",
        "properties": {
          "accountId": {
            "description": "The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.",
            "maxLength": 128,
            "type": "string"
          },
          "accountType": {
            "description": "The type of account represented by this user. This will be one of 'atlassian' (normal users), 'app' (application user) or 'customer' (Jira Service Desk customer user)",
            "readOnly": true,
            "type": "string"
          },
          "active": {
            "description": "Whether the user is active.",
            "readOnly": true,
            "type": "boolean"
          },
          "avatarUrls": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvatarUrlsBean"
              }
            ],
            "description": "The avatars of the user.",
            "readOnly": true
          },
          "displayName": {
            "description": "The display name of the user. Depending on the user’s privacy settings, this may return an alternative value.",
            "readOnly": true,
            "type": "string"
          },
          "emailAddress": {
            "description": "The email address of the user. Depending on the user’s privacy settings, this may be returned as null.",
            "readOnly": true,
            "type": "string"
          },
          "key": {
            "description": "This property is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.",
            "readOnly": true,
            "type": "string"
          },
          "name": {
            "description": "This property is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.",
            "readOnly": true,
            "type": "string"
          },
          "self": {
            "description": "The URL of the user.",
            "readOnly": true,
            "type": "string"
          },
          "timeZone": {
            "description": "The time zone specified in the user's profile. Depending on the user’s privacy settings, this may be returned as null.",
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "readOnly": true,
      "type": "array"
    }
  },
  "type": "object",
  "xml": {
    "name": "watchers"
  }
}

Usage

from ocp_agent import OCPAgent

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

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