# onelogin
OpenAPI Specification for OneLogin

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 3.1.1
- Package version: 3.1.6
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://support.onelogin.com](https://support.onelogin.com)

## Requirements.

Python &gt;&#x3D;3.7

## Migration from other generators like python and python-legacy

### Changes
1. This generator uses spec case for all (object) property names and parameter names.
    - So if the spec has a property name like camelCase, it will use camelCase rather than camel_case
    - So you will need to update how you input and read properties to use spec case
2. Endpoint parameters are stored in dictionaries to prevent collisions (explanation below)
    - So you will need to update how you pass data in to endpoints
3. Endpoint responses now include the original response, the deserialized response body, and (todo)the deserialized headers
    - So you will need to update your code to use response.body to access deserialized data
4. All validated data is instantiated in an instance that subclasses all validated Schema classes and Decimal/str/list/tuple/frozendict/NoneClass/BoolClass/bytes/io.FileIO
    - This means that you can use isinstance to check if a payload validated against a schema class
    - This means that no data will be of type None/True/False
        - ingested None will subclass NoneClass
        - ingested True will subclass BoolClass
        - ingested False will subclass BoolClass
        - So if you need to check is True/False/None, instead use instance.is_true_oapg()/.is_false_oapg()/.is_none_oapg()
5. All validated class instances are immutable except for ones based on io.File
    - This is because if properties were changed after validation, that validation would no longer apply
    - So no changing values or property values after a class has been instantiated
6. String + Number types with formats
    - String type data is stored as a string and if you need to access types based on its format like date,
    date-time, uuid, number etc then you will need to use accessor functions on the instance
    - type string + format: See .as_date_oapg, .as_datetime_oapg, .as_decimal_oapg, .as_uuid_oapg
    - type number + format: See .as_float_oapg, .as_int_oapg
    - this was done because openapi/json-schema defines constraints. string data may be type string with no format
    keyword in one schema, and include a format constraint in another schema
    - So if you need to access a string format based type, use as_date_oapg/as_datetime_oapg/as_decimal_oapg/as_uuid_oapg
    - So if you need to access a number format based type, use as_int_oapg/as_float_oapg
7. Property access on AnyType(type unset) or object(dict) schemas
    - Only required keys with valid python names are properties like .someProp and have type hints
    - All optional keys may not exist, so properties are not defined for them
    - One can access optional values with dict_instance['optionalProp'] and KeyError will be raised if it does not exist
    - Use get_item_oapg if you need a way to always get a value whether or not the key exists
        - If the key does not exist, schemas.unset is returned from calling dict_instance.get_item_oapg('optionalProp')
        - All required and optional keys have type hints for this method, and @typing.overload is used
        - A type hint is also generated for additionalProperties accessed using this method
    - So you will need to update you code to use some_instance['optionalProp'] to access optional property
    and additionalProperty values
8. The location of the api classes has changed
    - Api classes are located in your_package.apis.tags.some_api
    - This change was made to eliminate redundant code generation
    - Legacy generators generated the same endpoint twice if it had > 1 tag on it
    - This generator defines an endpoint in one class, then inherits that class to generate
      apis by tags and by paths
    - This change reduces code and allows quicker run time if you use the path apis
        - path apis are at your_package.apis.paths.some_path
    - Those apis will only load their needed models, which is less to load than all of the resources needed in a tag api
    - So you will need to update your import paths to the api classes

### Why are Oapg and _oapg used in class and method names?
Classes can have arbitrarily named properties set on them
Endpoints can have arbitrary operationId method names set
For those reasons, I use the prefix Oapg and _oapg to greatly reduce the likelihood of collisions
on protected + public classes/methods.
oapg stands for OpenApi Python Generator.

### Object property spec case
This was done because when payloads are ingested, they can be validated against N number of schemas.
If the input signature used a different property name then that has mutated the payload.
So SchemaA and SchemaB must both see the camelCase spec named variable.
Also it is possible to send in two properties, named camelCase and camel_case in the same payload.
That use case should be support so spec case is used.

### Parameter spec case
Parameters can be included in different locations including:
- query
- path
- header
- cookie

Any of those parameters could use the same parameter names, so if every parameter
was included as an endpoint parameter in a function signature, they would collide.
For that reason, each of those inputs have been separated out into separate typed dictionaries:
- query_params
- path_params
- header_params
- cookie_params

So when updating your code, you will need to pass endpoint parameters in using those
dictionaries.

### Endpoint responses
Endpoint responses have been enriched to now include more information.
Any response reom an endpoint will now include the following properties:
response: urllib3.HTTPResponse
body: typing.Union[Unset, Schema]
headers: typing.Union[Unset, TODO]
Note: response header deserialization has not yet been added


## Installation & Usage
### pip install

If the python package is hosted on a repository, you can install directly using:

