openapi: 3.0.0
info:
  title: Quick Enrollment Meta
  description: 'Meta APIs for Identity Protection Quick Enrollment'
  version: 1.0.0
servers:
  - url: 'https://id360.manageengine.com/api/v1'
    description: 'API Endpoint'
tags:
  - name: quick-enrollment-meta
    description: 'Quick Enrollment Meta APIs'
paths:
  #Quick Enrollment Meta APIs
  /meta/protection/quick-enrollment/bulk-csv-meta:
    get:
      tags:
        - quick-enrollment-meta
      summary: 'Get Quick Enrollment Bulk CSV Meta'
      description: 'The Get Quick Enrollment Bulk CSV Meta API can be used to get the metadata for the quick enrollment bulk CSV.'
      parameters:
        - $ref: '#/components/parameters/acceptHeader'
      responses:
        '200':
          description: 'OK'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/quickEnrollmentBulkCsvMeta'
        '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'
  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.'

    # Quick Enrollment Bulk CSV Meta
    quickEnrollmentBulkCsvMeta:
      type: object
      properties:
        auth_factor:
          type: object
          properties:
            import_via_csv:
              type: array
              items:
                type: object
                properties:
                  factor_config_id:
                    type: integer
                    description: The ID of the auth factor configuration.
                    example: 123123
                  factor_display_name:
                    type: string
                    description: The display name of the auth factor.
                    example: "Security Question & Answer"
                  is_configured:
                    type: boolean
                    description: Indicates if the auth factor is configured for quick enrollment.
                    example: true
              example:
                - factor_config_id: 2000000293042
                  factor_display_name: "Security Question & Answer"
                  is_configured: true
                - factor_config_id: 2000000293043
                  factor_display_name: "Email Authenticator"
                  is_configured: true
                - factor_config_id: 2000000293044
                  factor_display_name: "Microsoft Authenticator"
                  is_configured: true
            import_via_certificate:
              type: array
              items:
                type: object
                properties:
                  factor_config_id:
                    type: integer
                    description: The ID of the certificate auth factor configuration.
                    example: 768890
                  factor_display_name:
                    type: string
                    description: The display name of the certificate auth factor.
                    example: "Smartcard Authentication"
                  is_configured:
                    type: boolean
                    description: Indicates if the certificate auth factor is configured for quick enrollment.
                    example: true
              example:
                - factor_config_id: 2000000293045
                  factor_display_name: "Smartcard Authentication"
                  is_configured: true
        csv_file_encoding:
          type: array
          items:
            type: string
            description: The encoding formats supported for the CSV file.
            example: "UTF-8"
          example:
            - "Big5"
            - "EUC-JP"
            - "EUC-KR"
            - "GB2312"
            - "ISO-2022-JP"
            - "ISO-8859-1"
            - "KOI8-R"
            - "Shift_JIS"
            - "US-ASCII"
            - "UTF-8"
            - "WINDOWS-1251"
            - "X-WINDOWS-ISO2022JP"
        certificate_filename_pattern:
          type: array
          items:
            type: string
            description: The patterns for the certificate filename.
            example: "Primary Email"
          example:
            - "Primary Email"
            - "Employee ID"
            - "Mobile Number"

  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'