Skip to content

Latest commit

 

History

History
625 lines (432 loc) · 20 KB

File metadata and controls

625 lines (432 loc) · 20 KB

okta.ApplicationApi

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

Method HTTP request Description
activate_application POST /api/v1/apps/{appId}/lifecycle/activate Activate an Application
create_application POST /api/v1/apps Create an Application
deactivate_application POST /api/v1/apps/{appId}/lifecycle/deactivate Deactivate an Application
delete_application DELETE /api/v1/apps/{appId} Delete an Application
get_application GET /api/v1/apps/{appId} Retrieve an Application
list_applications GET /api/v1/apps List all Applications
replace_application PUT /api/v1/apps/{appId} Replace an Application

activate_application

Success activate_application(app_id)

Activate an Application

Activates an inactive application

Example

  • Api Key Authentication (apiToken):
  • OAuth Authentication (oauth2):
import okta
from okta.models.success import Success
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.ApplicationApi(api_client)
    app_id = '0oafxqCAJWWGELFTYASJ' # str | ID of the Application

    try:
        # Activate an Application
        api_response = api_instance.activate_application(app_id)
        print("The response of ApplicationApi->activate_application:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ApplicationApi->activate_application: %s\n" % e)

Parameters

Name Type Description Notes
app_id str ID of the Application

Return type

Success

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 -
404 Not Found -
429 Too Many Requests -

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

create_application

Application create_application(application, activate=activate, okta_access_gateway_agent=okta_access_gateway_agent)

Create an Application

Creates a new application to your Okta organization

Example

  • Api Key Authentication (apiToken):
  • OAuth Authentication (oauth2):
import okta
from okta.models.application import Application
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.ApplicationApi(api_client)
    application = okta.Application() # Application | 
    activate = True # bool | Executes activation lifecycle operation when creating the app (optional) (default to True)
    okta_access_gateway_agent = 'okta_access_gateway_agent_example' # str |  (optional)

    try:
        # Create an Application
        api_response = api_instance.create_application(application, activate=activate, okta_access_gateway_agent=okta_access_gateway_agent)
        print("The response of ApplicationApi->create_application:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ApplicationApi->create_application: %s\n" % e)

Parameters

Name Type Description Notes
application Application
activate bool Executes activation lifecycle operation when creating the app [optional] [default to True]
okta_access_gateway_agent str [optional]

Return type

Application

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]

deactivate_application

Success deactivate_application(app_id)

Deactivate an Application

Deactivates an active application

Example

  • Api Key Authentication (apiToken):
  • OAuth Authentication (oauth2):
import okta
from okta.models.success import Success
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.ApplicationApi(api_client)
    app_id = '0oafxqCAJWWGELFTYASJ' # str | ID of the Application

    try:
        # Deactivate an Application
        api_response = api_instance.deactivate_application(app_id)
        print("The response of ApplicationApi->deactivate_application:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ApplicationApi->deactivate_application: %s\n" % e)

Parameters

Name Type Description Notes
app_id str ID of the Application

Return type

Success

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 -
404 Not Found -
429 Too Many Requests -

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

delete_application

delete_application(app_id)

Delete an Application

Deletes an inactive application

Example

  • Api Key Authentication (apiToken):
  • OAuth Authentication (oauth2):
import okta
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.ApplicationApi(api_client)
    app_id = '0oafxqCAJWWGELFTYASJ' # str | ID of the Application

    try:
        # Delete an Application
        api_instance.delete_application(app_id)
    except Exception as e:
        print("Exception when calling ApplicationApi->delete_application: %s\n" % e)

Parameters

Name Type Description Notes
app_id str ID of the Application

Return type

void (empty response body)

Authorization

apiToken, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 No Content -
403 Forbidden -
404 Not Found -
429 Too Many Requests -

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

get_application

Application get_application(app_id, expand=expand)

Retrieve an Application

Retrieves an application from your Okta organization by id

Example

  • Api Key Authentication (apiToken):
  • OAuth Authentication (oauth2):
import okta
from okta.models.application import Application
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.ApplicationApi(api_client)
    app_id = '0oafxqCAJWWGELFTYASJ' # str | ID of the Application
    expand = 'expand_example' # str |  (optional)

    try:
        # Retrieve an Application
        api_response = api_instance.get_application(app_id, expand=expand)
        print("The response of ApplicationApi->get_application:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ApplicationApi->get_application: %s\n" % e)

Parameters

Name Type Description Notes
app_id str ID of the Application
expand str [optional]

Return type

Application

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 -
404 Not Found -
429 Too Many Requests -

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

list_applications

List[Application] list_applications(q=q, after=after, limit=limit, filter=filter, expand=expand, include_non_deleted=include_non_deleted)

List all Applications

Lists all applications with pagination. A subset of apps can be returned that match a supported filter expression or query.

Example

  • Api Key Authentication (apiToken):
  • OAuth Authentication (oauth2):
import okta
from okta.models.application import Application
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.ApplicationApi(api_client)
    q = 'q_example' # str |  (optional)
    after = 'after_example' # str | Specifies the pagination cursor for the next page of apps (optional)
    limit = -1 # int | Specifies the number of results for a page (optional) (default to -1)
    filter = 'filter_example' # str | Filters apps by status, user.id, group.id or credentials.signing.kid expression (optional)
    expand = 'expand_example' # str | Traverses users link relationship and optionally embeds Application User resource (optional)
    include_non_deleted = False # bool |  (optional) (default to False)

    try:
        # List all Applications
        api_response = api_instance.list_applications(q=q, after=after, limit=limit, filter=filter, expand=expand, include_non_deleted=include_non_deleted)
        print("The response of ApplicationApi->list_applications:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ApplicationApi->list_applications: %s\n" % e)

Parameters

Name Type Description Notes
q str [optional]
after str Specifies the pagination cursor for the next page of apps [optional]
limit int Specifies the number of results for a page [optional] [default to -1]
filter str Filters apps by status, user.id, group.id or credentials.signing.kid expression [optional]
expand str Traverses users link relationship and optionally embeds Application User resource [optional]
include_non_deleted bool [optional] [default to False]

Return type

List[Application]

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]

replace_application

Application replace_application(app_id, application)

Replace an Application

Replaces an application

Example

  • Api Key Authentication (apiToken):
  • OAuth Authentication (oauth2):
import okta
from okta.models.application import Application
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.ApplicationApi(api_client)
    app_id = '0oafxqCAJWWGELFTYASJ' # str | ID of the Application
    application = okta.Application() # Application | 

    try:
        # Replace an Application
        api_response = api_instance.replace_application(app_id, application)
        print("The response of ApplicationApi->replace_application:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ApplicationApi->replace_application: %s\n" % e)

Parameters

Name Type Description Notes
app_id str ID of the Application
application Application

Return type

Application

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 -
404 Not Found -
429 Too Many Requests -

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