openapi: 3.0.0
info:
  title: Conditional Access Policy Meta
  description: 'Meta APIs for Identity Protection Conditional Access Policy'
  version: 1.0.0
servers:
  - url: 'https://id360.manageengine.com/api/v1'
    description: 'API Endpoint'
tags:
  - name: conditional-access-policy-meta
    description: 'Conditional Access Policy Meta APIs'
paths:
  #Conditional Access Policy Meta API
  /meta/conditional-access-policies:
    get:
      tags:
        - conditional-access-policy-meta
      summary: 'Get Conditional Access Policies'
      description: 'The Get Conditional Access Policies API can be used to get the list of all conditional access policies.'
      parameters:
        - $ref: '#/components/parameters/acceptHeader'
      responses:
        '200':
          description: 'OK'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/conditionalAccessPolicyMeta'
        '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'
    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.'

    # Conditional Access Policy Meta
    conditionalAccessPolicyMeta:
      type: object
      properties:
        max_policies_limit_per_org:
          type: integer
          description: The maximum number of conditional access policies allowed per organization.
          example: 200
        max_users_limit_per_policy:
          type: integer
          description: The maximum number of users allowed per conditional access policy.
          example: 100
        max_groups_limit_per_policy:
          type: integer
          description: The maximum number of groups allowed per conditional access policy.
          example: 100
        endpoint_settings:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                description: The name of the endpoint.
                example: "ComputerDevices"
              display_name:
                type: string
                description: The display name of the endpoint.
                example: "Computer Devices"
              display_order:
                type: integer
                description: The display order of the endpoint.
                example: 100
              modules:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                      description: The name of the module.
                      example: "ComputerDevices"
                    is_passwordless_supported:
                      type: boolean
                      description: Indicates if passwordless authentication is supported for this module.
                      example: true
                    max_devices_assignment_limit:
                      type: integer
                      description: The maximum number of devices that can be assigned to this module.
                      example: 100
                    max_device_groups_assignment_limit:
                      type: integer
                      description: The maximum number of device groups that can be assigned to this module.
                      example: 100
                    action_details:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                            description: The name of the action.
                            example: "InteractiveLogon"
                          display_name:
                            type: string
                            description: The display name of the action.
                            example: "Interactive Login"
                          supported_os_platforms:
                            type: array
                            items:
                              type: string
                              description: The operating systems that support this action.
                              example: "windows"
                            example:
                              - "windows"
                              - "macos"
                              - "linux"
                      example:
                        - name: "InteractiveLogon"
                          display_name: "Interactive Login"
                          supported_os_platforms:
                            - "windows"
                            - "macos"
                            - "linux"
                        - name: "InteractiveUnlock"
                          display_name: "Interactive Unlock"
                          supported_os_platforms:
                            - "windows"
                            - "macos"
                            - "linux"
                        - name: "RDPServer"
                          display_name: "RDP Server"
                          supported_os_platforms:
                            - "windows"
                        - name: "UAC"
                          display_name: "User Account Control"
                          supported_os_platforms:
                            - "windows"
                            - "macos"
                        - name: "SSHServer"
                          display_name: "SSH Server"
                          supported_os_platforms:
                            - "macos"
                            - "linux"
                        - name: "CLIElevations"
                          display_name: "CLI Elevations"
                          supported_os_platforms:
                            - "macos"
                            - "linux"
                    authn_modes:
                      type: object
                      properties:
                        native:
                          type: object
                          properties:
                            unsupported_authnfactors:
                              type: array
                              items:
                                type: string
                                description: List of unsupported authnFactors for native authentication.
                                example: "FIDOAuthenticator"
                              example:
                                - "FIDOAuthenticator"
                                - "DUOAuthenticator"
                                - "SAMLAuthenticator"
                                - "SQAAuthenticator"
                                - "SmartCardAuthenticator"
                        securelink:
                          type: object
                          properties:
                            notification_template_module:
                              type: string
                              description: The module for the notification template.
                              example: "MFA"
                            notification_template_submodule:
                              type: string
                              description: The submodule for the notification template.
                              example: "VPNMFA_SecureLink"
        advanced_settings:
          type: object
          properties:
            captcha_failure_attempts_values:
              type: array
              items:
                type: integer
                description: The number of failure attempts before CAPTCHA is triggered.
                example: 3
              example: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
            idle_timeout_values:
              type: array
              items:
                type: integer
                description: The idle timeout values in minutes.
                example: 5
              example: [1, 2, 3, 4, 5]
            otp_notification_template_module:
              type: string
              description: The module for OTP notification templates.
              example: "MFA"
            otp_notification_template_submodule:
              type: string
              description: The submodule for OTP notification templates.
              example: "Verification_OTP"
            endpoint_module_specific_settings:
              type: object
              properties:
                NPS_VPN:
                  type: object
                  properties:
                    radius_attributes_details:
                      type: object
                      properties:
                        types:
                          type: array
                          items:
                            type: string
                            description: The types of RADIUS attributes.
                            example: "standard"
                          example:
                            - "standard"
                            - "vendor"
                        data_types:
                          type: array
                          items:
                            type: string
                            description: The data types of RADIUS attributes.
                            example: "string"
                          example:
                            - "string"
                            - "integer"
                            - "enum"
                            - "ipv4address"
                            - "ipv6address"
                        standard_attibutes:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                                description: The name of the standard RADIUS attribute.
                                example: "User-Name"
                              display_name:
                                type: string
                                description: The display name of the standard RADIUS attribute.
                                example: "User Name"
                          example:
                            - name: "User-Name"
                              display_name: "User Name"
                            - name: "NAS-IP-Address"
                              display_name: "NAS IP Address"
                            - name: "NAS-Port"
                              display_name: "NAS Port"
                            - name: "Framed-IP-Address"
                              display_name: "Framed IP Address"
                            - name: "Calling-Station-ID"
                              display_name: "Calling Station ID"

  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'