Class SubscriptionApi

java.lang.Object
com.okta.sdk.resource.api.SubscriptionApi

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2026-03-13T17:36:05.533634+05:30[Asia/Kolkata]", comments="Generator version: 7.15.0") public class SubscriptionApi extends Object
  • Constructor Details

    • SubscriptionApi

      public SubscriptionApi()
    • SubscriptionApi

      public SubscriptionApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getSubscriptionsNotificationTypeRole

      public Subscription getSubscriptionsNotificationTypeRole(ListSubscriptionsRoleRoleRefParameter roleRef, NotificationType notificationType) throws ApiException
      Retrieve a subscription for a role Retrieves a subscription by `notificationType` for a specified Role
      Parameters:
      roleRef - A reference to an existing role. Standard roles require a `roleType`, while Custom Roles require a `roleId`. See [Standard roles](/openapi/okta-management/guides/roles/#standard-roles). (required)
      notificationType - (required)
      Returns:
      Subscription
      Throws:
      ApiException - if fails to make API call
    • getSubscriptionsNotificationTypeRole

      public Subscription getSubscriptionsNotificationTypeRole(ListSubscriptionsRoleRoleRefParameter roleRef, NotificationType notificationType, Map<String,String> additionalHeaders) throws ApiException
      Retrieve a subscription for a role Retrieves a subscription by `notificationType` for a specified Role
      Parameters:
      roleRef - A reference to an existing role. Standard roles require a `roleType`, while Custom Roles require a `roleId`. See [Standard roles](/openapi/okta-management/guides/roles/#standard-roles). (required)
      notificationType - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      Subscription
      Throws:
      ApiException - if fails to make API call
    • getSubscriptionsNotificationTypeUser

      public Subscription getSubscriptionsNotificationTypeUser(NotificationType notificationType, String userId) throws ApiException
      Retrieve a subscription for a user Retrieves a subscription by `notificationType` for a specified user. Returns an `AccessDeniedException` message if requests are made for another user.
      Parameters:
      notificationType - (required)
      userId - ID of an existing Okta user (required)
      Returns:
      Subscription
      Throws:
      ApiException - if fails to make API call
    • getSubscriptionsNotificationTypeUser

      public Subscription getSubscriptionsNotificationTypeUser(NotificationType notificationType, String userId, Map<String,String> additionalHeaders) throws ApiException
      Retrieve a subscription for a user Retrieves a subscription by `notificationType` for a specified user. Returns an `AccessDeniedException` message if requests are made for another user.
      Parameters:
      notificationType - (required)
      userId - ID of an existing Okta user (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      Subscription
      Throws:
      ApiException - if fails to make API call
    • listSubscriptionsRole

      public List<Subscription> listSubscriptionsRole(ListSubscriptionsRoleRoleRefParameter roleRef) throws ApiException
      List all subscriptions for a role Lists all subscriptions available to a specified Role
      Parameters:
      roleRef - A reference to an existing role. Standard roles require a `roleType`, while Custom Roles require a `roleId`. See [Standard roles](/openapi/okta-management/guides/roles/#standard-roles). (required)
      Returns:
      List<Subscription>
      Throws:
      ApiException - if fails to make API call
    • listSubscriptionsRole

      public List<Subscription> listSubscriptionsRole(ListSubscriptionsRoleRoleRefParameter roleRef, Map<String,String> additionalHeaders) throws ApiException
      List all subscriptions for a role Lists all subscriptions available to a specified Role
      Parameters:
      roleRef - A reference to an existing role. Standard roles require a `roleType`, while Custom Roles require a `roleId`. See [Standard roles](/openapi/okta-management/guides/roles/#standard-roles). (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<Subscription>
      Throws:
      ApiException - if fails to make API call
    • listSubscriptionsRolePaged

      public Iterable<Subscription> listSubscriptionsRolePaged(ListSubscriptionsRoleRoleRefParameter roleRef)
      List all subscriptions for a role (Paginated) Lists all subscriptions available to a specified Role This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks. Use this method in a for-each loop to automatically fetch all pages without manual cursor management.
      Parameters:
      roleRef - A reference to an existing role. Standard roles require a `roleType`, while Custom Roles require a `roleId`. See [Standard roles](/openapi/okta-management/guides/roles/#standard-roles). (required)
      Returns:
      Iterable<Subscription> lazy iterable over all pages
    • listSubscriptionsRolePaged

      public Iterable<Subscription> listSubscriptionsRolePaged(ListSubscriptionsRoleRoleRefParameter roleRef, Map<String,String> additionalHeaders)
      List all subscriptions for a role (Paginated with additional headers) Lists all subscriptions available to a specified Role This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks.
      Parameters:
      roleRef - A reference to an existing role. Standard roles require a `roleType`, while Custom Roles require a `roleId`. See [Standard roles](/openapi/okta-management/guides/roles/#standard-roles). (required)
      additionalHeaders - additional headers for this call
      Returns:
      Iterable<Subscription> lazy iterable over all pages
    • listSubscriptionsUser

      public List<Subscription> listSubscriptionsUser(String userId) throws ApiException
      List all subscriptions for a user Lists all subscriptions available to a specified user. Returns an `AccessDeniedException` message if requests are made for another user.
      Parameters:
      userId - ID of an existing Okta user (required)
      Returns:
      List<Subscription>
      Throws:
      ApiException - if fails to make API call
    • listSubscriptionsUser

      public List<Subscription> listSubscriptionsUser(String userId, Map<String,String> additionalHeaders) throws ApiException
      List all subscriptions for a user Lists all subscriptions available to a specified user. Returns an `AccessDeniedException` message if requests are made for another user.
      Parameters:
      userId - ID of an existing Okta user (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<Subscription>
      Throws:
      ApiException - if fails to make API call
    • listSubscriptionsUserPaged

      public Iterable<Subscription> listSubscriptionsUserPaged(String userId)
      List all subscriptions for a user (Paginated) Lists all subscriptions available to a specified user. Returns an `AccessDeniedException` message if requests are made for another user. This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks. Use this method in a for-each loop to automatically fetch all pages without manual cursor management.
      Parameters:
      userId - ID of an existing Okta user (required)
      Returns:
      Iterable<Subscription> lazy iterable over all pages
    • listSubscriptionsUserPaged

      public Iterable<Subscription> listSubscriptionsUserPaged(String userId, Map<String,String> additionalHeaders)
      List all subscriptions for a user (Paginated with additional headers) Lists all subscriptions available to a specified user. Returns an `AccessDeniedException` message if requests are made for another user. This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks.
      Parameters:
      userId - ID of an existing Okta user (required)
      additionalHeaders - additional headers for this call
      Returns:
      Iterable<Subscription> lazy iterable over all pages
    • subscribeByNotificationTypeRole

      public void subscribeByNotificationTypeRole(ListSubscriptionsRoleRoleRefParameter roleRef, NotificationType notificationType) throws ApiException
      Subscribe a role to a specific notification type Subscribes a Role to a specified notification type. Changes to Role subscriptions override the subscription status of any individual users with the Role.
      Parameters:
      roleRef - A reference to an existing role. Standard roles require a `roleType`, while Custom Roles require a `roleId`. See [Standard roles](/openapi/okta-management/guides/roles/#standard-roles). (required)
      notificationType - (required)
      Throws:
      ApiException - if fails to make API call
    • subscribeByNotificationTypeRole

      public void subscribeByNotificationTypeRole(ListSubscriptionsRoleRoleRefParameter roleRef, NotificationType notificationType, Map<String,String> additionalHeaders) throws ApiException
      Subscribe a role to a specific notification type Subscribes a Role to a specified notification type. Changes to Role subscriptions override the subscription status of any individual users with the Role.
      Parameters:
      roleRef - A reference to an existing role. Standard roles require a `roleType`, while Custom Roles require a `roleId`. See [Standard roles](/openapi/okta-management/guides/roles/#standard-roles). (required)
      notificationType - (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • subscribeByNotificationTypeUser

      public void subscribeByNotificationTypeUser(NotificationType notificationType, String userId) throws ApiException
      Subscribe a user to a specific notification type Subscribes the current user to a specified notification type. Returns an `AccessDeniedException` message if requests are made for another user.
      Parameters:
      notificationType - (required)
      userId - ID of an existing Okta user (required)
      Throws:
      ApiException - if fails to make API call
    • subscribeByNotificationTypeUser

      public void subscribeByNotificationTypeUser(NotificationType notificationType, String userId, Map<String,String> additionalHeaders) throws ApiException
      Subscribe a user to a specific notification type Subscribes the current user to a specified notification type. Returns an `AccessDeniedException` message if requests are made for another user.
      Parameters:
      notificationType - (required)
      userId - ID of an existing Okta user (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • unsubscribeByNotificationTypeRole

      public void unsubscribeByNotificationTypeRole(ListSubscriptionsRoleRoleRefParameter roleRef, NotificationType notificationType) throws ApiException
      Unsubscribe a role from a specific notification type Unsubscribes a Role from a specified notification type. Changes to Role subscriptions override the subscription status of any individual users with the Role.
      Parameters:
      roleRef - A reference to an existing role. Standard roles require a `roleType`, while Custom Roles require a `roleId`. See [Standard roles](/openapi/okta-management/guides/roles/#standard-roles). (required)
      notificationType - (required)
      Throws:
      ApiException - if fails to make API call
    • unsubscribeByNotificationTypeRole

      public void unsubscribeByNotificationTypeRole(ListSubscriptionsRoleRoleRefParameter roleRef, NotificationType notificationType, Map<String,String> additionalHeaders) throws ApiException
      Unsubscribe a role from a specific notification type Unsubscribes a Role from a specified notification type. Changes to Role subscriptions override the subscription status of any individual users with the Role.
      Parameters:
      roleRef - A reference to an existing role. Standard roles require a `roleType`, while Custom Roles require a `roleId`. See [Standard roles](/openapi/okta-management/guides/roles/#standard-roles). (required)
      notificationType - (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • unsubscribeByNotificationTypeUser

      public void unsubscribeByNotificationTypeUser(NotificationType notificationType, String userId) throws ApiException
      Unsubscribe a user from a specific notification type Unsubscribes the current user from a specified notification type. Returns an `AccessDeniedException` message if requests are made for another user.
      Parameters:
      notificationType - (required)
      userId - ID of an existing Okta user (required)
      Throws:
      ApiException - if fails to make API call
    • unsubscribeByNotificationTypeUser

      public void unsubscribeByNotificationTypeUser(NotificationType notificationType, String userId, Map<String,String> additionalHeaders) throws ApiException
      Unsubscribe a user from a specific notification type Unsubscribes the current user from a specified notification type. Returns an `AccessDeniedException` message if requests are made for another user.
      Parameters:
      notificationType - (required)
      userId - ID of an existing Okta user (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

      protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()