All URIs are relative to https://api.opal.dev/v1
| Method | HTTP request | Description |
|---|---|---|
| get_remote_users | GET /users/remote_users | |
| get_user_tags | GET /users/{user_id}/tags | |
| get_users | GET /users | |
| user | GET /user |
PaginatedRemoteUsersList get_remote_users(third_party_provider=third_party_provider, user_id=user_id, remote_id=remote_id, cursor=cursor, page_size=page_size)
Returns a list of remote users for your organization.
- Bearer Authentication (BearerAuth):
import opal_security
from opal_security.models.paginated_remote_users_list import PaginatedRemoteUsersList
from opal_security.models.third_party_provider_enum import ThirdPartyProviderEnum
from opal_security.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.opal.dev/v1
# See configuration.py for a list of all supported configuration parameters.
import opal_security as opal
configuration = opal.Configuration(
host = "https://api.opal.dev/v1"
)
# 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 Bearer authorization: BearerAuth
configuration = opal.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with opal_security.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = opal_security.UsersApi(api_client)
third_party_provider = [opal_security.ThirdPartyProviderEnum()] # List[ThirdPartyProviderEnum] | Filter remote users by their third party provider. (optional)
user_id = [["32acc112-21ff-4669-91c2-21e27683eaa1"]] # List[UUID] | Filter remote users by their user ID. (optional)
remote_id = ['[1234567890]'] # List[str] | Filter remote users by their remote ID. (optional)
cursor = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw' # str | The pagination cursor value. (optional)
page_size = 200 # int | Number of results to return per page. Default is 200. (optional)
try:
api_response = api_instance.get_remote_users(third_party_provider=third_party_provider, user_id=user_id, remote_id=remote_id, cursor=cursor, page_size=page_size)
print("The response of UsersApi->get_remote_users:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UsersApi->get_remote_users: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| third_party_provider | List[ThirdPartyProviderEnum] | Filter remote users by their third party provider. | [optional] |
| user_id | List[UUID] | Filter remote users by their user ID. | [optional] |
| remote_id | List[str] | Filter remote users by their remote ID. | [optional] |
| cursor | str | The pagination cursor value. | [optional] |
| page_size | int | Number of results to return per page. Default is 200. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | One page worth users in your organization. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TagsList get_user_tags(user_id)
Returns all tags applied to the user.
- Bearer Authentication (BearerAuth):
import opal_security
from opal_security.models.tags_list import TagsList
from opal_security.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.opal.dev/v1
# See configuration.py for a list of all supported configuration parameters.
import opal_security as opal
configuration = opal.Configuration(
host = "https://api.opal.dev/v1"
)
# 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 Bearer authorization: BearerAuth
configuration = opal.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with opal_security.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = opal_security.UsersApi(api_client)
user_id = UUID('1b978423-db0a-4037-a4cf-f79c60cb67b3') # UUID | The ID of the user whose tags to return.
try:
api_response = api_instance.get_user_tags(user_id)
print("The response of UsersApi->get_user_tags:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UsersApi->get_user_tags: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| user_id | UUID | The ID of the user whose tags to return. |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The tags applied to the user. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaginatedUsersList get_users(cursor=cursor, page_size=page_size)
Returns a list of users for your organization.
- Bearer Authentication (BearerAuth):
import opal_security
from opal_security.models.paginated_users_list import PaginatedUsersList
from opal_security.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.opal.dev/v1
# See configuration.py for a list of all supported configuration parameters.
import opal_security as opal
configuration = opal.Configuration(
host = "https://api.opal.dev/v1"
)
# 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 Bearer authorization: BearerAuth
configuration = opal.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with opal_security.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = opal_security.UsersApi(api_client)
cursor = 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw' # str | The pagination cursor value. (optional)
page_size = 200 # int | Number of results to return per page. Default is 200. (optional)
try:
api_response = api_instance.get_users(cursor=cursor, page_size=page_size)
print("The response of UsersApi->get_users:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UsersApi->get_users: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| cursor | str | The pagination cursor value. | [optional] |
| page_size | int | Number of results to return per page. Default is 200. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | One page worth users in your organization. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User user(user_id=user_id, email=email)
Returns a User object.
- Bearer Authentication (BearerAuth):
import opal_security
from opal_security.models.user import User
from opal_security.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.opal.dev/v1
# See configuration.py for a list of all supported configuration parameters.
import opal_security as opal
configuration = opal.Configuration(
host = "https://api.opal.dev/v1"
)
# 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 Bearer authorization: BearerAuth
configuration = opal.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with opal_security.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = opal_security.UsersApi(api_client)
user_id = UUID('32acc112-21ff-4669-91c2-21e27683eaa1') # UUID | The user ID of the user. (optional)
email = 'johndoe@domain.org' # str | The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur. (optional)
try:
api_response = api_instance.user(user_id=user_id, email=email)
print("The response of UsersApi->user:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UsersApi->user: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| user_id | UUID | The user ID of the user. | [optional] |
| str | The email of the user. If both user ID and email are provided, user ID will take precedence. If neither are provided, an error will occur. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The user object associated with the passed-in email or ID. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]