Dev Portal | Dev Portal
  • Polaris
  • Community
  • Support
    • Get started
      • Get started on the Black Duck Developer Portal
      • Make an access token
    • Integrations
      • Introduction: Polaris Integrations
      • Connect Polaris to Multiple SCM Repositories
        • Azure Repos
        • Bitbucket Cloud
        • GitHub and GitHub Enterprise
        • GitLab SaaS
      • Synchronizing Polaris with your SCM Provider
      • Event-Based Test Automation in Polaris for SCM Integrations
      • Azure Tokens for SCM Bulk Integration and/or Monitoring
      • Bitbucket Tokens for SCM Bulk Integration and/or Monitoring
      • GitHub Tokens for SCM Bulk Integration and/or Monitoring
      • GitLab Tokens for SCM Bulk Integration and/or Monitoring
      • Connect a Polaris project to a repository in your SCM
        • Azure Repos
        • Bitbucket Cloud
        • Bitbucket Data Center
        • GitHub and GitHub Enterprise Cloud
        • GitHub Enterprise Server
        • GitLab SaaS
        • GitLab Self-Managed
        • Enhanced branch support and invalid SCM access tokens
      • Black Duck Security Scan Extension for Azure DevOps
      • Black Duck Security Scan Pipe for Bitbucket
      • Black Duck Security Scan Action
      • Black Duck Security Scan Template
      • Black Duck Security Scan Plugin for Jenkins
      • Connect Code Sight to Polaris
    • Command line automation
      • Bridge CLI
      • Configuring Coverity Thin Client for use with Bridge CLI and Polaris
    • Polaris API
      • Polaris API Introduction
      • API Quickstart
      • Service accounts for Polaris
    • API Reference Guide
      • Audit
      • Bug Tracking Integration
      • Findings
      • Identity and Access Management
      • Notification
      • Policies
      • Portfolio
      • Reports
      • Repos Integration
      • Tests
      • Tool Connector API
      • Tools
    Dev Portal API Reference Guide Notification
    "openapi: 3.1.0\ninfo:\n title: Notification\n description: |\n Notification APIs for Polaris\n contact:\n name: Black Duck Software, Inc.\n url: https://polaris.blackduck.com\n version: 1.1.2\nservers:\n - url: https://polaris.blackduck.com\ntags:\n - name: User Subscriptions\n description: Contains APIs to deal with notification subscriptions of a user.\n - name: Organization Preferences\n description: Contains API to deal with notification preferences of an organization.\nsecurity:\n - ApiKeyAuth: []\npaths:\n /api/notification/organization-preferences:\n get:\n tags:\n - Organization Preferences\n summary: Get organization notification preferences\n description: Get organization notification preferences\n operationId: getOrganizationNotificationPreferences\n responses:\n '200':\n $ref: '#/components/responses/GetOrganizationNotificationPreferencesResponse'\n '400':\n description: Returned when the request could not be processed due to invalid syntax.\n content:\n application/json:\n schema:\n type: object\n description: Provides a error response with details.\n properties:\n title:\n type: string\n description: A short, human-readable summary of the problem.\n example: Unable to process your request.\n status:\n type: integer\n description: The HTTP status code generated by the origin server for this occurrence of the problem.\n example: 0\n errors:\n type: array\n description: List of errors that occurred during the request.\n items:\n type: object\n description: An individual error that occurred during the request.\n properties:\n detail:\n type: string\n description: A human-readable explanation specific to this occurrence of the problem.\n example: Missing request body.\n example:\n title: Unable to process your request.\n status: 400\n errors:\n - detail: Missing request body.\n '401':\n description: Returned if the client has not provided a valid access token in the request.\n content:\n application/json:\n schema:\n $ref: '#/paths/~1api~1notification~1organization-preferences/get/responses/400/content/application~1json/schema'\n example:\n title: Unable to process your request.\n status: 401\n errors:\n - detail: Invalid credentials.\n '403':\n description: Returned if the authenticated user does not have access to the requested resource.\n content:\n application/json:\n schema:\n $ref: '#/paths/~1api~1notification~1organization-preferences/get/responses/400/content/application~1json/schema'\n example:\n title: Unable to process your request.\n status: 403\n errors:\n - detail: Access denied, cannot access the requested resource.\n '404':\n description: Returned when a specified resource could not be found.\n content:\n application/json:\n schema:\n $ref: '#/paths/~1api~1notification~1organization-preferences/get/responses/400/content/application~1json/schema'\n example:\n title: Unable to process your request.\n status: 404\n errors:\n - detail: Something is not found.\n '500':\n description: Returned when server side error has occurred.\n content:\n application/json:\n schema:\n $ref: '#/paths/~1api~1notification~1organization-preferences/get/responses/400/content/application~1json/schema'\n example:\n title: Unable to process your request.\n status: 500\n errors:\n - detail: Something went wrong while storing the data.\n patch:\n tags:\n - Organization Preferences\n summary: Update organization notification preferences\n description: Update organization notification preferences\n operationId: patchOrganizationNotificationPreferences\n requestBody:\n $ref: '#/components/requestBodies/PatchOrganizationNotificationPreferencesRequestBodyV1'\n responses:\n '200':\n $ref: '#/components/responses/PatchOrganizationNotificationPreferencesResponse'\n '400':\n $ref: '#/paths/~1api~1notification~1organization-preferences/get/responses/400'\n '401':\n $ref: '#/paths/~1api~1notification~1organization-preferences/get/responses/401'\n '403':\n $ref: '#/paths/~1api~1notification~1organization-preferences/get/responses/403'\n '404':\n $ref: '#/paths/~1api~1notification~1organization-preferences/get/responses/404'\n '500':\n $ref: '#/paths/~1api~1notification~1organization-preferences/get/responses/500'\n /api/notification/subscriptions/event-groups:\n get:\n tags:\n - User Subscriptions\n summary: Get user notification subscriptions for event groups\n description: Get user notification subscriptions for event groups\n operationId: getUserEventGroupNotificationSubscriptions\n parameters:\n - name: _limit\n in: query\n description: |\n Limits the number of items returned in the result.\n **Default:** 100\n example: 10\n schema:\n type: integer\n minimum: 0\n maximum: 100\n example: 10\n - name: _offset\n in: query\n description: |\n Skips the first `_offset` items in the result.\n **Default:** 0\n example: 10\n schema:\n type: integer\n minimum: 0\n example: 10\n responses:\n '200':\n $ref: '#/components/responses/GetUserEventGroupNotificationSubscriptionsResponse'\n '400':\n $ref: '#/paths/~1api~1notification~1organization-preferences/get/responses/400'\n '401':\n $ref: '#/paths/~1api~1notification~1organization-preferences/get/responses/401'\n '403':\n $ref: '#/paths/~1api~1notification~1organization-preferences/get/responses/403'\n '404':\n $ref: '#/paths/~1api~1notification~1organization-preferences/get/responses/404'\n '500':\n $ref: '#/paths/~1api~1notification~1organization-preferences/get/responses/500'\n /api/notification/event-groups/{eventGroupId}/subscriptions:\n patch:\n tags:\n - User Subscriptions\n summary: Update user notification subscriptions for event groups\n description: Update user notification subscriptions for event groups\n operationId: patchUserEventGroupNotificationSubscriptions\n parameters:\n - name: eventGroupId\n in: path\n required: true\n description: ID of the event group.\n example: 777b7a9e-0414-44d5-806e-ce9d068bd081\n schema:\n type: string\n format: uuid\n example: 777b7a9e-0414-44d5-806e-ce9d068bd081\n requestBody:\n $ref: '#/components/requestBodies/PatchUserEventGroupNotificationSubscriptionsRequestBodyV1'\n responses:\n '200':\n $ref: '#/components/responses/PatchUserEventGroupNotificationSubscriptionsResponse'\n '400':\n $ref: '#/paths/~1api~1notification~1organization-preferences/get/responses/400'\n '401':\n $ref: '#/paths/~1api~1notification~1organization-preferences/get/responses/401'\n '403':\n $ref: '#/paths/~1api~1notification~1organization-preferences/get/responses/403'\n '404':\n $ref: '#/paths/~1api~1notification~1organization-preferences/get/responses/404'\n '500':\n $ref: '#/paths/~1api~1notification~1organization-preferences/get/responses/500'\ncomponents:\n requestBodies:\n PatchOrganizationNotificationPreferencesRequestBodyV1:\n required: true\n content:\n application/vnd.polaris.notification.organization-preferences-1+json:\n schema:\n $ref: '#/components/schemas/PatchNotificationSubscriptionsRequestV1'\n example:\n - notification-type: EMAIL\n subscribed: true\n - notification-type: SLACK\n subscribed: false\n PatchUserEventGroupNotificationSubscriptionsRequestBodyV1:\n required: true\n content:\n application/vnd.polaris.notification.event-group-1+json:\n schema:\n $ref: '#/components/schemas/PatchNotificationSubscriptionsRequestV1'\n example:\n - notification-type: EMAIL\n subscribed: true\n - notification-type: SLACK\n subscribed: false\n responses:\n GetOrganizationNotificationPreferencesResponse:\n description: Success. A response with organization notification preferences.\n content:\n application/vnd.polaris.notification.organization-preferences-1+json:\n schema:\n type: object\n properties:\n object:\n $ref: '#/components/schemas/OrganizationNotificationPreferencesV1'\n _links:\n $ref: '#/components/schemas/UserEventGroupNotificationSubscriptionItem/properties/_links'\n example:\n object:\n organization-subscriptions:\n - notification-type: EMAIL\n subscribed: true\n - notification-type: SLACK\n subscribed: false\n _links:\n - href: https://polaris.blackduck.com/api/notification/organization-preferences\n rel: self\n method: GET\n PatchOrganizationNotificationPreferencesResponse:\n description: Success. An empty response.\n content:\n application/vnd.polaris.notification.organization-preferences-1+json:\n schema:\n type: object\n example: {}\n GetUserEventGroupNotificationSubscriptionsResponse:\n description: Success. A response with user notification subscriptions for event groups.\n content:\n application/vnd.polaris.notification.subscriptions.event-groups-1+json:\n schema:\n type: object\n properties:\n _items:\n type: array\n description: List of user notification subscriptions for event groups\n items:\n $ref: '#/components/schemas/UserEventGroupNotificationSubscriptionItem'\n _links:\n $ref: '#/components/schemas/UserEventGroupNotificationSubscriptionItem/properties/_links'\n _collections:\n type: object\n description: Pagination information for the current result set.\n properties:\n itemCount:\n type: integer\n description: The total number of items.\n example: 450\n pageCount:\n type: integer\n description: The total number of pages.\n example: 5\n currentPage:\n type: integer\n description: The current page number of the results (one-based), given the current offset and limit settings. An empty result does not have a current page.\n example: 3\n _type:\n type: string\n description: An indicator of the resource type.\n example: test\n example:\n _items:\n - object:\n - id: 777b7a9e-0414-44d5-806e-ce9d068bd081\n namespace: polaris.security\n key: vulnerability.detected\n description: Notification for new vulnerabilities detected in scans\n enabled: true\n totalEvents: 20\n events: []\n roles:\n - ROLE_USER\n - ROLE_ADMIN\n notificationTypes:\n - notification-type: EMAIL\n subscribed: true\n - notification-type: SLACK\n subscribed: false\n _links:\n - href: https://polaris.blackduck.com/api/notification/event-groups/777b7a9e-0414-44d5-806e-ce9d068bd081\n rel: self\n method: GET\n _links:\n - href: https://polaris.blackduck.com/api/notification/subscriptions/event-groups?_offset=0&_limit=25\n rel: self\n method: GET\n - href: https://polaris.blackduck.com/api/notification/subscriptions/event-groups?_offset=0&_limit=25\n rel: first\n method: GET\n _collections:\n itemCount: 1\n currentPage: 1\n pageCount: 1\n _type: event-groups\n PatchUserEventGroupNotificationSubscriptionsResponse:\n description: Success. An empty response.\n content:\n application/vnd.polaris.notification.event-group-1+json:\n schema:\n type: object\n example: {}\n securitySchemes:\n ApiKeyAuth:\n type: apiKey\n in: header\n name: Api-Token\n schemas:\n NotificationSubscriptionResourceV1:\n type: object\n description: Notification subscription\n properties:\n notification-type:\n type: string\n example: EMAIL\n description: Notification channel\n subscribed:\n type: boolean\n example: true\n description: Subscribed or not\n EventGroupNotificationSubscriptionResourceV1:\n type: object\n description: Event group notification subscription\n properties:\n id:\n type: string\n format: uuid\n example: 777b7a9e-0414-44d5-806e-ce9d068bd081\n description: ID of the event group\n namespace:\n type: string\n example: namespace\n description: Namespace of the event group\n key:\n type: string\n example: key\n description: Key of the event group\n description:\n type: string\n example: description\n description: Description of the event group\n enabled:\n type: boolean\n example: true\n description: Enabled or not\n totalEvents:\n type: integer\n example: 20\n description: Total number of events\n events:\n deprecated: false\n type: array\n items:\n type: object\n description: List of events\n roles:\n type: array\n description: List of roles\n items:\n type: string\n description: Role\n example: ROLE_USER\n example:\n - ROLE_USER\n notificationTypes:\n type: array\n description: List of notification channels\n items:\n $ref: '#/components/schemas/NotificationSubscriptionResourceV1'\n OrganizationNotificationPreferencesV1:\n type: object\n description: Organization notification preferences\n properties:\n organization-subscriptions:\n type: array\n description: List of organization notification subscriptions\n items:\n $ref: '#/components/schemas/NotificationSubscriptionResourceV1'\n PatchNotificationSubscriptionsRequestV1:\n type: array\n description: Patch notification subscriptions request\n items:\n properties:\n notification-type:\n type: string\n example: EMAIL\n description: Notification channel\n subscribed:\n type: boolean\n example: true\n description: Subscribed or not\n UserEventGroupNotificationSubscriptionsV1:\n type: array\n description: List of user notification subscriptions for event groups\n items:\n $ref: '#/components/schemas/EventGroupNotificationSubscriptionResourceV1'\n UserEventGroupNotificationSubscriptionItem:\n type: object\n description: Success. A response with user notification subscriptions.\n properties:\n object:\n $ref: '#/components/schemas/UserEventGroupNotificationSubscriptionsV1'\n _links:\n type: array\n description: An array of links that can be followed for further information about this resource.\n items:\n type: object\n description: An individual link that can be followed for further information about this resource.\n required:\n - href\n - rel\n - method\n properties:\n href:\n type: string\n format: uri\n description: The URI to follow for this reference.\n example: http://example.com\n rel:\n type: string\n format: rel\n description: The relation name.\n example: self\n method:\n type: string\n description: The HTTP method to use while following this reference.\n example: GET\n"
    {}
    ©Black Duck, Inc. All Rights Reserved Worldwide
    Terms of Service