Client API#
PyDPlus exposes a high-level client class along with convenience helpers from the top-level package.
PyDPlus Client#
- class pydplus.PyDPlus(connection_info: dict | None = None, connection_type: str | None = None, tenant_name: str | None = None, base_url: str | None = None, base_admin_url: str | None = None, base_auth_url: str | None = None, env: str | None = None, private_key: str | None = None, legacy_access_id: str | None = None, legacy_key_material: str | None | Path | IDPlusLegacyKeyMaterial = None, oauth_client_id: str | None = None, oauth_private_key: str | None = None, oauth_private_key_jwk: dict | None | str = None, oauth_scope: str | None | tuple | list | set | frozenset = None, oauth_scope_preset: str | None | tuple | list | set | frozenset = None, verify_ssl: bool | None = None, auto_connect: bool = True, strict_mode: bool | None = None, env_variables: dict | None = None, helper: str | None | tuple | list | set | dict = None, oauth_api_type: str | None = None, oauth_issuer_url: str | None = None)[source]#
Bases:
objectClass for the core client object.
- Parameters:
connection_info (dict, None) – Dictionary that defines the connection info to use
connection_type (str, None) – Determines whether to leverage a(n)
oauth(default) orlegacyconnectionbase_url (str, None) –
The base URL to leverage when performing Administration API calls
Note
This parameter is for backwards compatibility only and will eventually be fully deprecated. The
base_admin_urlshould be leveraged instead as a best practice.base_admin_url (str, None) – The base URL to leverage when performing Administration API calls
base_auth_url (str, None) – The base URL to leverage when performing Authentication API calls
tenant_name (str, None) –
Specify the tenant name for the RSA ID Plus tenant (e.g.
example-corporation)Note
Specifying the tenant name will allow the base URLs to be defined if not already defined via argument, helper setting, or environment variable.
env (str, None) –
Optionally specify the environment as
PROD,DEV, or a custom name. (e.g.STAGING)Note
This parameter will impact which environment variables are referenced when the client object is instantiated. (e.g.
PYDPLUS_PROD_BASE_URLrather thanPYDPLUS_BASE_URL)private_key (str, None) – The file path to the private key used for legacy API authentication
legacy_access_id (str, None) – The Access ID associated with the Legacy API connection
legacy_key_material (str, pathlib.Path, pydplus.credentials.IDPlusLegacyKeyMaterial, None) – Legacy key material as a
.keyfile path or parsed objectoauth_client_id (str, None) – The Client ID associated with the OAuth API connection
oauth_issuer_url (str, None) – The explicit OAuth issuer URL to use for token requests (e.g.
https://<tenant>.auth.securid.com/oauth)oauth_private_key (str, None) – The file path to the OAuth private-key JWK file used for Private Key JWT authentication
oauth_private_key_jwk (dict, str, None) – The OAuth private-key JWK payload used for Private Key JWT authentication
oauth_scope (str, tuple, list, set, frozenset, None) – One or more OAuth scopes to request in token requests (
+-delimited string or iterable of scope strings)oauth_scope_preset (str, tuple, list, set, frozenset, None) –
One or more scope preset names to merge with explicit OAuth scopes
Note
Presets can also be provided through helper settings or environment variables. (e.g.
all,user_read_only, etc.)oauth_api_type (str, None) – Defines which API base URL should be used when inferring the OAuth issuer URL (
authby default;adminsupported when configured)verify_ssl (bool, None) – Determines if SSL connections should be verified (
Trueby default)auto_connect (bool) – Determines if an API connection should be established when the object is instantiated (
Trueby default)strict_mode (bool, None) – Determines if failed API responses should result in an exception being raised (
Falseby default)env_variables (dict, None) – Optionally define custom environment variable names to use instead of the default names
helper (str, tuple, list, set, dict, None) – Optionally provide the file path for a helper file used to define the object configuration
- Returns:
The instantiated PyDPlus object
- Raises:
TypeError,ValueError,pydplus.errors.exceptions.MissingRequiredDataError,pydplus.errors.exceptions.APIConnectionError
- class User(pydp_object)[source]#
Bases:
objectClass containing user-related methods.
- disable_user(user_id: str, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Disable a user that is currently enabled.
- Parameters:
user_id (str) – The ID of an existing user (e.g.
54082ac6-4713-6368-2251-df813c41159f)timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The API response in JSON format or as a
requestsobject- Raises:
TypeError,errors.exceptions.APIConnectionError,errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError,errors.exceptions.MissingRequiredDataError
- enable_user(user_id: str, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Enable a user that is currently disabled.
- Parameters:
user_id (str) – The ID of an existing user (e.g.
54082ac6-4713-6368-2251-df813c41159f)timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The API response in JSON format or as a
requestsobject- Raises:
TypeError,errors.exceptions.APIConnectionError,errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError,errors.exceptions.MissingRequiredDataError
- get_user_details(email: str, search_unsynced: bool | None = None, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Retrieve the details for a specific user based on their email address.
- Parameters:
email (str) – The email address of the user for whom to retrieve details
search_unsynced (bool, None) – Indicates if the user search should include unsynchronized users (optional)
timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The user details in JSON format or the API response as a
requestsobject- Raises:
TypeError,errors.exceptions.APIConnectionError,errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError
- get_user_id(email: str | None = None, user_details: dict | None = None, search_unsynced: bool | None = None, timeout: int = 30, show_full_error: bool = True) str[source]#
Retrieve the User ID associated with a specific user.
- Parameters:
email (str, None) – The email address of the user for whom to retrieve details
user_details (dict, None) – The user details data from the
pydplus.users.get_user_details()functionsearch_unsynced (bool, None) – Indicates if the user search should include unsynchronized users (optional)
timeout (int, str, None) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)
- Returns:
The User ID for the given user as a string (e.g.
54082ac6-4713-6368-2251-df813c41159f) or an empty string if the User ID could not be retrieved successfully- Raises:
TypeError,errors.exceptions.APIConnectionError,errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError,errors.exceptions.MissingRequiredDataError
- mark_deleted(user_id: str, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Mark a specific user to be deleted during the next automated bulk deletion process.
- Parameters:
user_id (str) – The ID of an existing user (e.g.
54082ac6-4713-6368-2251-df813c41159f)timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The API response in JSON format or as a
requestsobject- Raises:
TypeError,errors.exceptions.APIConnectionError,errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError,errors.exceptions.MissingRequiredDataError
- synchronize_user(user_id: str, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Synchronize the details of a user between an identity source and the Cloud Access Service.
- Parameters:
user_id (str) – The ID of an existing user (e.g.
54082ac6-4713-6368-2251-df813c41159f)timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The API response in JSON format or as a
requestsobject- Raises:
TypeError,errors.exceptions.APIConnectionError,errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError,errors.exceptions.MissingRequiredDataError
- unmark_deleted(user_id: str, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Unmark a specific user that was flagged to be deleted.
- Parameters:
user_id (str) – The ID of an existing user (e.g.
54082ac6-4713-6368-2251-df813c41159f)timeout (int, str, None) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The API response in JSON format or as a
requestsobject- Raises:
TypeError,errors.exceptions.APIConnectionError,errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError,errors.exceptions.MissingRequiredDataError
- connect() Tuple[bool, dict[str, str]][source]#
Connect to the RSA ID Plus tenant using the Legacy API or OAuth method.
- Returns:
Boolean value indicating if connection was established and dictionary with base API headers
- Raises:
errors.exceptions.APIConnectionError,errors.exceptions.FeatureNotConfiguredError
- get(endpoint: str, params: dict | None = None, headers: dict | None = None, api_type: str = 'admin', timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Perform a GET request against the ID Plus tenant.
- Parameters:
endpoint (str) – The API endpoint to query
params (dict, None) – The query parameters (where applicable)
headers (dict, None) – Specific API headers to use when performing the API call (beyond the base headers)
api_type (str) – Indicates if the
admin(default) orauthAPI will be leveraged.timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The API response in JSON format or as a
requestsobject- Raises:
errors.exceptions.APIConnectionError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError
- patch(endpoint: str, payload: dict, params: dict | None = None, headers: dict | None = None, api_type: str = 'admin', timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Perform a PATCH call with payload against the ID Plus tenant.
- Parameters:
endpoint (str) – The API endpoint to query
payload (dict) – The payload to leverage in the API call
params (dict, None) – The query parameters (where applicable)
headers (dict, None) – Specific API headers to use when performing the API call (beyond the base headers)
api_type (str) – Indicates if the
admin(default) orauthAPI will be leveraged.timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The API response in JSON format or as a
requestsobject- Raises:
errors.exceptions.APIConnectionError,errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError
- post(endpoint: str, payload: dict, params: dict | None = None, headers: dict | None = None, api_type: str = 'admin', timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Perform a POST call with payload against the ID Plus tenant.
- Parameters:
endpoint (str) – The API endpoint to query
payload (dict) – The payload to leverage in the API call
params (dict, None) – The query parameters (where applicable)
headers (dict, None) – Specific API headers to use when performing the API call (beyond the base headers)
api_type (str) – Indicates if the
admin(default) orauthAPI will be leveraged.timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The API response in JSON format or as a
requestsobject- Raises:
errors.exceptions.APIConnectionError,errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError
- put(endpoint: str, payload: dict, params: dict | None = None, headers: dict | None = None, api_type: str = 'admin', timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Perform a PUT call with payload against the ID Plus tenant.
- Parameters:
endpoint (str) – The API endpoint to query
payload (dict) – The payload to leverage in the API call
params (dict, None) – The query parameters (where applicable)
headers (dict, None) – Specific API headers to use when performing the API call (beyond the base headers)
api_type (str) – Indicates if the
admin(default) orauthAPI will be leveraged.timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The API response in JSON format or as a
requestsobject- Raises:
errors.exceptions.APIConnectionError,errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError
Core Module#
- Module:
pydplus.core
- Synopsis:
This module performs the core operations of the package
- Usage:
from pydplus import PyDPlus- Example:
pydp = PyDPlus()- Created By:
Jeff Shurtliff
- Last Modified:
Jeff Shurtliff (via GPT-5.3-codex)
- Modified Date:
01 Apr 2026
- pydplus.core.compile_connection_info(base_url: str | None = None, admin_base_url: str | None = None, private_key: str | None = None, legacy_access_id: str | None = None, oauth_client_id: str | None = None, oauth_private_key: str | None = None, oauth_private_key_jwk: dict | None | str = None, oauth_scope: str | None | tuple | list | set | frozenset = None, oauth_scope_preset: str | None | tuple[str] | list[str] | set[str] = None, auth_base_url: str | None = None, oauth_api_type: str | None = None, oauth_issuer_url: str | None = None) dict[source]#
Compile the connection_info dictionary to use when authenticating to the API.
- Parameters:
base_url (str, None) – The base URL to leverage when performing API calls (deprecated and kept for backwards compatibility)
admin_base_url (str, None) – The base URL for the Administration API
private_key (str, None) – The file path to the private key used for legacy API authentication
legacy_access_id (str, None) – The Access ID associated with the Legacy API connection
oauth_client_id (str, None) – The Client ID associated with the OAuth API connection
oauth_private_key (str, None) – The file path to the OAuth private-key JWK used for Private Key JWT authentication
oauth_private_key_jwk (dict, str, None) – The OAuth private-key JWK payload used for Private Key JWT authentication
oauth_scope (str, tuple, list, set, frozenset, None) – One or more OAuth scopes to request in token requests (
+-delimited string or iterable of scope strings)oauth_scope_preset (str, tuple, list, set, None) – One or more presets representing groupings of OAuth scopes and permissions
auth_base_url (str, None) – The base URL for the Authentication API
oauth_api_type (str, None) – The API type to use when inferring OAuth issuer URL values (
authby default)oauth_issuer_url (str, None) – The explicit OAuth issuer URL to use for token requests
- Returns:
The compiled connection_info dictionary
- Raises:
Additional Modules#
- Module:
pydplus.api
- Synopsis:
Defines the basic functions associated with the RSA ID Plus API
- Created By:
Jeff Shurtliff
- Last Modified:
Jeff Shurtliff
- Modified Date:
30 Mar 2026
- pydplus.api.api_call_with_payload(pydp_object, method: str, endpoint: str, payload: dict | None | str = None, params: dict | None = None, headers: dict | None = None, api_type: str = 'admin', timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Perform an API call with payload against the ID Plus tenant.
- Parameters:
pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object
method (str) – The API method (
post,put, orpatch)endpoint (str) – The API endpoint to query
payload (dict, str, None) – The payload to leverage in the API call
params (dict, None) – The query parameters (where applicable)
headers (dict, None) – Specific API headers to use when performing the API call (beyond the base headers)
api_type (str) – Indicates if the
admin(default) orauthAPI will be leveraged.timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The API response in JSON format or as a
requestsobject- Raises:
TypeError,errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError
- pydplus.api.get(pydp_object, endpoint: str, params: dict | None = None, headers: dict | None = None, api_type: str = 'admin', timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Perform a GET request against the ID Plus tenant.
- Parameters:
pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object
endpoint (str) – The API endpoint to query
params (dict, None) – The query parameters (where applicable)
headers (dict, None) – Specific API headers to use when performing the API call (beyond the base headers)
api_type (str) – Indicates if the
admin(default) orauthAPI will be leveraged.timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The API response in JSON format or as a
requestsobject- Raises:
errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError
- pydplus.api.patch(pydp_object, endpoint: str, payload: dict | None | str = None, params: dict | None = None, headers: dict | None = None, api_type: str = 'admin', timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Perform a PATCH call with payload against the ID Plus tenant.
- Parameters:
pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object
endpoint (str) – The API endpoint to query
payload (dict, str, None) – The payload to leverage in the API call
params (dict, None) – The query parameters (where applicable)
headers (dict, None) – Specific API headers to use when performing the API call (beyond the base headers)
api_type (str) – Indicates if the
admin(default) orauthAPI will be leveraged.timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The API response in JSON format or as a
requestsobject- Raises:
errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError
- pydplus.api.post(pydp_object, endpoint: str, payload: dict | None | str = None, params: dict | None = None, headers: dict | None = None, api_type: str = 'admin', timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Perform a POST call with payload against the ID Plus tenant.
- Parameters:
pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object
endpoint (str) – The API endpoint to query
payload (dict, str, None) – The payload to leverage in the API call
params (dict, None) – The query parameters (where applicable)
headers (dict, None) – Specific API headers to use when performing the API call (beyond the base headers)
api_type (str) – Indicates if the
admin(default) orauthAPI will be leveraged.timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The API response in JSON format or as a
requestsobject- Raises:
errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError
- pydplus.api.put(pydp_object, endpoint: str, payload: dict | None | str = None, params: dict | None = None, headers: dict | None = None, api_type: str = 'admin', timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Perform a PUT call with payload against the ID Plus tenant.
- Parameters:
pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object
endpoint (str) – The API endpoint to query
payload (dict, str, None) – The payload to leverage in the API call
params (dict, None) – The query parameters (where applicable)
headers (dict, None) – Specific API headers to use when performing the API call (beyond the base headers)
api_type (str) – Indicates if the
admin(default) orauthAPI will be leveraged.timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The API response in JSON format or as a
requestsobject- Raises:
errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError
- Module:
pydplus.auth
- Synopsis:
This module performs the authentication and authorization operations
- Usage:
from pydplus import auth- Example:
jwt_string = auth.get_legacy_jwt_string(base_url, connection_info)- Created By:
Jeff Shurtliff
- Last Modified:
Jeff Shurtliff (via GPT-5.5-codex)
- Modified Date:
17 May 2026
- pydplus.auth.get_legacy_headers(jwt_string: str | None = None, base_url: str | None = None, connection_info: dict | None = None) dict[str, str][source]#
Construct the headers to use in legacy API calls.
- Parameters:
- Returns:
The headers dictionary to utilize in legacy API calls
- Raises:
TypeError,errors.exceptions.MissingRequiredDataError
- pydplus.auth.get_legacy_jwt_string(base_url: str, connection_info: dict) str[source]#
Retrieve the JWT string used for Legacy API connections.
- pydplus.auth.get_oauth_access_token(connection_info: dict, verify_ssl: bool = True, token_data: dict[str, Any] | None = None, force_refresh: bool = False, timeout: int = 30) dict[str, Any][source]#
Retrieve an OAuth access token and associated metadata.
- Parameters:
connection_info (dict) – Dictionary containing the connection information for the tenant
verify_ssl (bool) – Determines if SSL certificates should be verified during token requests (
Trueby default)token_data (dict, None) – Existing OAuth token metadata to reuse when still valid
force_refresh (bool) – Forces an access-token refresh and bypasses the token cache (
Falseby default)timeout (int) – The timeout period in seconds to use for token endpoint requests (
30by default)
- Returns:
OAuth token metadata containing token and expiration values
- Raises:
TypeError,ValueError,errors.exceptions.APIConnectionError,errors.exceptions.FeatureNotConfiguredError,errors.exceptions.MissingRequiredDataError
- pydplus.auth.get_oauth_headers(connection_info: dict, verify_ssl: bool = True, token_data: dict[str, Any] | None = None, force_refresh: bool = False, timeout: int = 30) Tuple[dict[str, str], dict[str, Any]][source]#
Construct OAuth headers for Administration API calls.
- Parameters:
connection_info (dict) – Dictionary containing the connection information for the tenant
verify_ssl (bool) – Determines if SSL certificates should be verified during token requests (
Trueby default)token_data (dict, None) – Existing OAuth token metadata to reuse when still valid
force_refresh (bool) – Forces an access-token refresh and bypasses the token cache (
Falseby default)timeout (int) – The timeout period in seconds to use for token endpoint requests (
30by default)
- Returns:
A tuple containing the headers dictionary and token metadata
- Raises:
TypeError,ValueError,errors.exceptions.APIConnectionError,errors.exceptions.FeatureNotConfiguredError,errors.exceptions.MissingRequiredDataError
- Module:
pydplus.constants
- Synopsis:
Constants that are utilized throughout the package
- Created By:
Jeff Shurtliff
- Last Modified:
Jeff Shurtliff
- Modified Date:
01 Apr 2026
- class pydplus.constants.ApiRequestTypes[source]#
Bases:
objectStandard REST API Request types used by the package.
- class pydplus.constants.ArgumentValues[source]#
Bases:
objectCommon argument values leveraged throughout the package.
- class pydplus.constants.AuthSchemes[source]#
Bases:
objectAuthentication schemes that are leveraged with the HTTP
Authorizationheader. (Reference)
- class pydplus.constants.AuthValues[source]#
Bases:
objectField/Parameter values relating to API authentication.
- class pydplus.constants.ClientSettings[source]#
Bases:
objectFields, values, and other constants relating to the
pydplus.PyDPlusclient configuration settings.
- class pydplus.constants.ConnectionInfo[source]#
Bases:
objectFields, values, and other constants relating to the
connection_infodictionary within the client object and thepydplus.utils.helpermodule.
- class pydplus.constants.ContentTypes[source]#
Bases:
objectCommon HTTP
Content-Typeheader values used by the package.This immutable namespace provides canonical MIME types used when sending or receiving data from the RSA REST API.
- class pydplus.constants.CredentialValues[source]#
Bases:
objectConstants used by secure credential parsing and private-key persistence helpers.
- class pydplus.constants.EncodingTypes[source]#
Bases:
objectCommon HTTP
Accept-Encodingheader values. (Reference)
- class pydplus.constants.EnvVariables[source]#
Bases:
objectConstants relating to environment variable names.
Note
If values are updated in this class then the corresponding values should be updated in the
pydplus.constants.HelperSettingsclass.
- class pydplus.constants.ExceptionClasses[source]#
Bases:
objectConstants utilized by the exception classes in the
pydplus.errors.exceptionsmodule.
- class pydplus.constants.FileExtensions[source]#
Bases:
objectCommon file extensions leveraged throughout the package.
- class pydplus.constants.Headers[source]#
Bases:
objectStandard HTTP header names used by the package.
This immutable namespace centralizes common header keys to avoid magic strings throughout the codebase and to reduce the risk of typographical errors. These values are intended for constructing outbound HTTP requests to the RSA REST API.
- class pydplus.constants.HelperSettings(VERIFY_SSL: str = 'verify_ssl')[source]#
Bases:
object- Fields, values, and other constants relating to the helper configuration settings and
the
pydplus.utils.helpermodule.
Note
If values are updated in this class for constants related to environment variables, then the corresponding values should be updated in the
pydplus.constants.EnvVariablesclass.
- class pydplus.constants.Languages[source]#
Bases:
objectCommon IETF language tags for use in the Accept-Language HTTP header.
Additional valid IETF language tags may be supplied manually when constructing request headers.
- class pydplus.constants.LogMessages[source]#
Bases:
objectCommon log messages that are utilized in multiple locations throughout the package.
- class pydplus.constants.OauthScopes[source]#
Bases:
objectConstants representing the OAuth 2.0 permission scopes. (Reference)
- class pydplus.constants.PayloadValues[source]#
Bases:
objectStandard and common payload values used in RSA ID Plus REST API requests.
- class pydplus.constants.QueryParams[source]#
Bases:
objectStandard query and payload parameter names used in RSA ID Plus REST API requests.
This immutable namespace provides canonical parameter keys for constructing query strings when interacting with the RSA ID Plus REST API. Centralizing these values helps prevent typographical errors and ensures consistent request construction.
- class pydplus.constants.ResponseKeys[source]#
Bases:
objectStandard and common keys / fields for RSA ID Plus REST API responses.
- class pydplus.constants.RestPaths[source]#
Bases:
objectTemplate paths for RSA REST API endpoints.
This immutable namespace centralizes commonly used REST endpoint templates to avoid duplicating hard-coded paths throughout the codebase. The templates are designed to be formatted with runtime values such as
user_id,timeout, and so forth.
- Module:
pydplus.decorators
- Synopsis:
Decorators that can be used to include additional functionality with functions and methods
- Created By:
Jeff Shurtliff
- Last Modified:
Jeff Shurtliff
- Modified Date:
30 Mar 2026
- pydplus.decorators.deprecated(*, since: str, replacement: str | None = None, removal: str | None = None, category: ~typing.Type[Warning] = <class 'DeprecationWarning'>, stacklevel: int = 2) Callable[[F], F][source]#
Mark a callable as deprecated and emits a warning at runtime.
- Parameters:
- Module:
pydplus.users
- Synopsis:
Defines the user-related functions associated with the RSA ID Plus API
- Created By:
Jeff Shurtliff
- Last Modified:
Jeff Shurtliff
- Modified Date:
30 Mar 2026
- pydplus.users.disable_user(pydp_object, user_id: str, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Disable a user that is currently enabled.
- Parameters:
pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object
user_id (str) – The ID of an existing user (e.g.
54082ac6-4713-6368-2251-df813c41159f)timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The API response in JSON format or as a
requestsobject- Raises:
TypeError,errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError,errors.exceptions.MissingRequiredDataError
- pydplus.users.enable_user(pydp_object, user_id: str, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Enable a user that is currently disabled.
- Parameters:
pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object
user_id (str) – The ID of an existing user (e.g.
54082ac6-4713-6368-2251-df813c41159f)timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The API response in JSON format or as a
requestsobject- Raises:
TypeError,errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError,errors.exceptions.MissingRequiredDataError
- pydplus.users.get_user_details(pydp_object, email: str, search_unsynced: bool | None = None, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Retrieve the details for a specific user based on their email address.
- Parameters:
pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object
email (str) – The email address of the user for whom to retrieve details
search_unsynced (bool, None) – Indicates if the user search should include unsynchronized users (optional)
timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The user details in JSON format or the API response as a
requestsobject- Raises:
TypeError,errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError
- pydplus.users.get_user_id(pydp_object, email: str = None, user_details: dict | None = None, search_unsynced: bool | None = None, timeout: int = 30, show_full_error: bool = True) str[source]#
Retrieve the User ID associated with a specific user.
- Parameters:
pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object
email (str, None) – The email address of the user for whom to retrieve details
user_details (dict, None) – The user details data from the
pydplus.users.get_user_details()functionsearch_unsynced (bool, None) – Indicates if the user search should include unsynchronized users (optional)
timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)
- Returns:
The User ID for the given user as a string (e.g.
54082ac6-4713-6368-2251-df813c41159f) or an empty string if the User ID could not be retrieved successfully- Raises:
TypeError,errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError,errors.exceptions.MissingRequiredDataError
- pydplus.users.mark_deleted(pydp_object, user_id: str, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Mark a specific user to be deleted during the next automated bulk deletion process.
- Parameters:
pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object
user_id (str) – The ID of an existing user (e.g.
54082ac6-4713-6368-2251-df813c41159f)timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The API response in JSON format or as a
requestsobject- Raises:
TypeError,errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError,errors.exceptions.MissingRequiredDataError
- pydplus.users.synchronize_user(pydp_object, user_id: str, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Synchronize the details of a user between an identity source and the Cloud Access Service.
- Parameters:
pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object
user_id (str) – The ID of an existing user (e.g.
54082ac6-4713-6368-2251-df813c41159f)timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The API response in JSON format or as a
requestsobject- Raises:
TypeError,errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError,errors.exceptions.MissingRequiredDataError
- pydplus.users.unmark_deleted(pydp_object, user_id: str, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#
Unmark a specific user that was flagged to be deleted.
- Parameters:
pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object
user_id (str) – The ID of an existing user (e.g.
54082ac6-4713-6368-2251-df813c41159f)timeout (int) – The timeout period in seconds (defaults to
30)show_full_error (bool) – Determines if the full error message should be displayed (defaults to
True)return_json (bool) – Determines if the response should be returned in JSON format (defaults to
True)allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then
Trueif Strict Mode is disabled)
- Returns:
The API response in JSON format or as a
requestsobject- Raises:
TypeError,errors.exceptions.APIMethodError,errors.exceptions.APIRequestError,errors.exceptions.APIResponseConversionError,errors.exceptions.InvalidFieldError,errors.exceptions.MissingRequiredDataError