Skip to content

notificationscheme

add-notifications

Add notifications to notification scheme

Adds notifications to a notification scheme. You can add up to 1000 notifications per request.

Deprecated: The notification type EmailAddress is no longer supported in Cloud. Refer to the changelog for more details.

Permissions required: Administer Jira global permission.

PUT /rest/api/3/notificationscheme/{id}/notification

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--idstringYesThe ID of the notification scheme.

Example:

bash
jr notificationscheme add-notifications --id <id>

create-notification-scheme

Create notification scheme

Creates a notification scheme with notifications. You can create up to 1000 notifications per request.

Permissions required: Administer Jira global permission.

POST /rest/api/3/notificationscheme

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)

Example:

bash
jr notificationscheme create-notification-scheme

delete-notification-scheme

Delete notification scheme

Deletes a notification scheme.

Permissions required: Administer Jira global permission.

DELETE /rest/api/3/notificationscheme/{notificationSchemeId}

FlagTypeRequiredDescription
--notificationSchemeIdstringYesThe ID of the notification scheme.

Example:

bash
jr notificationscheme delete-notification-scheme --notificationSchemeId <notificationSchemeId>

get-notification-scheme

Get notification scheme

Returns a notification scheme, including the list of events and the recipients who will receive notifications for those events.

Permissions required: Permission to access Jira, however, the user must have permission to administer at least one project associated with the notification scheme.

GET /rest/api/3/notificationscheme/{id}

FlagTypeRequiredDescription
--expandstringNoUse expand to include additional information in the response. This parameter accepts a comma-separated list. Expand options include:
  • all Returns all expandable information
  • field Returns information about any custom fields assigned to receive an event
  • group Returns information about any groups assigned to receive an event
  • notificationSchemeEvents Returns a list of event associations. This list is returned for all expandable information
  • projectRole Returns information about any project roles assigned to receive an event
  • user Returns information about any users assigned to receive an event | | --id | string | Yes | The ID of the notification scheme. Use Get notification schemes paginated to get a list of notification scheme IDs. |

Example:

bash
jr notificationscheme get-notification-scheme --id <id>

get-notification-scheme-to-project-mappings

Get projects using notification schemes paginated

Returns a paginated mapping of project that have notification scheme assigned. You can provide either one or multiple notification scheme IDs or project IDs to filter by. If you don't provide any, this will return a list of all mappings. Note that only company-managed (classic) projects are supported. This is because team-managed projects don't have a concept of a default notification scheme. The mappings are ordered by projectId.

Permissions required: Permission to access Jira.

GET /rest/api/3/notificationscheme/project

FlagTypeRequiredDescription
--maxResultsstringNoThe maximum number of items to return per page.
--notificationSchemeIdstringNoThe list of notifications scheme IDs to be filtered out
--projectIdstringNoThe list of project IDs to be filtered out
--startAtstringNoThe index of the first item to return in a page of results (page offset).

Example:

bash
jr notificationscheme get-notification-scheme-to-project-mappings

get-notification-schemes

Get notification schemes paginated

Returns a paginated list of notification schemes ordered by the display name.

Note that you should allow for events without recipients to appear in responses.

Permissions required: Permission to access Jira, however, the user must have permission to administer at least one project associated with a notification scheme for it to be returned.

GET /rest/api/3/notificationscheme

FlagTypeRequiredDescription
--expandstringNoUse expand to include additional information in the response. This parameter accepts a comma-separated list. Expand options include:
  • all Returns all expandable information
  • field Returns information about any custom fields assigned to receive an event
  • group Returns information about any groups assigned to receive an event
  • notificationSchemeEvents Returns a list of event associations. This list is returned for all expandable information
  • projectRole Returns information about any project roles assigned to receive an event
  • user Returns information about any users assigned to receive an event | | --id | string | No | The list of notification schemes IDs to be filtered by | | --maxResults | string | No | The maximum number of items to return per page. | | --onlyDefault | string | No | When set to true, returns only the default notification scheme. If you provide project IDs not associated with the default, returns an empty page. The default value is false. | | --projectId | string | No | The list of projects IDs to be filtered by | | --startAt | string | No | The index of the first item to return in a page of results (page offset). |

Example:

bash
jr notificationscheme get-notification-schemes

remove-notification-from-notification-scheme

Remove notification from notification scheme

Removes a notification from a notification scheme.

Permissions required: Administer Jira global permission.

DELETE /rest/api/3/notificationscheme/{notificationSchemeId}/notification/{notificationId}

FlagTypeRequiredDescription
--notificationIdstringYesThe ID of the notification.
--notificationSchemeIdstringYesThe ID of the notification scheme.

Example:

bash
jr notificationscheme remove-notification-from-notification-scheme --notificationId <notificationId> --notificationSchemeId <notificationSchemeId>

update-notification-scheme

Update notification scheme

Updates a notification scheme.

Permissions required: Administer Jira global permission.

PUT /rest/api/3/notificationscheme/{id}

FlagTypeRequiredDescription
--bodystringNorequest body (JSON string, @file, or - for stdin)
--idstringYesThe ID of the notification scheme.

Example:

bash
jr notificationscheme update-notification-scheme --id <id>