Package com.okta.sdk.resource.api
Class RealmApi
java.lang.Object
com.okta.sdk.resource.api.RealmApi
@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 RealmApi
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a realm Creates a new realmcreateRealm(CreateRealmRequest body, Map<String, String> additionalHeaders) Create a realm Creates a new realmvoiddeleteRealm(String realmId) Delete a realm Deletes a realm permanently.voiddeleteRealm(String realmId, Map<String, String> additionalHeaders) Delete a realm Deletes a realm permanently.protected static com.fasterxml.jackson.databind.ObjectMapperRetrieve a realm Retrieves a realmRetrieve a realm Retrieves a realmList all realms Lists all realms.listRealms(Integer limit, String after, String search, String sortBy, String sortOrder, Map<String, String> additionalHeaders) List all realms Lists all realms.List all realms (Paginated) Lists all realms.listRealmsPaged(Integer limit, String after, String search, String sortBy, String sortOrder, Map<String, String> additionalHeaders) List all realms (Paginated with additional headers) Lists all realms.replaceRealm(String realmId, UpdateRealmRequest body) Replace the realm profile Replaces the realm profilereplaceRealm(String realmId, UpdateRealmRequest body, Map<String, String> additionalHeaders) Replace the realm profile Replaces the realm profilevoidsetApiClient(ApiClient apiClient)
-
Constructor Details
-
RealmApi
public RealmApi() -
RealmApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
createRealm
Create a realm Creates a new realm- Parameters:
body- (required)- Returns:
- Realm
- Throws:
ApiException- if fails to make API call
-
createRealm
public Realm createRealm(CreateRealmRequest body, Map<String, String> additionalHeaders) throws ApiExceptionCreate a realm Creates a new realm- Parameters:
body- (required)additionalHeaders- additionalHeaders for this call- Returns:
- Realm
- Throws:
ApiException- if fails to make API call
-
deleteRealm
Delete a realm Deletes a realm permanently. This operation can only be performed after disassociating other entities like users and identity providers from a realm.- Parameters:
realmId- ID of the realm (required)- Throws:
ApiException- if fails to make API call
-
deleteRealm
Delete a realm Deletes a realm permanently. This operation can only be performed after disassociating other entities like users and identity providers from a realm.- Parameters:
realmId- ID of the realm (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
getRealm
Retrieve a realm Retrieves a realm- Parameters:
realmId- ID of the realm (required)- Returns:
- Realm
- Throws:
ApiException- if fails to make API call
-
getRealm
Retrieve a realm Retrieves a realm- Parameters:
realmId- ID of the realm (required)additionalHeaders- additionalHeaders for this call- Returns:
- Realm
- Throws:
ApiException- if fails to make API call
-
listRealms
public List<Realm> listRealms(Integer limit, String after, String search, String sortBy, String sortOrder) throws ApiException List all realms Lists all realms. > **Note:** The `search` parameter results are sourced from an eventually consistent datasource and may not reflect the latest information.- Parameters:
limit- Specifies the number of results returned. Defaults to 10 if `search` is provided. (optional, default to 200)after- The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See [Pagination](https://developer.okta.com/docs/api/#pagination) and [Link header](https://developer.okta.com/docs/api/#link-header). (optional)search- Searches for realms with a supported filtering expression for most properties. Searches for realms can be filtered by the contains (`co`) operator. You can only use `co` with the `profile.name` property. See [Operators](https://developer.okta.com/docs/api/#operators). (optional)sortBy- Specifies the field to sort by and can be any single property (for search queries only) (optional)sortOrder- Specifies sort order: `asc` or `desc` (for search queries only). This parameter is ignored if `sortBy` isn't present. (optional, default to asc)- Returns:
- List<Realm>
- Throws:
ApiException- if fails to make API call
-
listRealms
public List<Realm> listRealms(Integer limit, String after, String search, String sortBy, String sortOrder, Map<String, String> additionalHeaders) throws ApiExceptionList all realms Lists all realms. > **Note:** The `search` parameter results are sourced from an eventually consistent datasource and may not reflect the latest information.- Parameters:
limit- Specifies the number of results returned. Defaults to 10 if `search` is provided. (optional, default to 200)after- The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See [Pagination](https://developer.okta.com/docs/api/#pagination) and [Link header](https://developer.okta.com/docs/api/#link-header). (optional)search- Searches for realms with a supported filtering expression for most properties. Searches for realms can be filtered by the contains (`co`) operator. You can only use `co` with the `profile.name` property. See [Operators](https://developer.okta.com/docs/api/#operators). (optional)sortBy- Specifies the field to sort by and can be any single property (for search queries only) (optional)sortOrder- Specifies sort order: `asc` or `desc` (for search queries only). This parameter is ignored if `sortBy` isn't present. (optional, default to asc)additionalHeaders- additionalHeaders for this call- Returns:
- List<Realm>
- Throws:
ApiException- if fails to make API call
-
listRealmsPaged
public Iterable<Realm> listRealmsPaged(Integer limit, String after, String search, String sortBy, String sortOrder) List all realms (Paginated) Lists all realms. > **Note:** The `search` parameter results are sourced from an eventually consistent datasource and may not reflect the latest information. 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:
limit- Specifies the number of results returned. Defaults to 10 if `search` is provided. (optional, default to 200)after- The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See [Pagination](https://developer.okta.com/docs/api/#pagination) and [Link header](https://developer.okta.com/docs/api/#link-header). (optional)search- Searches for realms with a supported filtering expression for most properties. Searches for realms can be filtered by the contains (`co`) operator. You can only use `co` with the `profile.name` property. See [Operators](https://developer.okta.com/docs/api/#operators). (optional)sortBy- Specifies the field to sort by and can be any single property (for search queries only) (optional)sortOrder- Specifies sort order: `asc` or `desc` (for search queries only). This parameter is ignored if `sortBy` isn't present. (optional, default to asc)- Returns:
- Iterable<Realm> lazy iterable over all pages
-
listRealmsPaged
public Iterable<Realm> listRealmsPaged(Integer limit, String after, String search, String sortBy, String sortOrder, Map<String, String> additionalHeaders) List all realms (Paginated with additional headers) Lists all realms. > **Note:** The `search` parameter results are sourced from an eventually consistent datasource and may not reflect the latest information. This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks.- Parameters:
limit- Specifies the number of results returned. Defaults to 10 if `search` is provided. (optional, default to 200)after- The cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the `Link` response header. See [Pagination](https://developer.okta.com/docs/api/#pagination) and [Link header](https://developer.okta.com/docs/api/#link-header). (optional)search- Searches for realms with a supported filtering expression for most properties. Searches for realms can be filtered by the contains (`co`) operator. You can only use `co` with the `profile.name` property. See [Operators](https://developer.okta.com/docs/api/#operators). (optional)sortBy- Specifies the field to sort by and can be any single property (for search queries only) (optional)sortOrder- Specifies sort order: `asc` or `desc` (for search queries only). This parameter is ignored if `sortBy` isn't present. (optional, default to asc)additionalHeaders- additional headers for this call- Returns:
- Iterable<Realm> lazy iterable over all pages
-
replaceRealm
Replace the realm profile Replaces the realm profile- Parameters:
realmId- ID of the realm (required)body- (required)- Returns:
- Realm
- Throws:
ApiException- if fails to make API call
-
replaceRealm
public Realm replaceRealm(String realmId, UpdateRealmRequest body, Map<String, String> additionalHeaders) throws ApiExceptionReplace the realm profile Replaces the realm profile- Parameters:
realmId- ID of the realm (required)body- (required)additionalHeaders- additionalHeaders for this call- Returns:
- Realm
- Throws:
ApiException- if fails to make API call
-
getObjectMapper
protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-