Skip to content

Latest commit

 

History

History
606 lines (435 loc) · 17.2 KB

AppsApi.md

File metadata and controls

606 lines (435 loc) · 17.2 KB

onelogin.AppsApi

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

Method HTTP request Description
create_app POST /api/2/apps Create App
delete_app DELETE /api/2/apps/{app_id} Delete App
delete_app_parameter DELETE /api/2/apps/{app_id}/parameters/{parameter_id} Delete Parameter from App
get_app GET /api/2/apps/{app_id} Get App
get_app_users GET /api/2/apps/{app_id}/users Get App Users
list_apps GET /api/2/apps List Apps
list_connectors GET /api/2/connectors List Connectors
update_app PUT /api/2/apps/{app_id} Update App

create_app

CreateApp200Response create_app(content_type=content_type, create_app_request=create_app_request)

Create App

Create App

Example

  • OAuth Authentication (OAuth2):
import time
import os
import onelogin
from onelogin.rest import ApiException
from pprint import pprint

# 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.

configuration.access_token = os.environ["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 = onelogin.AppsApi(api_client)
    content_type = 'application/json' # str |  (optional) (default to 'application/json')
    create_app_request = onelogin.CreateAppRequest() # CreateAppRequest |  (optional)

    try:
        # Create App
        api_response = api_instance.create_app(content_type=content_type, create_app_request=create_app_request)
        print("The response of AppsApi->create_app:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->create_app: %s\n" % e)

Parameters

Name Type Description Notes
content_type str [optional] [default to 'application/json']
create_app_request CreateAppRequest [optional]

Return type

CreateApp200Response

Authorization

OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
401 Unauthorized -
422 Unprocessable -

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

delete_app

delete_app(app_id)

Delete App

Delete App

Example

  • OAuth Authentication (OAuth2):
import time
import os
import onelogin
from onelogin.rest import ApiException
from pprint import pprint

# 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.

configuration.access_token = os.environ["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 = onelogin.AppsApi(api_client)
    app_id = 56 # int | 

    try:
        # Delete App
        api_instance.delete_app(app_id)
    except Exception as e:
        print("Exception when calling AppsApi->delete_app: %s\n" % e)

Parameters

Name Type Description Notes
app_id int

Return type

void (empty response body)

Authorization

OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 No Content -
401 Unauthorized -
404 Not Found -

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

delete_app_parameter

delete_app_parameter(app_id, parameter_id)

Delete Parameter from App

Delete Parameter from App

Example

  • OAuth Authentication (OAuth2):
import time
import os
import onelogin
from onelogin.rest import ApiException
from pprint import pprint

# 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.

configuration.access_token = os.environ["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 = onelogin.AppsApi(api_client)
    app_id = 56 # int | 
    parameter_id = 'parameter_id_example' # str | 

    try:
        # Delete Parameter from App
        api_instance.delete_app_parameter(app_id, parameter_id)
    except Exception as e:
        print("Exception when calling AppsApi->delete_app_parameter: %s\n" % e)

Parameters

Name Type Description Notes
app_id int
parameter_id str

Return type

void (empty response body)

Authorization

OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 No Content -
401 Unauthorized -
403 Forbidden -
404 Not Found -

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

get_app

GenericApp get_app(app_id)

Get App

Get App

Example

  • OAuth Authentication (OAuth2):
import time
import os
import onelogin
from onelogin.rest import ApiException
from pprint import pprint

# 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.

configuration.access_token = os.environ["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 = onelogin.AppsApi(api_client)
    app_id = 56 # int | 

    try:
        # Get App
        api_response = api_instance.get_app(app_id)
        print("The response of AppsApi->get_app:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->get_app: %s\n" % e)

Parameters

Name Type Description Notes
app_id int

Return type

GenericApp

Authorization

OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
401 Unauthorized -
404 Not Found -

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

get_app_users

List[User] get_app_users(app_id)

Get App Users

Get App Users

Example

  • OAuth Authentication (OAuth2):
import time
import os
import onelogin
from onelogin.rest import ApiException
from pprint import pprint

# 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.

configuration.access_token = os.environ["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 = onelogin.AppsApi(api_client)
    app_id = 56 # int | 

    try:
        # Get App Users
        api_response = api_instance.get_app_users(app_id)
        print("The response of AppsApi->get_app_users:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->get_app_users: %s\n" % e)

Parameters

Name Type Description Notes
app_id int

Return type

List[User]

Authorization

OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
401 Unauthorized -

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

list_apps

List[GenericApp] list_apps()

List Apps

List Apps

Example

  • OAuth Authentication (OAuth2):
import time
import os
import onelogin
from onelogin.rest import ApiException
from pprint import pprint

# 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.

configuration.access_token = os.environ["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 = onelogin.AppsApi(api_client)

    try:
        # List Apps
        api_response = api_instance.list_apps()
        print("The response of AppsApi->list_apps:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->list_apps: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[GenericApp]

Authorization

OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
401 Unauthorized -
422 Unprocessable Entity -

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

list_connectors

Connector list_connectors(name=name)

List Connectors

List Connectors

Example

  • OAuth Authentication (OAuth2):
import time
import os
import onelogin
from onelogin.rest import ApiException
from pprint import pprint

# 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.

configuration.access_token = os.environ["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 = onelogin.AppsApi(api_client)
    name = 'name_example' # str |  (optional)

    try:
        # List Connectors
        api_response = api_instance.list_connectors(name=name)
        print("The response of AppsApi->list_connectors:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->list_connectors: %s\n" % e)

Parameters

Name Type Description Notes
name str [optional]

Return type

Connector

Authorization

OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
401 Unauthorized -
422 Unprocessable Entity -

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

update_app

GenericApp update_app(app_id, request_body=request_body)

Update App

Update App

Example

  • OAuth Authentication (OAuth2):
import time
import os
import onelogin
from onelogin.rest import ApiException
from pprint import pprint

# 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.

configuration.access_token = os.environ["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 = onelogin.AppsApi(api_client)
    app_id = 56 # int | 
    request_body = None # Dict[str, object] |  (optional)

    try:
        # Update App
        api_response = api_instance.update_app(app_id, request_body=request_body)
        print("The response of AppsApi->update_app:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AppsApi->update_app: %s\n" % e)

Parameters

Name Type Description Notes
app_id int
request_body Dict[str, object] [optional]

Return type

GenericApp

Authorization

OAuth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
401 Unauthorized -
404 Not Found -

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