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

getNotificationSchemeForProject

Get project notification scheme

Details

  • Method: GET
  • Path: /rest/api/3/project/{projectKeyOrId}/notificationscheme
  • Operation ID: getNotificationSchemeForProject

Parameters

{
  "projectKeyOrId": {
    "description": "The project ID or project key (case sensitive).",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "expand": {
    "description": "Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Expand options include:\n\n *  `all` Returns all expandable information\n *  `field` Returns information about any custom fields assigned to receive an event\n *  `group` Returns information about any groups assigned to receive an event\n *  `notificationSchemeEvents` Returns a list of event associations. This list is returned for all expandable information\n *  `projectRole` Returns information about any project roles assigned to receive an event\n *  `user` Returns information about any users assigned to receive an event",
    "required": false,
    "location": "query",
    "type": "string"
  }
}

Response Schema

{
  "additionalProperties": false,
  "description": "Details about a notification scheme.",
  "properties": {
    "description": {
      "description": "The description of the notification scheme.",
      "type": "string"
    },
    "expand": {
      "description": "Expand options that include additional notification scheme details in the response.",
      "type": "string"
    },
    "id": {
      "description": "The ID of the notification scheme.",
      "format": "int64",
      "type": "integer"
    },
    "name": {
      "description": "The name of the notification scheme.",
      "type": "string"
    },
    "notificationSchemeEvents": {
      "description": "The notification events and associated recipients.",
      "items": {
        "additionalProperties": false,
        "description": "Details about a notification scheme event.",
        "properties": {
          "event": {
            "additionalProperties": false,
            "description": "Details about a notification event.",
            "properties": {
              "description": {
                "description": "The description of the event.",
                "type": "string"
              },
              "id": {
                "description": "The ID of the event. The event can be a [Jira system event](https://confluence.atlassian.com/x/8YdKLg#Creatinganotificationscheme-eventsEvents) or a [custom event](https://confluence.atlassian.com/x/AIlKLg).",
                "format": "int64",
                "type": "integer"
              },
              "name": {
                "description": "The name of the event.",
                "type": "string"
              },
              "templateEvent": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/NotificationEvent"
                  }
                ],
                "description": "The template of the event. Only custom events configured by Jira administrators have template."
              }
            },
            "type": "object"
          },
          "notifications": {
            "items": {
              "additionalProperties": false,
              "description": "Details about a notification associated with an event.",
              "properties": {
                "emailAddress": {
                  "description": "The email address.",
                  "type": "string"
                },
                "expand": {
                  "description": "Expand options that include additional event notification details in the response.",
                  "type": "string"
                },
                "field": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/FieldDetails"
                    }
                  ],
                  "description": "The custom user or group field."
                },
                "group": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/GroupName"
                    }
                  ],
                  "description": "The specified group."
                },
                "id": {
                  "description": "The ID of the notification.",
                  "format": "int64",
                  "type": "integer"
                },
                "notificationType": {
                  "description": "Identifies the recipients of the notification.",
                  "enum": [
                    "CurrentAssignee",
                    "Reporter",
                    "CurrentUser",
                    "ProjectLead",
                    "ComponentLead",
                    "User",
                    "Group",
                    "ProjectRole",
                    "EmailAddress",
                    "AllWatchers",
                    "UserCustomField",
                    "GroupCustomField"
                  ],
                  "type": "string"
                },
                "parameter": {
                  "description": "As a group's name can change, use of `recipient` is recommended. The identifier associated with the `notificationType` value that defines the receiver of the notification, where the receiver isn't implied by `notificationType` value. So, when `notificationType` is:\n\n *  `User` The `parameter` is the user account ID.\n *  `Group` The `parameter` is the group name.\n *  `ProjectRole` The `parameter` is the project role ID.\n *  `UserCustomField` The `parameter` is the ID of the custom field.\n *  `GroupCustomField` The `parameter` is the ID of the custom field.",
                  "type": "string"
                },
                "projectRole": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ProjectRole"
                    }
                  ],
                  "description": "The specified project role."
                },
                "recipient": {
                  "description": "The identifier associated with the `notificationType` value that defines the receiver of the notification, where the receiver isn't implied by the `notificationType` value. So, when `notificationType` is:\n\n *  `User`, `recipient` is the user account ID.\n *  `Group`, `recipient` is the group ID.\n *  `ProjectRole`, `recipient` is the project role ID.\n *  `UserCustomField`, `recipient` is the ID of the custom field.\n *  `GroupCustomField`, `recipient` is the ID of the custom field.",
                  "type": "string"
                },
                "user": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/UserDetails"
                    }
                  ],
                  "description": "The specified user."
                }
              },
              "type": "object"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "projects": {
      "description": "The list of project IDs associated with the notification scheme.",
      "items": {
        "format": "int64",
        "type": "integer"
      },
      "type": "array"
    },
    "scope": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Scope"
        }
      ],
      "description": "The scope of the notification scheme."
    },
    "self": {
      "type": "string"
    }
  },
  "type": "object"
}

Usage

from ocp_agent import OCPAgent

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

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