Skip to content

Latest commit

 

History

History
175 lines (118 loc) · 5.59 KB

File metadata and controls

175 lines (118 loc) · 5.59 KB

okta.ThreatInsightApi

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

Method HTTP request Description
get_current_configuration GET /api/v1/threats/configuration Retrieve the ThreatInsight configuration
update_configuration POST /api/v1/threats/configuration Update the ThreatInsight configuration

get_current_configuration

ThreatInsightConfiguration get_current_configuration()

Retrieve the ThreatInsight configuration

Retrieves the ThreatInsight configuration for the org

Example

  • Api Key Authentication (apiToken):
  • OAuth Authentication (oauth2):
import okta
from okta.models.threat_insight_configuration import ThreatInsightConfiguration
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.ThreatInsightApi(api_client)

    try:
        # Retrieve the ThreatInsight configuration
        api_response = api_instance.get_current_configuration()
        print("The response of ThreatInsightApi->get_current_configuration:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ThreatInsightApi->get_current_configuration: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

ThreatInsightConfiguration

Authorization

apiToken, oauth2

HTTP request headers

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

HTTP response details

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

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

update_configuration

ThreatInsightConfiguration update_configuration(threat_insight_configuration)

Update the ThreatInsight configuration

Updates the ThreatInsight configuration for the org

Example

  • Api Key Authentication (apiToken):
  • OAuth Authentication (oauth2):
import okta
from okta.models.threat_insight_configuration import ThreatInsightConfiguration
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.ThreatInsightApi(api_client)
    threat_insight_configuration = okta.ThreatInsightConfiguration() # ThreatInsightConfiguration | 

    try:
        # Update the ThreatInsight configuration
        api_response = api_instance.update_configuration(threat_insight_configuration)
        print("The response of ThreatInsightApi->update_configuration:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ThreatInsightApi->update_configuration: %s\n" % e)

Parameters

Name Type Description Notes
threat_insight_configuration ThreatInsightConfiguration

Return type

ThreatInsightConfiguration

Authorization

apiToken, oauth2

HTTP request headers

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

HTTP response details

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

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