Skip to content

Latest commit

 

History

History
175 lines (118 loc) · 5.53 KB

File metadata and controls

175 lines (118 loc) · 5.53 KB

okta.AttackProtectionApi

All URIs are relative to https://subdomain.okta.com

Method HTTP request Description
get_user_lockout_settings GET /attack-protection/api/v1/user-lockout-settings Retrieve the User Lockout Settings
replace_user_lockout_settings PUT /attack-protection/api/v1/user-lockout-settings Replace the User Lockout Settings

get_user_lockout_settings

List[UserLockoutSettings] get_user_lockout_settings()

Retrieve the User Lockout Settings

Retrieves the User Lockout Settings for an org

Example

  • Api Key Authentication (apiToken):
  • OAuth Authentication (oauth2):
import okta
from okta.models.user_lockout_settings import UserLockoutSettings
from okta.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://subdomain.okta.com
# See configuration.py for a list of all supported configuration parameters.
configuration = okta.Configuration(
    host = "https://subdomain.okta.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 API key authorization: apiToken
configuration.api_key['apiToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiToken'] = 'Bearer'

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Enter a context with an instance of the API client
with okta.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = okta.AttackProtectionApi(api_client)

    try:
        # Retrieve the User Lockout Settings
        api_response = api_instance.get_user_lockout_settings()
        print("The response of AttackProtectionApi->get_user_lockout_settings:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AttackProtectionApi->get_user_lockout_settings: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[UserLockoutSettings]

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
403 Forbidden -
429 Too Many Requests -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

replace_user_lockout_settings

UserLockoutSettings replace_user_lockout_settings(lockout_settings)

Replace the User Lockout Settings

Replaces the User Lockout Settings for an org

Example

  • Api Key Authentication (apiToken):
  • OAuth Authentication (oauth2):
import okta
from okta.models.user_lockout_settings import UserLockoutSettings
from okta.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://subdomain.okta.com
# See configuration.py for a list of all supported configuration parameters.
configuration = okta.Configuration(
    host = "https://subdomain.okta.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 API key authorization: apiToken
configuration.api_key['apiToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiToken'] = 'Bearer'

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Enter a context with an instance of the API client
with okta.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = okta.AttackProtectionApi(api_client)
    lockout_settings = okta.UserLockoutSettings() # UserLockoutSettings | 

    try:
        # Replace the User Lockout Settings
        api_response = api_instance.replace_user_lockout_settings(lockout_settings)
        print("The response of AttackProtectionApi->replace_user_lockout_settings:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AttackProtectionApi->replace_user_lockout_settings: %s\n" % e)

Parameters

Name Type Description Notes
lockout_settings UserLockoutSettings

Return type

UserLockoutSettings

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden -
429 Too Many Requests -

[Back to top] [Back to API list] [Back to Model list] [Back to README]