openapi: 3.0.0
info:
  title: Notification Meta
  description: 'Meta APIs Notification in ID360'
  version: 1.0.0
servers:
  - url: 'https://id360.manageengine.com/api/v1'
    description: 'API Endpoint'
tags:
  - name: notification-meta
    description: 'Meta APIs for Notification Templates'
paths:
  #Notification Meta APIs
  /meta/templates/notification/default_configs:
    get:
      tags:
        - notification-meta
      summary: 'Get Notification Default Configs'
      description: 'The Get Notification Default Configs API can be used to get the default configurations for notification templates.'
      parameters:
        - $ref: '#/components/parameters/acceptHeader'
      responses:
        '200':
          description: 'OK'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/notificationTemplateDefaultConfigs'
        '401':
          description: 'Unauthorized'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorized'
        '500':
          description: 'Internal Server Error'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      security:
        - Zoho_Auth:
            - id360.meta.READ

  /meta/templates/notification/module_configs:
    get:
      tags:
        - notification-meta
      summary: 'Get Notification Module Configs'
      description: 'The Get Notification Module Configs API can be used to get the notification module configurations.'
      parameters:
        - $ref: '#/components/parameters/acceptHeader'
      responses:
        '200':
          description: 'OK'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/notificationTemplateModuleConfigs'
        '401':
          description: 'Unauthorized'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unauthorized'
        '500':
          description: 'Internal Server Error'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
      security:
        - Zoho_Auth:
            - id360.meta.READ