```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)

Then import the package:
```python
import onelogin
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import onelogin
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import time
import onelogin
from pprint import pprint
from onelogin.apis.tags import api_auth_claims_api
from onelogin.model.alt_err import AltErr
from onelogin.model.auth_claim import AuthClaim
from onelogin.model.auth_id import AuthId
from onelogin.model.token_claim import TokenClaim
# Defining the host is optional and defaults to https://your-api-subdomain.onelogin.com
# See configuration.py for a list of all supported configuration parameters.
configuration = onelogin.Configuration(
    host = "https://your-api-subdomain.onelogin.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure OAuth2 access token for authorization: OAuth2
configuration = onelogin.Configuration(
    host = "https://your-api-subdomain.onelogin.com",
    access_token = 'YOUR_ACCESS_TOKEN'
)

# Enter a context with an instance of the API client
with onelogin.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = api_auth_claims_api.APIAuthClaimsApi(api_client)
    api_auth_id = "api_auth_id_example" # str | 
content_type = "application/json" # str |  (optional) (default to CodegenParameter{isFormParam=false, isQueryParam=false, isPathParam=false, isHeaderParam=true, isCookieParam=false, isBodyParam=false, isContainer=false, isCollectionFormatMulti=false, isPrimitiveType=true, isModel=false, isExplode=false, baseName='Content-Type', paramName='content_type', dataType='str', datatypeWithEnum='null', dataFormat='null', collectionFormat='null', description='null', unescapedDescription='null', baseType='null', defaultValue='"application/json"', enumDefaultValue='null', enumName='null', style='SIMPLE', deepObject='false', allowEmptyValue='false', example='"application/json"', jsonSchema='{
  "name" : "Content-Type",
  "in" : "header",
  "required" : false,
  "style" : "simple",
  "explode" : false,
  "schema" : {
    "type" : "string",
    "default" : "application/json"
  },
  "example" : "application/json"
}', isString=true, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isAnyType=false, isArray=false, isMap=false, isFile=false, isEnum=false, isEnumRef=false, _enum=null, allowableValues=null, items=null, mostInnerItems=null, additionalProperties=null, vars=[], requiredVars=[], vendorExtensions={}, hasValidation=false, maxProperties=null, minProperties=null, isNullable=false, isDeprecated=false, required=false, maximum='null', exclusiveMaximum=false, minimum='null', exclusiveMinimum=false, maxLength=null, minLength=null, pattern='null', maxItems=null, minItems=null, uniqueItems=false, uniqueItemsBoolean=null, contentType=null, multipleOf=null, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, schema=CodegenProperty{openApiType='string', baseName='ContentTypeSchema', complexType='null', getter='getContentType', setter='setContentType', description='null', dataType='str', datatypeWithEnum='str', dataFormat='null', name='content_type', min='null', max='null', defaultValue='"application/json"', defaultValueWithParam=' = data.Content-Type;', baseType='str', containerType='null', title='null', unescapedDescription='null', maxLength=null, minLength=null, pattern='null', example='"application/json"', jsonSchema='{
  "type" : "string",
  "default" : "application/json"
}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=true, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isPassword=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, isNew=false, isOverridden=null, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='ContentType', nameInSnakeCase='null', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, isVoid=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=null, dependentRequired=null, contains=null}, content=null, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false})
auth_claim = AuthClaim(
        name="email_address",
        user_attribute_mappings="email",
        user_attribute_macros="user_attribute_macros_example",
    ) # AuthClaim |  (optional)

    try:
        # Create Api Auth Server Claim
        api_response = api_instance.create_auth_claim(api_auth_idcontent_type=content_typeauth_claim=auth_claim)
        pprint(api_response)
    except onelogin.ApiException as e:
        print("Exception when calling APIAuthClaimsApi->create_auth_claim: %s\n" % e)
