openapi: 3.0.0
info:
  title: Conditional Factor Config Meta
  description: 'Meta API for Identity Protection Conditional Factor Configurations'
  version: 1.0.0
servers:
  - url: 'https://id360.manageengine.com/api/v1'
    description: 'API Endpoint'
tags:
  - name: conditionalfactor-config-meta
    description: 'Conditional Factor Config Meta API'
paths:
  #Conditional Factor Config Meta API
  /meta/conditionalfactor-configs:
    get:
      tags:
        - conditionalfactor-config-meta
      summary: 'Get Conditional Factor Configs'
      description: 'The Get Conditional Factor Configs API can be used to get the metadata for conditional factor configurations.'
      parameters:
        - $ref: '#/components/parameters/acceptHeader'
      responses:
        '200':
          description: 'OK'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/conditionalFactorConfigMeta'
        '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
            - id360.conditional_access_policy.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.'

    # Conditional Factor Config Meta
    conditionalFactorConfigMeta:
      type: object
      properties:
        factor_types:
          type: array
          items:
            type: object
            properties:
              factor_type:
                type: string
                description: The type of the conditional factor.
                example: "ipaddress"
              display_name:
                type: string
                description: The display name of the conditional factor.
                example: "IP Sources"
              max_config_limit:
                type: integer
                description: The maximum number of configurations allowed for this factor type.
                example: 200
              timezone_values:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                      description: The name of the timezone.
                      example: "Asia/Kolkata"
                    display_name:
                      type: string
                      description: The display name of the timezone.
                      example: "(GMT+5:30) Asia/Kolkata"
              os_platform_values:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                      description: The name of the operating system platform.
                      example: "windows"
                    display_name:
                      type: string
                      description: The display name of the operating system platform.
                      example: "Windows"
            example:
              - factor_type: "ipaddress"
                display_name: "IP Sources"
                max_config_limit: 200
              - factor_type: "geolocation"
                display_name: "Geolocation"
                max_config_limit: 200
              - factor_type: "time"
                display_name: "Business Hours"
                max_config_limit: 200
                timezone_values:
                  - name: "Asia/Kolkata"
                    display_name: "(GMT+5:30) Asia/Kolkata"
                  - name: "Asia/Tokyo"
                    display_name: "(GMT+9:00) Asia/Tokyo"
                  - name: "Asia/Singapore"
                    display_name: "(GMT+8:00) Asia/Singapore"
                  - name: "America/New_York"
                    display_name: "(GMT-5:00) America/New_York"
                  - name: "Europe/London"
                    display_name: "(GMT+0:00) Europe/London"
                  - name: "Australia/Sydney"
                    display_name: "(GMT+10:00) Australia/Sydney"
              - factor_type: "osplatform"
                display_name: "Operating System"
                os_platform_values:
                  - name: "windows"
                    display_name: "Windows"
                  - name: "macos"
                    display_name: "macOS"
                  - name: "linux"
                    display_name: "Linux"
                  - name: "android"
                    display_name: "Android"
                  - name: "ios"
                    display_name: "iOS"
                  - name: "chromeos"
                    display_name: "ChromeOS"
  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'