components:
  parameters:
    acceptHeader:
      name: Accept
      in: header
      schema:
        type: string
      description: 'Accept header for the API'
      required: false
      example: 'application/json'
    factorType:
      name: factor_type
      in: path
      required: true
      description: 'The type of the authnFactor to be fetched'
      example: 'EmailAuthenticator'
      schema:
        type: string
  schemas:
    unauthorized:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: '00000101'
            title:
              type: string
              example: 'Unauthorized'
            detail:
              type: string
              example: 'The OAuth token is invalid.'
    serverError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: '00000000'
            title:
              type: string
              example: 'Internal Server Error'
            detail:
              type: string
              example: 'An unexpected internal error has occurred on the server. Please try again later.'

    # Notification Template Default Configs
    notificationTemplateDefaultConfigs:
      type: object
      properties:
        modes:
          type: array
          items:
            type: object
            properties:
              server_value:
                type: string
                description: The server value for the mode.
                example: "Email"
              client_value:
                type: string
                description: The client value for the mode.
                example: "Email"
          example:
            - server_value: "Email"
              client_value: "Email"
            - server_value: "SMS"
              client_value: "SMS"
            - server_value: "Email_and_SMS"
              client_value: "Email and SMS"
        modules:
          type: array
          items:
            type: object
            properties:
              server_value:
                type: string
                description: The server value for the module.
                example: "Reports"
              client_value:
                type: string
                description: The client value for the module.
                example: "Reports"
          example:
            - server_value: "Reports"
              client_value: "Reports"
            - server_value: "Orchestration"
              client_value: "Orchestration"
        mail_severity:
          type: array
          items:
            type: object
            properties:
              server_value:
                type: string
                description: The server value for mail severity.
                example: "Low"
              client_value:
                type: string
                description: The client value for mail severity.
                example: "Low"
          example:
            - server_value: "Low"
              client_value: "Low"
            - server_value: "Medium"
              client_value: "Medium"
            - server_value: "High"
              client_value: "High"
        mail_rcpt_macros_list:
          type: object
          properties:
            orchestration:
              type: array
              items:
                type: object
                properties:
                  server_value:
                    type: string
                    description: The server value for the mail recipient macro.
                    example: "SELF"
                  client_value:
                    type: string
                    description: The client value for the mail recipient macro.
                    example: "Self"
                  macro_type:
                    type: string
                    description: The type of mail recipient macro.
                    example: "defaultType"
                  is_mandatory:
                    type: boolean
                    description: Indicates if the mail recipient macro is mandatory.
                    example: false
              example:
                - server_value: "SELF"
                  client_value: "Self"
                  macro_type: "defaultType"
                  is_mandatory: false
                - server_value: "Manager"
                  client_value: "Manager"
                  macro_type: "defaultType"
                  is_mandatory: false
            reports:
              type: array
              items:
                type: object
                properties:
                  server_value:
                    type: string
                    description: The server value for the mail recipient macro.
                    example: "SELF"
                  client_value:
                    type: string
                    description: The client value for the mail recipient macro.
                    example: "Self"
                  macro_type:
                    type: string
                    description: The type of mail recipient macro.
                    example: "defaultType"
                  is_mandatory:
                    type: boolean
                    description: Indicates if the mail recipient macro is mandatory.
                    example: false
        sms_rcpt_macros_list:
          type: object
          properties:
            orchestration:
              type: array
              items:
                type: object
                properties:
                  server_value:
                    type: string
                    description: The server value for the SMS recipient macro.
                    example: "SELF"
                  client_value:
                    type: string
                    description: The client value for the SMS recipient macro.
                    example: "Self"
                  macro_type:
                    type: string
                    description: The type of SMS recipient macro.
                    example: "defaultType"
                  is_mandatory:
                    type: boolean
                    description: Indicates if the SMS recipient macro is mandatory.
                    example: false
              example:
                - server_value: "SELF"
                  client_value: "Self"
                  macro_type: "defaultType"
                  is_mandatory: false
                - server_value: "Manager"
                  client_value: "Manager"
                  macro_type: "defaultType"
                  is_mandatory: false
            reports:
              type: array
              items:
                type: object
                properties:
                  server_value:
                    type: string
                    description: The server value for the SMS recipient macro.
                    example: "SELF"
                  client_value:
                    type: string
                    description: The client value for the SMS recipient macro.
                    example: "Self"
                  macro_type:
                    type: string
                    description: The type of SMS recipient macro.
                    example: "defaultType"
                  is_mandatory:
                    type: boolean
                    description: Indicates if the SMS recipient macro is mandatory.
                    example: false
        attachment_formats:
          type: array
          items:
            type: object
            properties:
              server_value:
                type: string
                description: The server value for the attachment format.
                example: "PDF"
              client_value:
                type: string
                description: The client value for the attachment format.
                example: "PDF"
        editor_options:
          type: array
          items:
            type: string
            description: The options available for the editor.
            example: "rtEditor"
          example:
            - "rtEditor"
            - "plainText"
        max_mail_content_size:
          type: integer
          description: The maximum size of the mail content in MB.
          example: 2
        max_sms_content_size:
          type: integer
          description: The maximum size of the SMS content in MB.
          example: 3
        max_template_name_size:
          type: integer
          description: The maximum size of the template name in characters.
          example: 4
        template_name_regex:
          type: string
          description: The regular expression for validating the template name.
          example: "^[a-zA-Z0-9_ ]{1,50}$"
        max_template_desc_size:
          type: integer
          description: The maximum size of the template description in characters.
          example: 7
        hide_add_remove_column:
          type: boolean
          description: Indicates if the add/remove column feature is hidden.
          example: true
        sorted_col_icon_only:
          type: boolean
          description: Indicates if the sorted column icon is displayed only.
          example: true
        max_to_cc_size:
          type: integer
          description: The maximum size of the To and CC fields in characters.
          example: 556
        max_sms_number_count:
          type: integer
          description: The maximum number of SMS numbers allowed.
          example: 45
    notificationTemplateModuleConfigs:
      type: object
      properties:
        file_upload_extension:
          type: string
          description: The file upload extensions allowed for the notification template.
          example: "7Z,ARJ,RAR"
        default_mail_content:
          type: string
          description: The default mail content for the notification template.
          example: "<div>Dear user, <br></div><div><br></div><div>Your requested report, %report_name%, having been generated on %date% is now ready for download.</div>"
        default_sms_content:
          type: string
          description: The default SMS content for the notification template.
          example: "sms content"
        content_macros:
          type: array
          items:
            type: object
            properties:
              server_value:
                type: string
                description: The server value for the content macro.
                example: "date"
              client_value:
                type: string
                description: The client value for the content macro.
                example: "idmpod.notification_template.macro.date"
              is_mandatory:
                type: boolean
                description: Indicates if the content macro is mandatory.
                example: false
        show_priority:
          type: boolean
          description: Indicates if the priority field is shown in the notification template.
          example: true
        default_mail_subject:
          type: string
          description: The default mail subject for the notification template.
          example: "Report Export Notification"
        show_mail_rcpt_macros_list:
          type: boolean
          description: Indicates if the mail recipient macros list is shown in the notification template.
          example: true
        show_sms_rcpt_macros_list:
          type: boolean
          description: Indicates if the SMS recipient macros list is shown in the notification template.
          example: true
        show_module_sms_content_macros:
          type: boolean
          description: Indicates if the module SMS content macros are shown in the notification template.
          example: true
        is_sms_content_disabled:
          type: boolean
          description: Indicates if the SMS content is disabled in the notification template.
          example: true
        is_html_wrap_needed:
          type: boolean
          description: Indicates if HTML wrapping is needed for the notification template.
          example: true
        html_wrap:
          type: string
          description: The HTML wrap for the notification template.
          example: "<div>{{body}}</div>"
        show_editor_modes:
          type: boolean
          description: Indicates if the editor modes are shown in the notification template.
          example: true

  securitySchemes:
    Zoho_Auth:
      type: oauth2
      x-authorization-example: 'Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f'
      flows:
        authorizationCode:
          authorizationUrl: 'https://accounts.zoho.com/oauth/v2/auth'
          tokenUrl: 'https://accounts.zoho.com/oauth/v2/token'
          scopes:
            idmpod.meta.read: 'Read Meta data from the account'