```

## Documentation for API Endpoints

All URIs are relative to *https://your-api-subdomain.onelogin.com*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*APIAuthClaimsApi* | [**create_auth_claim**](docs/apis/tags/APIAuthClaimsApi.md#create_auth_claim) | **post** /api/2/api_authorizations/{api_auth_id}/claims | Create Api Auth Server Claim
*APIAuthClaimsApi* | [**delete_auth_claim**](docs/apis/tags/APIAuthClaimsApi.md#delete_auth_claim) | **delete** /api/2/api_authorizations/{api_auth_id}/claims/{claim_id} | Delete Api Auth Server Claim
*APIAuthClaimsApi* | [**get_authclaims**](docs/apis/tags/APIAuthClaimsApi.md#get_authclaims) | **get** /api/2/api_authorizations/{api_auth_id}/claims | Get Api Auth Server claims
*APIAuthClaimsApi* | [**update_claim**](docs/apis/tags/APIAuthClaimsApi.md#update_claim) | **put** /api/2/api_authorizations/{api_auth_id}/claims/{claim_id} | Update Api Auth Server Claim
*APIAuthClientAppsApi* | [**add_client_app**](docs/apis/tags/APIAuthClientAppsApi.md#add_client_app) | **post** /api/2/api_authorizations/{api_auth_id}/clients | Add Client App
*APIAuthClientAppsApi* | [**delete_client_app**](docs/apis/tags/APIAuthClientAppsApi.md#delete_client_app) | **delete** /api/2/api_authorizations/{api_auth_id}/clients/{client_app_id} | Remove Client App
*APIAuthClientAppsApi* | [**list_client_apps**](docs/apis/tags/APIAuthClientAppsApi.md#list_client_apps) | **get** /api/2/api_authorizations/{api_auth_id}/clients | List Clients Apps
*APIAuthClientAppsApi* | [**update_client_app**](docs/apis/tags/APIAuthClientAppsApi.md#update_client_app) | **put** /api/2/api_authorizations/{api_auth_id}/clients/{client_app_id} | Update Client App
*APIAuthScopesApi* | [**create_scope**](docs/apis/tags/APIAuthScopesApi.md#create_scope) | **post** /api/2/api_authorizations/{api_auth_id}/scopes | Create Api Auth Server Scope
*APIAuthScopesApi* | [**delete_scope**](docs/apis/tags/APIAuthScopesApi.md#delete_scope) | **delete** /api/2/api_authorizations/{api_auth_id}/scopes/{scope_id} | Delete Api Auth Server Scope
*APIAuthScopesApi* | [**get_scopes**](docs/apis/tags/APIAuthScopesApi.md#get_scopes) | **get** /api/2/api_authorizations/{api_auth_id}/scopes | Get Api Auth Server Scopes
*APIAuthScopesApi* | [**update_scope**](docs/apis/tags/APIAuthScopesApi.md#update_scope) | **put** /api/2/api_authorizations/{api_auth_id}/scopes/{scope_id} | Update Api Auth Server Scope
*APIAuthorizationServerApi* | [**create_auth_server**](docs/apis/tags/APIAuthorizationServerApi.md#create_auth_server) | **post** /api/2/api_authorizations | Create Api Auth Server
*APIAuthorizationServerApi* | [**delete_auth_server**](docs/apis/tags/APIAuthorizationServerApi.md#delete_auth_server) | **delete** /api/2/api_authorizations/{api_auth_id} | Delete Api Auth Server
*APIAuthorizationServerApi* | [**get_auth_server**](docs/apis/tags/APIAuthorizationServerApi.md#get_auth_server) | **get** /api/2/api_authorizations/{api_auth_id} | Get Api Auth Server
*APIAuthorizationServerApi* | [**list_auth_servers**](docs/apis/tags/APIAuthorizationServerApi.md#list_auth_servers) | **get** /api/2/api_authorizations | List Api Auth Servers
*APIAuthorizationServerApi* | [**update_auth_server**](docs/apis/tags/APIAuthorizationServerApi.md#update_auth_server) | **put** /api/2/api_authorizations/{api_auth_id} | Update Api Auth Server
*AppRulesApi* | [**create_app_rule**](docs/apis/tags/AppRulesApi.md#create_app_rule) | **post** /api/2/apps/{app_id}/rules | 
*AppRulesApi* | [**delete_rule**](docs/apis/tags/AppRulesApi.md#delete_rule) | **delete** /api/2/apps/{app_id}/rules/{rule_id} | Delete Rule
*AppRulesApi* | [**get_app_rule**](docs/apis/tags/AppRulesApi.md#get_app_rule) | **get** /api/2/apps/{app_id}/rules/{rule_id} | Get Rule
*AppRulesApi* | [**list_action_valies**](docs/apis/tags/AppRulesApi.md#list_action_valies) | **get** /api/2/apps/{app_id}/rules/actions/{rule_action_value}/values | List Actions Values
*AppRulesApi* | [**list_actions**](docs/apis/tags/AppRulesApi.md#list_actions) | **get** /api/2/apps/{app_id}/rules/actions | List Actions
*AppRulesApi* | [**list_app_rules**](docs/apis/tags/AppRulesApi.md#list_app_rules) | **get** /api/2/apps/{app_id}/rules | List Rules
*AppRulesApi* | [**list_condition_operators**](docs/apis/tags/AppRulesApi.md#list_condition_operators) | **get** /api/2/apps/{app_id}/rules/conditions/{rule_condition_value}/operators | List Conditions Operators
*AppRulesApi* | [**list_condition_values**](docs/apis/tags/AppRulesApi.md#list_condition_values) | **get** /api/2/apps/{app_id}/rules/conditions/{rule_condition_value}/values | List Conditions Values
*AppRulesApi* | [**list_conditions**](docs/apis/tags/AppRulesApi.md#list_conditions) | **get** /api/2/apps/{app_id}/rules/conditions | List Conditions
*AppRulesApi* | [**sort_app_rules**](docs/apis/tags/AppRulesApi.md#sort_app_rules) | **put** /api/2/apps/{app_id}/rules/sort | Bulk Sort
*AppRulesApi* | [**update_app_rule**](docs/apis/tags/AppRulesApi.md#update_app_rule) | **put** /api/2/apps/{app_id}/rules/{rule_id} | Update Rule
*AppsApi* | [**create_app**](docs/apis/tags/AppsApi.md#create_app) | **post** /api/2/apps | Create App
*AppsApi* | [**delete_app**](docs/apis/tags/AppsApi.md#delete_app) | **delete** /api/2/apps/{app_id} | Delete App
*AppsApi* | [**delete_app_parameter**](docs/apis/tags/AppsApi.md#delete_app_parameter) | **delete** /api/2/apps/{app_id}/parameters/{parameter_id} | Delete Parameter from App
*AppsApi* | [**get_app**](docs/apis/tags/AppsApi.md#get_app) | **get** /api/2/apps/{app_id} | Get App
*AppsApi* | [**get_app_users**](docs/apis/tags/AppsApi.md#get_app_users) | **get** /api/2/apps/{app_id}/users | Get App Users
*AppsApi* | [**list_apps**](docs/apis/tags/AppsApi.md#list_apps) | **get** /api/2/apps | List Apps
*AppsApi* | [**list_connectors**](docs/apis/tags/AppsApi.md#list_connectors) | **get** /api/2/connectors | List Connectors
*AppsApi* | [**update_app**](docs/apis/tags/AppsApi.md#update_app) | **put** /api/2/apps/{app_id} | Update App
*BrandingServiceApi* | [**create_brand**](docs/apis/tags/BrandingServiceApi.md#create_brand) | **post** /api/2/branding/brands | Create Brand
*BrandingServiceApi* | [**delete_brand**](docs/apis/tags/BrandingServiceApi.md#delete_brand) | **delete** /api/2/branding/brands/{brand_id} | Delete Brand
*BrandingServiceApi* | [**get_brand**](docs/apis/tags/BrandingServiceApi.md#get_brand) | **get** /api/2/branding/brands/{brand_id} | Get Brand
*BrandingServiceApi* | [**get_brand_apps**](docs/apis/tags/BrandingServiceApi.md#get_brand_apps) | **get** /api/2/branding/brands/{brand_id}/apps | Get Brand Apps
*BrandingServiceApi* | [**list_brands**](docs/apis/tags/BrandingServiceApi.md#list_brands) | **get** /api/2/branding/brands | List Account Brands
*BrandingServiceApi* | [**update_brand**](docs/apis/tags/BrandingServiceApi.md#update_brand) | **put** /api/2/branding/brands/{brand_id} | Update Brand
*BrandingServiceSMTPApi* | [**delete_email_settings**](docs/apis/tags/BrandingServiceSMTPApi.md#delete_email_settings) | **delete** /api/2/branding/email_settings | Delete Custom Email Settings
*BrandingServiceSMTPApi* | [**get_email_settings**](docs/apis/tags/BrandingServiceSMTPApi.md#get_email_settings) | **get** /api/2/branding/email_settings | Get Email Settings
*BrandingServiceSMTPApi* | [**update_email_settings**](docs/apis/tags/BrandingServiceSMTPApi.md#update_email_settings) | **put** /api/2/branding/email_settings | Update Email Settings
*BrandingServiceTemplatesApi* | [**create_message_template**](docs/apis/tags/BrandingServiceTemplatesApi.md#create_message_template) | **post** /api/2/branding/brands/{brand_id}/templates | Create Message Template
*BrandingServiceTemplatesApi* | [**delete_message_template**](docs/apis/tags/BrandingServiceTemplatesApi.md#delete_message_template) | **delete** /api/2/branding/brands/{brand_id}/templates/{template_id} | Delete Message Template
*BrandingServiceTemplatesApi* | [**get_master_by_type**](docs/apis/tags/BrandingServiceTemplatesApi.md#get_master_by_type) | **get** /api/2/branding/brands/master/templates/{template_type} | Get Master Template by Type
*BrandingServiceTemplatesApi* | [**get_message_template_by_id**](docs/apis/tags/BrandingServiceTemplatesApi.md#get_message_template_by_id) | **get** /api/2/branding/brands/{brand_id}/templates/{template_id} | Get Message Template
*BrandingServiceTemplatesApi* | [**get_template_by_locale**](docs/apis/tags/BrandingServiceTemplatesApi.md#get_template_by_locale) | **get** /api/2/branding/brands/{brand_id}/templates/{template_type}/{locale} | Get Template by Type &amp; Locale
*BrandingServiceTemplatesApi* | [**list_message_templates**](docs/apis/tags/BrandingServiceTemplatesApi.md#list_message_templates) | **get** /api/2/branding/brands/{brand_id}/templates | List Message Templates
*BrandingServiceTemplatesApi* | [**update_message_template_by_id**](docs/apis/tags/BrandingServiceTemplatesApi.md#update_message_template_by_id) | **put** /api/2/branding/brands/{brand_id}/templates/{template_id} | Update Message Template
*BrandingServiceTemplatesApi* | [**update_template_by_locale**](docs/apis/tags/BrandingServiceTemplatesApi.md#update_template_by_locale) | **put** /api/2/branding/brands/{brand_id}/templates/{template_type}/{locale} | Update Template by Type &amp; Locale
*EventsApi* | [**get_event_by_id**](docs/apis/tags/EventsApi.md#get_event_by_id) | **get** /api/1/events/{event_id} | Get Event by ID
*EventsApi* | [**get_event_types**](docs/apis/tags/EventsApi.md#get_event_types) | **get** /api/1/events/types | Get Event Types
*EventsApi* | [**get_events**](docs/apis/tags/EventsApi.md#get_events) | **get** /api/1/events | Get Events
*GroupsApi* | [**get_group_by_id**](docs/apis/tags/GroupsApi.md#get_group_by_id) | **get** /api/1/groups/{group_id} | Get Group by ID
*GroupsApi* | [**get_groups**](docs/apis/tags/GroupsApi.md#get_groups) | **get** /api/1/groups | Get Groups
*InviteLinksApi* | [**get_invite_link**](docs/apis/tags/InviteLinksApi.md#get_invite_link) | **post** /api/1/invites/get_invite_link | Generate Invite Link
*InviteLinksApi* | [**send_invite_link**](docs/apis/tags/InviteLinksApi.md#send_invite_link) | **post** /api/1/invites/send_invite_link | Send  Invite Link
*MultiFactorAuthenticationApi* | [**create_device_verification**](docs/apis/tags/MultiFactorAuthenticationApi.md#create_device_verification) | **post** /api/2/mfa/users/{user_id}/verifications | Create Device Verification
*MultiFactorAuthenticationApi* | [**create_factor_registration**](docs/apis/tags/MultiFactorAuthenticationApi.md#create_factor_registration) | **post** /api/2/mfa/users/{user_id}/registrations | Create Factor Registration
*MultiFactorAuthenticationApi* | [**delete_enrolled_factor**](docs/apis/tags/MultiFactorAuthenticationApi.md#delete_enrolled_factor) | **delete** /api/2/mfa/users/{user_id}/devices/{device_id} | Delete Enrolled Factor
*MultiFactorAuthenticationApi* | [**generate_otp**](docs/apis/tags/MultiFactorAuthenticationApi.md#generate_otp) | **post** /api/2/mfa/users/{user_id}/mfa_token | Generate MFA token
*MultiFactorAuthenticationApi* | [**get_auth_factors**](docs/apis/tags/MultiFactorAuthenticationApi.md#get_auth_factors) | **get** /api/2/mfa/users/{user_id}/factors | Get User Factors
*MultiFactorAuthenticationApi* | [**get_authentication_devices**](docs/apis/tags/MultiFactorAuthenticationApi.md#get_authentication_devices) | **get** /api/2/mfa/users/{user_id}/devices | Get User Devices
*MultiFactorAuthenticationApi* | [**get_user_registration**](docs/apis/tags/MultiFactorAuthenticationApi.md#get_user_registration) | **get** /api/2/mfa/users/{user_id}/registrations/{registration_id} | Get User Registration
*MultiFactorAuthenticationApi* | [**get_user_verification**](docs/apis/tags/MultiFactorAuthenticationApi.md#get_user_verification) | **get** /api/2/mfa/users/{user_id}/verifications/{verification_id} | Get User Verification
*MultiFactorAuthenticationApi* | [**verify_user_registration**](docs/apis/tags/MultiFactorAuthenticationApi.md#verify_user_registration) | **put** /api/2/mfa/users/{user_id}/registrations/{registration_id} | Verify User Registration
*MultiFactorAuthenticationApi* | [**verify_user_verification**](docs/apis/tags/MultiFactorAuthenticationApi.md#verify_user_verification) | **put** /api/2/mfa/users/{user_id}/verifications/{verification_id} | Verify User Verification
*MultiFactorAuthenticationV1Api* | [**activate_mfa_factors**](docs/apis/tags/MultiFactorAuthenticationV1Api.md#activate_mfa_factors) | **post** /api/1/users/{user_id}/otp_devices/{device_id}/trigger | Activate a Factor
*MultiFactorAuthenticationV1Api* | [**enroll_mfa_factor**](docs/apis/tags/MultiFactorAuthenticationV1Api.md#enroll_mfa_factor) | **post** /api/1/users/{user_id}/otp_devices | Enroll a Factor
*MultiFactorAuthenticationV1Api* | [**generate_mf_atoken**](docs/apis/tags/MultiFactorAuthenticationV1Api.md#generate_mf_atoken) | **post** /api/1/users/{user_id}/mfa_token | Generate Temp MFA Token
*MultiFactorAuthenticationV1Api* | [**get_enrolled_factors**](docs/apis/tags/MultiFactorAuthenticationV1Api.md#get_enrolled_factors) | **get** /api/1/users/{user_id}/otp_devices | Get Enrolled Factors
*MultiFactorAuthenticationV1Api* | [**get_mfa_factors**](docs/apis/tags/MultiFactorAuthenticationV1Api.md#get_mfa_factors) | **get** /api/1/users/{user_id}/auth_factor | Get Available Factors
*MultiFactorAuthenticationV1Api* | [**remove_mfa_factors**](docs/apis/tags/MultiFactorAuthenticationV1Api.md#remove_mfa_factors) | **delete** /api/1/users/{user_id}/otp_devices/{device_id} | Remove an Enrolled Factor
*MultiFactorAuthenticationV1Api* | [**verify_mfa_factor**](docs/apis/tags/MultiFactorAuthenticationV1Api.md#verify_mfa_factor) | **post** /api/1/users/{user_id}/otp_devices/{device_id}/verify | Verify a Factor
*OAuth2Api* | [**generate_token**](docs/apis/tags/OAuth2Api.md#generate_token) | **post** /auth/oauth2/v2/token | Generate Token
*OAuth2Api* | [**get_rate_limit**](docs/apis/tags/OAuth2Api.md#get_rate_limit) | **get** /auth/rate_limit | Get Rate Limit
*OAuth2Api* | [**revoke_tokens**](docs/apis/tags/OAuth2Api.md#revoke_tokens) | **post** /auth/oauth2/revoke | Revoke Tokens
*PrivilegesApi* | [**add_privilege_to_role**](docs/apis/tags/PrivilegesApi.md#add_privilege_to_role) | **post** /api/1/privileges/{privilege_id}/roles | Assign a Privilege to Roles
*PrivilegesApi* | [**assign_users_to_privilege**](docs/apis/tags/PrivilegesApi.md#assign_users_to_privilege) | **post** /api/1/privileges/{privilege_id}/users | Assign Users to a Privilege
*PrivilegesApi* | [**create_privilege**](docs/apis/tags/PrivilegesApi.md#create_privilege) | **post** /api/1/privileges | Create a Privilege
*PrivilegesApi* | [**delete_privilege**](docs/apis/tags/PrivilegesApi.md#delete_privilege) | **delete** /api/1/privileges/{privilege_id} | Delete a Privilege
*PrivilegesApi* | [**delete_role_from_privilege**](docs/apis/tags/PrivilegesApi.md#delete_role_from_privilege) | **delete** /api/1/privileges/{privilege_id}/roles/{role_id} | Remove a Privilege from a Role
*PrivilegesApi* | [**get_assigned_user**](docs/apis/tags/PrivilegesApi.md#get_assigned_user) | **get** /api/1/privileges/{privilege_id}/users | Get Users assigned to a Privilege
*PrivilegesApi* | [**get_privilege**](docs/apis/tags/PrivilegesApi.md#get_privilege) | **get** /api/1/privileges/{privilege_id} | Get a Privilege
*PrivilegesApi* | [**list_privilege_roles**](docs/apis/tags/PrivilegesApi.md#list_privilege_roles) | **get** /api/1/privileges/{privilege_id}/roles | Get Roles assigned to Privilege
*PrivilegesApi* | [**list_privileges**](docs/apis/tags/PrivilegesApi.md#list_privileges) | **get** /api/1/privileges | List Privileges
*PrivilegesApi* | [**remove_user_from_privilege**](docs/apis/tags/PrivilegesApi.md#remove_user_from_privilege) | **delete** /api/1/privileges/{privilege_id}/users/{user_id} | Remove a Privilege from Users
*PrivilegesApi* | [**update_privilege**](docs/apis/tags/PrivilegesApi.md#update_privilege) | **put** /api/1/privileges/{privilege_id} | Update a Privilege
*RolesApi* | [**add_role_admins**](docs/apis/tags/RolesApi.md#add_role_admins) | **post** /api/2/roles/{role_id}/admins | Add Role Admins
*RolesApi* | [**add_role_users**](docs/apis/tags/RolesApi.md#add_role_users) | **post** /api/2/roles/{role_id}/users | Add Role Users
*RolesApi* | [**create_role**](docs/apis/tags/RolesApi.md#create_role) | **post** /api/2/roles | Create Role
*RolesApi* | [**delete_role**](docs/apis/tags/RolesApi.md#delete_role) | **delete** /api/2/roles/{role_id} | Delete Role by ID
*RolesApi* | [**get_role**](docs/apis/tags/RolesApi.md#get_role) | **get** /api/2/roles/{role_id} | Get Role by ID
*RolesApi* | [**get_role_admins**](docs/apis/tags/RolesApi.md#get_role_admins) | **get** /api/2/roles/{role_id}/admins | Get Role Admins
*RolesApi* | [**get_role_apps**](docs/apis/tags/RolesApi.md#get_role_apps) | **get** /api/2/roles/{role_id}/apps | Get all Apps assigned to Role
*RolesApi* | [**get_role_by_id**](docs/apis/tags/RolesApi.md#get_role_by_id) | **get** /api/1/roles/{role_id} | Get Role by ID
*RolesApi* | [**get_role_by_name**](docs/apis/tags/RolesApi.md#get_role_by_name) | **get** /api/1/roles | Get Role by Name
*RolesApi* | [**get_role_users**](docs/apis/tags/RolesApi.md#get_role_users) | **get** /api/2/roles/{role_id}/users | Get Role Users
*RolesApi* | [**list_roles**](docs/apis/tags/RolesApi.md#list_roles) | **get** /api/2/roles | List Roles
*RolesApi* | [**remove_role_admins**](docs/apis/tags/RolesApi.md#remove_role_admins) | **delete** /api/2/roles/{role_id}/admins | Remove Role Admins
*RolesApi* | [**remove_role_users**](docs/apis/tags/RolesApi.md#remove_role_users) | **delete** /api/2/roles/{role_id}/users | Remove Role Users
*RolesApi* | [**set_role_apps**](docs/apis/tags/RolesApi.md#set_role_apps) | **put** /api/2/roles/{role_id}/apps | Set Role Apps
*RolesApi* | [**update_role**](docs/apis/tags/RolesApi.md#update_role) | **put** /api/2/roles/{role_id} | Update Role
*SAMLAssertionsApi* | [**generate_saml_assert**](docs/apis/tags/SAMLAssertionsApi.md#generate_saml_assert) | **post** /api/1/saml_assertion | Generate SAML Assertion
*SAMLAssertionsApi* | [**generate_saml_assert2**](docs/apis/tags/SAMLAssertionsApi.md#generate_saml_assert2) | **post** /api/2/saml_assertion | Generate SAML Assertion
*SAMLAssertionsApi* | [**ver_factor_saml**](docs/apis/tags/SAMLAssertionsApi.md#ver_factor_saml) | **post** /api/1/saml_assertion/verify_factor | Verify Factor SAML
*SAMLAssertionsApi* | [**ver_factor_saml2**](docs/apis/tags/SAMLAssertionsApi.md#ver_factor_saml2) | **post** /api/2/saml_assertion/verify_factor | Verify Factor SAML
*SmartHooksApi* | [**create_environment_variable**](docs/apis/tags/SmartHooksApi.md#create_environment_variable) | **post** /api/2/hooks/envs | Create Environment Variable
*SmartHooksApi* | [**create_hook**](docs/apis/tags/SmartHooksApi.md#create_hook) | **post** /api/2/hooks | Create Smart Hook
*SmartHooksApi* | [**delete_environment_variable**](docs/apis/tags/SmartHooksApi.md#delete_environment_variable) | **delete** /api/2/hooks/envs/{envvar_id} | Delete Environment Variable
*SmartHooksApi* | [**delete_hook**](docs/apis/tags/SmartHooksApi.md#delete_hook) | **delete** /api/2/hooks/{hook_id} | Delete Smart Hook by ID
*SmartHooksApi* | [**get_environment_variable**](docs/apis/tags/SmartHooksApi.md#get_environment_variable) | **get** /api/2/hooks/envs/{envvar_id} | Get Environment Variable
*SmartHooksApi* | [**get_hook**](docs/apis/tags/SmartHooksApi.md#get_hook) | **get** /api/2/hooks/{hook_id} | Get Smart Hook by ID
*SmartHooksApi* | [**get_logs**](docs/apis/tags/SmartHooksApi.md#get_logs) | **get** /api/2/hooks/{hook_id}/logs | Get Smart Hook Logs
*SmartHooksApi* | [**list_environment_variables**](docs/apis/tags/SmartHooksApi.md#list_environment_variables) | **get** /api/2/hooks/envs | List Environment Variables
*SmartHooksApi* | [**list_hooks**](docs/apis/tags/SmartHooksApi.md#list_hooks) | **get** /api/2/hooks | List all Smart Hooks
*SmartHooksApi* | [**update_environment_variable**](docs/apis/tags/SmartHooksApi.md#update_environment_variable) | **put** /api/2/hooks/envs/{envvar_id} | Update Environment Variable
*SmartHooksApi* | [**update_hook**](docs/apis/tags/SmartHooksApi.md#update_hook) | **put** /api/2/hooks/{hook_id} | Update Smart Hook by ID
*UserMappingsApi* | [**create_mapping**](docs/apis/tags/UserMappingsApi.md#create_mapping) | **post** /api/2/mappings | Create Mapping
*UserMappingsApi* | [**delete_mapping**](docs/apis/tags/UserMappingsApi.md#delete_mapping) | **delete** /api/2/mappings/{mapping_id} | Delete Mapping
*UserMappingsApi* | [**get_mapping**](docs/apis/tags/UserMappingsApi.md#get_mapping) | **get** /api/2/mappings/{mapping_id} | Get Mapping
*UserMappingsApi* | [**list_mapping_action_values**](docs/apis/tags/UserMappingsApi.md#list_mapping_action_values) | **get** /api/2/mappings/actions/{mapping_action_value}/values | List Actions Values
*UserMappingsApi* | [**list_mapping_conditions**](docs/apis/tags/UserMappingsApi.md#list_mapping_conditions) | **get** /api/2/mappings/conditions | List Conditions
*UserMappingsApi* | [**list_mapping_conditions_operators**](docs/apis/tags/UserMappingsApi.md#list_mapping_conditions_operators) | **get** /api/2/mappings/conditions/{mapping_condition_value}/operators | List Conditions Operators
*UserMappingsApi* | [**list_mapping_contion_values**](docs/apis/tags/UserMappingsApi.md#list_mapping_contion_values) | **get** /api/2/mappings/conditions/{mapping_condition_value}/values | List Conditions Values
*UserMappingsApi* | [**list_mappings**](docs/apis/tags/UserMappingsApi.md#list_mappings) | **get** /api/2/mappings | List Mappings
*UserMappingsApi* | [**list_mappings_actions**](docs/apis/tags/UserMappingsApi.md#list_mappings_actions) | **get** /api/2/mappings/actions | List Actions
*UserMappingsApi* | [**sort_mappings**](docs/apis/tags/UserMappingsApi.md#sort_mappings) | **put** /api/2/mappings/sort | Bulk Sort
*UserMappingsApi* | [**update_mapping**](docs/apis/tags/UserMappingsApi.md#update_mapping) | **put** /api/2/mappings/{mapping_id} | Update Mapping
*UsersV1Api* | [**add_roles_to_user**](docs/apis/tags/UsersV1Api.md#add_roles_to_user) | **put** /api/1/users/{user_id}/add_roles | Add Roles for a User
*UsersV1Api* | [**create_user**](docs/apis/tags/UsersV1Api.md#create_user) | **post** /api/1/users | Create a User
*UsersV1Api* | [**delete_user**](docs/apis/tags/UsersV1Api.md#delete_user) | **delete** /api/1/users/{user_id} | Delete a User
*UsersV1Api* | [**get_custom_attributes**](docs/apis/tags/UsersV1Api.md#get_custom_attributes) | **get** /api/1/users/custom_attributes | Get Custom Attributes
*UsersV1Api* | [**get_user_apps**](docs/apis/tags/UsersV1Api.md#get_user_apps) | **get** /api/1/users/{user_id}/apps | Get Apps for a User
*UsersV1Api* | [**get_user_by_id**](docs/apis/tags/UsersV1Api.md#get_user_by_id) | **get** /api/1/users/{user_id} | Get User by ID
*UsersV1Api* | [**get_user_roles**](docs/apis/tags/UsersV1Api.md#get_user_roles) | **get** /api/1/users/{user_id}/roles | Get Roles for a User
*UsersV1Api* | [**list_users**](docs/apis/tags/UsersV1Api.md#list_users) | **get** /api/1/users | List Users
*UsersV1Api* | [**lock_account_user**](docs/apis/tags/UsersV1Api.md#lock_account_user) | **put** /api/1/users/{user_id}/lock_user | Lock User Account
*UsersV1Api* | [**log_out_user**](docs/apis/tags/UsersV1Api.md#log_out_user) | **put** /api/1/users/{user_id}/logout | Log User Out
*UsersV1Api* | [**remove_user_role**](docs/apis/tags/UsersV1Api.md#remove_user_role) | **put** /api/1/users/{user_id}/remove_roles | Remove Roles for a User
*UsersV1Api* | [**set_user_state**](docs/apis/tags/UsersV1Api.md#set_user_state) | **put** /api/1/users/{user_id}/set_state | Set User State
*UsersV1Api* | [**update_password_insecure**](docs/apis/tags/UsersV1Api.md#update_password_insecure) | **put** /api/1/users/set_password_clear_text/{user_id} | Set Password Using ID in Cleartext
*UsersV1Api* | [**update_password_secure**](docs/apis/tags/UsersV1Api.md#update_password_secure) | **put** /api/1/users/set_password_using_salt/{user_id} | Set Password Using ID and SHA-256 and Salt
*UsersV1Api* | [**update_user**](docs/apis/tags/UsersV1Api.md#update_user) | **put** /api/1/users/{user_id} | Update a User
*UsersV2Api* | [**create_user2**](docs/apis/tags/UsersV2Api.md#create_user2) | **post** /api/2/users | Create User
*UsersV2Api* | [**delete_user2**](docs/apis/tags/UsersV2Api.md#delete_user2) | **delete** /api/2/users/{user_id} | Delete User
*UsersV2Api* | [**get_user2**](docs/apis/tags/UsersV2Api.md#get_user2) | **get** /api/2/users/{user_id} | Get User
*UsersV2Api* | [**get_user_apps2**](docs/apis/tags/UsersV2Api.md#get_user_apps2) | **get** /api/2/users/{user_id}/apps | Get User Apps
*UsersV2Api* | [**list_users2**](docs/apis/tags/UsersV2Api.md#list_users2) | **get** /api/2/users | List Users
*UsersV2Api* | [**update_user2**](docs/apis/tags/UsersV2Api.md#update_user2) | **put** /api/2/users/{user_id} | Update User
*VigilanceAIApi* | [**create_risk_rule**](docs/apis/tags/VigilanceAIApi.md#create_risk_rule) | **post** /api/2/risk/rules | Create Rule
*VigilanceAIApi* | [**delete_risk_rule**](docs/apis/tags/VigilanceAIApi.md#delete_risk_rule) | **delete** /api/2/risk/rules/{rule_id} | Delete Rule
*VigilanceAIApi* | [**get_risk_rule**](docs/apis/tags/VigilanceAIApi.md#get_risk_rule) | **get** /api/2/risk/rules/{rule_id} | get Risk Rule
*VigilanceAIApi* | [**get_risk_score**](docs/apis/tags/VigilanceAIApi.md#get_risk_score) | **post** /api/2/risk/verify | Get a Risk Score
*VigilanceAIApi* | [**get_risk_scores**](docs/apis/tags/VigilanceAIApi.md#get_risk_scores) | **get** /api/2/risk/scores | Get Score Summary
*VigilanceAIApi* | [**list_risk_rules**](docs/apis/tags/VigilanceAIApi.md#list_risk_rules) | **get** /api/2/risk/rules | List Rules
*VigilanceAIApi* | [**track_risk_event**](docs/apis/tags/VigilanceAIApi.md#track_risk_event) | **post** /api/2/risk/events | Track an Event
*VigilanceAIApi* | [**update_risk_rule**](docs/apis/tags/VigilanceAIApi.md#update_risk_rule) | **put** /api/2/risk/rules/{rule_id} | Update Rule

## Documentation For Models

 - [ActionObj](docs/models/ActionObj.md)
 - [AltErr](docs/models/AltErr.md)
 - [AppParameters](docs/models/AppParameters.md)
 - [AppRule](docs/models/AppRule.md)
 - [AuthClaim](docs/models/AuthClaim.md)
 - [AuthId](docs/models/AuthId.md)
 - [AuthMethod](docs/models/AuthMethod.md)
 - [AuthScope](docs/models/AuthScope.md)
 - [AuthServer](docs/models/AuthServer.md)
 - [AuthServerConfiguration](docs/models/AuthServerConfiguration.md)
 - [Brand](docs/models/Brand.md)
 - [BrandApp](docs/models/BrandApp.md)
 - [BrandReq](docs/models/BrandReq.md)
 - [ClientAppFull](docs/models/ClientAppFull.md)
 - [ClockCounter](docs/models/ClockCounter.md)
 - [Condition](docs/models/Condition.md)
 - [ConfigurationOidc](docs/models/ConfigurationOidc.md)
 - [ConfigurationSaml](docs/models/ConfigurationSaml.md)
 - [Connector](docs/models/Connector.md)
 - [Device](docs/models/Device.md)
 - [Devices](docs/models/Devices.md)
 - [EmailConfig](docs/models/EmailConfig.md)
 - [EnforcementPoint](docs/models/EnforcementPoint.md)
 - [Error](docs/models/Error.md)
 - [Event](docs/models/Event.md)
 - [Fp](docs/models/Fp.md)
 - [GenericApp](docs/models/GenericApp.md)
 - [Group](docs/models/Group.md)
 - [Hook](docs/models/Hook.md)
 - [HookEnvvar](docs/models/HookEnvvar.md)
 - [HookLog](docs/models/HookLog.md)
 - [HookStatus](docs/models/HookStatus.md)
 - [Id](docs/models/Id.md)
 - [Ip](docs/models/Ip.md)
 - [Locale](docs/models/Locale.md)
 - [Mapping](docs/models/Mapping.md)
 - [MessageTemplate](docs/models/MessageTemplate.md)
 - [OauthToken](docs/models/OauthToken.md)
 - [OidcApp](docs/models/OidcApp.md)
 - [OtpDevice](docs/models/OtpDevice.md)
 - [Privilege](docs/models/Privilege.md)
 - [RateLimit](docs/models/RateLimit.md)
 - [RequestBrand](docs/models/RequestBrand.md)
 - [RiskDevice](docs/models/RiskDevice.md)
 - [RiskRule](docs/models/RiskRule.md)
 - [RiskUser](docs/models/RiskUser.md)
 - [Role](docs/models/Role.md)
 - [RuleAction](docs/models/RuleAction.md)
 - [RuleCondition](docs/models/RuleCondition.md)
 - [SamlApp](docs/models/SamlApp.md)
 - [SamlAssert](docs/models/SamlAssert.md)
 - [SamlFactor](docs/models/SamlFactor.md)
 - [Scope](docs/models/Scope.md)
 - [Session](docs/models/Session.md)
 - [Source](docs/models/Source.md)
 - [SsoOidc](docs/models/SsoOidc.md)
 - [SsoSaml](docs/models/SsoSaml.md)
 - [TokenClaim](docs/models/TokenClaim.md)
 - [User](docs/models/User.md)
 - [UserAgent](docs/models/UserAgent.md)
 - [Verb](docs/models/Verb.md)

## Documentation For Authorization

Authentication schemes defined for the API:
<a id="OAuth2"></a>
### OAuth2

- **Type**: OAuth
- **Flow**: application
- **Authorization URL**: 
- **Scopes**: 
 - **Authentication Only**: Gives the credential pair the ability to generate an access token that can perform POST calls only to authentication endpoints, providing least privileged access to authentication code. These endpoints include:   - Verify Factor (SAML Assertion)   - Generate SAML Assertion   - Verify Factor (Login)   - Create Session Login Token   - Log User Out
 - **Read Users**: Gives the credential pair the ability to generate an access token that can perform GET calls available for the User, Role, and Group API resources.
 - **Manage users**: Gives the credential pair the ability to generate an access token that can perform GET, POST, PUT, and DELETE calls available for the User, Role, and Group API resources, with the exception of setting passwords and assigning and removing roles
 - **Manage All**: Gives the credential pair the ability to generate an access token that can perform GET, POST, PUT, and DELETE calls for all available API resources, including the ability to set passwords and assign and remove roles.
 - **Read All**: Gives the credential pair the ability to generate an access token that can perform GET calls available for all API resources.

<a id="basicAuth"></a>
### basicAuth

- **Type**: HTTP basic authentication


## Author

























## Notes for Large OpenAPI documents
If the OpenAPI document is large, imports in onelogin.apis and onelogin.models may fail with a
RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1:
Use specific imports for apis and models like:
- `from onelogin.apis.default_api import DefaultApi`
- `from onelogin.model.pet import Pet`

Solution 1:
Before importing the package, adjust the maximum recursion limit as shown below:
```
import sys
sys.setrecursionlimit(1500)
import onelogin
from onelogin.apis import *
from onelogin.models import *
```
