All URIs are relative to https://your-api-subdomain.onelogin.com
Method | HTTP request | Description |
---|---|---|
get_group_by_id | GET /api/1/groups/{group_id} | Get Group by ID |
get_groups | GET /api/1/groups | Get Groups |
GetGroups200Response get_group_by_id(group_id)
Get Group by ID
Get Group By ID
- 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.GroupsApi(api_client)
group_id = 'group_id_example' # str |
try:
# Get Group by ID
api_response = api_instance.get_group_by_id(group_id)
print("The response of GroupsApi->get_group_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling GroupsApi->get_group_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
group_id | str |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
400 | Bad Request | - |
401 | Unauthorized | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetGroups200Response get_groups()
Get Groups
Get Groups
- 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.GroupsApi(api_client)
try:
# Get Groups
api_response = api_instance.get_groups()
print("The response of GroupsApi->get_groups:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling GroupsApi->get_groups: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
400 | Bad Request | - |
401 | Unauthorized | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]