Package com.okta.sdk.resource.api
Class GroupApi
java.lang.Object
com.okta.sdk.resource.api.GroupApi
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2024-09-23T08:35:59.300824-05:00[America/Chicago]",
comments="Generator version: 7.8.0")
public class GroupApi
extends Object
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddGroup
(AddGroupRequest group) Add a Group Adds a new Group with the `OKTA_GROUP` type to your org > **Note:** App import operations are responsible for syncing Groups with `APP_GROUP` type such as Active Directory Groups.addGroup
(AddGroupRequest group, Map<String, String> additionalHeaders) Add a Group Adds a new Group with the `OKTA_GROUP` type to your org > **Note:** App import operations are responsible for syncing Groups with `APP_GROUP` type such as Active Directory Groups.void
assignUserToGroup
(String groupId, String userId) Assign a User to a Group Assigns a User to a Group with the `OKTA_GROUP` type > **Note:** You only can modify memberships for Groups of the `OKTA_GROUP` type.void
Assign a User to a Group Assigns a User to a Group with the `OKTA_GROUP` type > **Note:** You only can modify memberships for Groups of the `OKTA_GROUP` type.void
deleteGroup
(String groupId) Delete a Group Deletes a Group of the `OKTA_GROUP` or `APP_GROUP` type from your org > **Note:** You can't remove Groups of type `APP_GROUP` if they are used in a group push mapping.void
deleteGroup
(String groupId, Map<String, String> additionalHeaders) Delete a Group Deletes a Group of the `OKTA_GROUP` or `APP_GROUP` type from your org > **Note:** You can't remove Groups of type `APP_GROUP` if they are used in a group push mapping.Retrieve a Group Retrieves a specific Group by `id` from your orgRetrieve a Group Retrieves a specific Group by `id` from your orgprotected static com.fasterxml.jackson.databind.ObjectMapper
listAssignedApplicationsForGroup
(String groupId, String after, Integer limit) List all Assigned Applications Lists all apps that are assigned to a Group.listAssignedApplicationsForGroup
(String groupId, String after, Integer limit, Map<String, String> additionalHeaders) List all Assigned Applications Lists all apps that are assigned to a Group.listGroups
(String q, String filter, String after, Integer limit, String expand, String search, String sortBy, String sortOrder) List all Groups Lists all Groups with pagination support.listGroups
(String q, String filter, String after, Integer limit, String expand, String search, String sortBy, String sortOrder, Map<String, String> additionalHeaders) List all Groups Lists all Groups with pagination support.listGroupUsers
(String groupId, String after, Integer limit) List all Member Users Lists all users that are a member of a Group.List all Member Users Lists all users that are a member of a Group.replaceGroup
(String groupId, AddGroupRequest group) Replace a Group Replaces the profile for a Group of `OKTA_GROUP` type from your org > **Note :** You only can modify profiles for groups of the `OKTA_GROUP` type.replaceGroup
(String groupId, AddGroupRequest group, Map<String, String> additionalHeaders) Replace a Group Replaces the profile for a Group of `OKTA_GROUP` type from your org > **Note :** You only can modify profiles for groups of the `OKTA_GROUP` type.void
setApiClient
(ApiClient apiClient) void
unassignUserFromGroup
(String groupId, String userId) Unassign a User from a Group Unassigns a User from a Group with the `OKTA_GROUP` type > **Note:** You only can modify memberships for groups of the `OKTA_GROUP` type.void
Unassign a User from a Group Unassigns a User from a Group with the `OKTA_GROUP` type > **Note:** You only can modify memberships for groups of the `OKTA_GROUP` type.
-
Constructor Details
-
GroupApi
public GroupApi() -
GroupApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
addGroup
Add a Group Adds a new Group with the `OKTA_GROUP` type to your org > **Note:** App import operations are responsible for syncing Groups with `APP_GROUP` type such as Active Directory Groups. See [About groups](https://help.okta.com/okta_help.htm?id=Directory_Groups).- Parameters:
group
- (required)- Returns:
- Group
- Throws:
ApiException
- if fails to make API call
-
addGroup
public Group addGroup(AddGroupRequest group, Map<String, String> additionalHeaders) throws ApiExceptionAdd a Group Adds a new Group with the `OKTA_GROUP` type to your org > **Note:** App import operations are responsible for syncing Groups with `APP_GROUP` type such as Active Directory Groups. See [About groups](https://help.okta.com/okta_help.htm?id=Directory_Groups).- Parameters:
group
- (required)additionalHeaders
- additionalHeaders for this call- Returns:
- Group
- Throws:
ApiException
- if fails to make API call
-
assignUserToGroup
Assign a User to a Group Assigns a User to a Group with the `OKTA_GROUP` type > **Note:** You only can modify memberships for Groups of the `OKTA_GROUP` type. App imports are responsible for managing group memberships for Groups of the `APP_GROUP` type, such as Active Directory groups.- Parameters:
groupId
- The `id` of the group (required)userId
- ID of an existing Okta user (required)- Throws:
ApiException
- if fails to make API call
-
assignUserToGroup
public void assignUserToGroup(String groupId, String userId, Map<String, String> additionalHeaders) throws ApiExceptionAssign a User to a Group Assigns a User to a Group with the `OKTA_GROUP` type > **Note:** You only can modify memberships for Groups of the `OKTA_GROUP` type. App imports are responsible for managing group memberships for Groups of the `APP_GROUP` type, such as Active Directory groups.- Parameters:
groupId
- The `id` of the group (required)userId
- ID of an existing Okta user (required)additionalHeaders
- additionalHeaders for this call- Throws:
ApiException
- if fails to make API call
-
deleteGroup
Delete a Group Deletes a Group of the `OKTA_GROUP` or `APP_GROUP` type from your org > **Note:** You can't remove Groups of type `APP_GROUP` if they are used in a group push mapping.- Parameters:
groupId
- The `id` of the group (required)- Throws:
ApiException
- if fails to make API call
-
deleteGroup
Delete a Group Deletes a Group of the `OKTA_GROUP` or `APP_GROUP` type from your org > **Note:** You can't remove Groups of type `APP_GROUP` if they are used in a group push mapping.- Parameters:
groupId
- The `id` of the group (required)additionalHeaders
- additionalHeaders for this call- Throws:
ApiException
- if fails to make API call
-
getGroup
Retrieve a Group Retrieves a specific Group by `id` from your org- Parameters:
groupId
- The `id` of the group (required)- Returns:
- Group
- Throws:
ApiException
- if fails to make API call
-
getGroup
Retrieve a Group Retrieves a specific Group by `id` from your org- Parameters:
groupId
- The `id` of the group (required)additionalHeaders
- additionalHeaders for this call- Returns:
- Group
- Throws:
ApiException
- if fails to make API call
-
listAssignedApplicationsForGroup
public List<Application> listAssignedApplicationsForGroup(String groupId, String after, Integer limit) throws ApiException List all Assigned Applications Lists all apps that are assigned to a Group. See [Application Groups API](/openapi/okta-management/management/tag/ApplicationGroups/).- Parameters:
groupId
- The `id` of the group (required)after
- Specifies the pagination cursor for the next page of apps (optional)limit
- Specifies the number of app results for a page (optional, default to 20)- Returns:
- List<Application>
- Throws:
ApiException
- if fails to make API call
-
listAssignedApplicationsForGroup
public List<Application> listAssignedApplicationsForGroup(String groupId, String after, Integer limit, Map<String, String> additionalHeaders) throws ApiExceptionList all Assigned Applications Lists all apps that are assigned to a Group. See [Application Groups API](/openapi/okta-management/management/tag/ApplicationGroups/).- Parameters:
groupId
- The `id` of the group (required)after
- Specifies the pagination cursor for the next page of apps (optional)limit
- Specifies the number of app results for a page (optional, default to 20)additionalHeaders
- additionalHeaders for this call- Returns:
- List<Application>
- Throws:
ApiException
- if fails to make API call
-
listGroupUsers
List all Member Users Lists all users that are a member of a Group. The default user limit is set to a very high number due to historical reasons that are no longer valid for most orgs. This will change in a future version of this API. The recommended page limit is now `limit=200`.- Parameters:
groupId
- The `id` of the group (required)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). (optional)limit
- Specifies the number of user results in a page (optional, default to 1000)- Returns:
- List<User>
- Throws:
ApiException
- if fails to make API call
-
listGroupUsers
public List<User> listGroupUsers(String groupId, String after, Integer limit, Map<String, String> additionalHeaders) throws ApiExceptionList all Member Users Lists all users that are a member of a Group. The default user limit is set to a very high number due to historical reasons that are no longer valid for most orgs. This will change in a future version of this API. The recommended page limit is now `limit=200`.- Parameters:
groupId
- The `id` of the group (required)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). (optional)limit
- Specifies the number of user results in a page (optional, default to 1000)additionalHeaders
- additionalHeaders for this call- Returns:
- List<User>
- Throws:
ApiException
- if fails to make API call
-
listGroups
public List<Group> listGroups(String q, String filter, String after, Integer limit, String expand, String search, String sortBy, String sortOrder) throws ApiException List all Groups Lists all Groups with pagination support. The number of Groups returned depends on the specified [`limit`](/openapi/okta-management/management/tag/Group/#tag/Group/operation/listGroups!in=query&path=limit&t=request), if you have a search, filter, and/or query parameter set, and if that parameter is not null. We recommend using a limit less than or equal to 200. A subset of Groups can be returned that match a supported filter expression, query, or search criteria. > **Note:** Results from the filter or query parameter are driven from an eventually consistent datasource. The synchronization lag is typically less than one second. See [Filtering](https://developer.okta.com/docs/api/#filter) for more information on expressions.- Parameters:
q
- Finds a Group that matches the `name` property > **Note:** Paging and searching are currently mutually exclusive. You can't page a query. The default limit for a query is 300 results. Query is intended for an auto-complete picker use case where users refine their search string to constrain the results. (optional)filter
- [Filter expression](https://developer.okta.com/docs/reference/core-okta-api/#filter) for Groups > **Note:** All filters must be [URL encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). For example, `filter=lastUpdated gt \"2013-06-01T00:00:00.000Z\"` is encoded as `filter=lastUpdated%20gt%20%222013-06-01T00:00:00.000Z%22`. (optional)after
- Specifies the pagination cursor for the next page of Groups. The `after` cursor should be treated as an opaque value and obtained through the next link relation. See [Pagination](https://developer.okta.com/docs/api/#pagination). (optional)limit
- Specifies the number of Group results in a page. Don't write code that depends on the default or maximum value, as it might change. If you receive an `HTTP 500` status code, you likely exceeded the request timeout. Retry your request with a smaller `limit` and [page the results](https://developer.okta.com/docs/api/#pagination). The Okta default Everyone group isn't returned for users with a Group Admin role. >**Note:** We strongly encourage using a limit that's less than or equal to 200. Any number greater than 200 affects performance and accuracy. (optional)expand
- If specified, additional metadata is included in the response. Possible values are `stats` and `app`. (optional)search
- Searches for groups with a supported [filtering](https://developer.okta.com/docs/reference/core-okta-api/#filter) expression for all attributes except for `_embedded`, `_links`, and `objectClass`. Search currently performs a `startsWith` match but it should be considered an implementation detail and might change without notice in the future. This operation supports [pagination](https://developer.okta.com/docs/api/#pagination). Using search requires [URL encoding](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding), for example, `search=type eq \"OKTA_GROUP\"` is encoded as `search=type+eq+%22OKTA_GROUP%22`. This operation searches many properties: * Any group profile property, including imported app group profile properties. * The top-level properties `id`, `created`, `lastMembershipUpdated`, `lastUpdated`, and `type`. * The [source](/openapi/okta-management/management/tag/Group/#tag/Group/operation/listGroups!c=200&path=_links/source&t=response) of groups with type of `APP_GROUP`, accessed as `source.id`. You can also use `sortBy` and `sortOrder` parameters. (optional)sortBy
- Specifies field to sort by **(for search queries only)**. `sortBy` can be any single property, for example `sortBy=profile.name`. (optional)sortOrder
- Specifies sort order: `asc` or `desc` (for search queries only). This parameter is ignored if if `sortBy` is not present. Groups with the same value for the `sortBy` property will be ordered by `id` (optional, default to asc)- Returns:
- List<Group>
- Throws:
ApiException
- if fails to make API call
-
listGroups
public List<Group> listGroups(String q, String filter, String after, Integer limit, String expand, String search, String sortBy, String sortOrder, Map<String, String> additionalHeaders) throws ApiExceptionList all Groups Lists all Groups with pagination support. The number of Groups returned depends on the specified [`limit`](/openapi/okta-management/management/tag/Group/#tag/Group/operation/listGroups!in=query&path=limit&t=request), if you have a search, filter, and/or query parameter set, and if that parameter is not null. We recommend using a limit less than or equal to 200. A subset of Groups can be returned that match a supported filter expression, query, or search criteria. > **Note:** Results from the filter or query parameter are driven from an eventually consistent datasource. The synchronization lag is typically less than one second. See [Filtering](https://developer.okta.com/docs/api/#filter) for more information on expressions.- Parameters:
q
- Finds a Group that matches the `name` property > **Note:** Paging and searching are currently mutually exclusive. You can't page a query. The default limit for a query is 300 results. Query is intended for an auto-complete picker use case where users refine their search string to constrain the results. (optional)filter
- [Filter expression](https://developer.okta.com/docs/reference/core-okta-api/#filter) for Groups > **Note:** All filters must be [URL encoded](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding). For example, `filter=lastUpdated gt \"2013-06-01T00:00:00.000Z\"` is encoded as `filter=lastUpdated%20gt%20%222013-06-01T00:00:00.000Z%22`. (optional)after
- Specifies the pagination cursor for the next page of Groups. The `after` cursor should be treated as an opaque value and obtained through the next link relation. See [Pagination](https://developer.okta.com/docs/api/#pagination). (optional)limit
- Specifies the number of Group results in a page. Don't write code that depends on the default or maximum value, as it might change. If you receive an `HTTP 500` status code, you likely exceeded the request timeout. Retry your request with a smaller `limit` and [page the results](https://developer.okta.com/docs/api/#pagination). The Okta default Everyone group isn't returned for users with a Group Admin role. >**Note:** We strongly encourage using a limit that's less than or equal to 200. Any number greater than 200 affects performance and accuracy. (optional)expand
- If specified, additional metadata is included in the response. Possible values are `stats` and `app`. (optional)search
- Searches for groups with a supported [filtering](https://developer.okta.com/docs/reference/core-okta-api/#filter) expression for all attributes except for `_embedded`, `_links`, and `objectClass`. Search currently performs a `startsWith` match but it should be considered an implementation detail and might change without notice in the future. This operation supports [pagination](https://developer.okta.com/docs/api/#pagination). Using search requires [URL encoding](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding), for example, `search=type eq \"OKTA_GROUP\"` is encoded as `search=type+eq+%22OKTA_GROUP%22`. This operation searches many properties: * Any group profile property, including imported app group profile properties. * The top-level properties `id`, `created`, `lastMembershipUpdated`, `lastUpdated`, and `type`. * The [source](/openapi/okta-management/management/tag/Group/#tag/Group/operation/listGroups!c=200&path=_links/source&t=response) of groups with type of `APP_GROUP`, accessed as `source.id`. You can also use `sortBy` and `sortOrder` parameters. (optional)sortBy
- Specifies field to sort by **(for search queries only)**. `sortBy` can be any single property, for example `sortBy=profile.name`. (optional)sortOrder
- Specifies sort order: `asc` or `desc` (for search queries only). This parameter is ignored if if `sortBy` is not present. Groups with the same value for the `sortBy` property will be ordered by `id` (optional, default to asc)additionalHeaders
- additionalHeaders for this call- Returns:
- List<Group>
- Throws:
ApiException
- if fails to make API call
-
replaceGroup
Replace a Group Replaces the profile for a Group of `OKTA_GROUP` type from your org > **Note :** You only can modify profiles for groups of the `OKTA_GROUP` type. > > App imports are responsible for updating profiles for groups of the `APP_GROUP` type, such as Active Directory groups.- Parameters:
groupId
- The `id` of the group (required)group
- (required)- Returns:
- Group
- Throws:
ApiException
- if fails to make API call
-
replaceGroup
public Group replaceGroup(String groupId, AddGroupRequest group, Map<String, String> additionalHeaders) throws ApiExceptionReplace a Group Replaces the profile for a Group of `OKTA_GROUP` type from your org > **Note :** You only can modify profiles for groups of the `OKTA_GROUP` type. > > App imports are responsible for updating profiles for groups of the `APP_GROUP` type, such as Active Directory groups.- Parameters:
groupId
- The `id` of the group (required)group
- (required)additionalHeaders
- additionalHeaders for this call- Returns:
- Group
- Throws:
ApiException
- if fails to make API call
-
unassignUserFromGroup
Unassign a User from a Group Unassigns a User from a Group with the `OKTA_GROUP` type > **Note:** You only can modify memberships for groups of the `OKTA_GROUP` type. > > App imports are responsible for managing group memberships for groups of the `APP_GROUP` type, such as Active Directory groups.- Parameters:
groupId
- The `id` of the group (required)userId
- ID of an existing Okta user (required)- Throws:
ApiException
- if fails to make API call
-
unassignUserFromGroup
public void unassignUserFromGroup(String groupId, String userId, Map<String, String> additionalHeaders) throws ApiExceptionUnassign a User from a Group Unassigns a User from a Group with the `OKTA_GROUP` type > **Note:** You only can modify memberships for groups of the `OKTA_GROUP` type. > > App imports are responsible for managing group memberships for groups of the `APP_GROUP` type, such as Active Directory groups.- Parameters:
groupId
- The `id` of the group (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()
-