
org.camunda.community.rest.client.api.GroupApi Maven / Gradle / Ivy
/*
* Camunda Platform REST API
* OpenApi Spec for Camunda Platform REST API.
*
* The version of the OpenAPI document: 7.21.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.camunda.community.rest.client.api;
import com.fasterxml.jackson.core.type.TypeReference;
import org.camunda.community.rest.client.invoker.ApiException;
import org.camunda.community.rest.client.invoker.ApiClient;
import org.camunda.community.rest.client.invoker.Configuration;
import org.camunda.community.rest.client.invoker.Pair;
import org.camunda.community.rest.client.dto.CountResultDto;
import org.camunda.community.rest.client.dto.ExceptionDto;
import org.camunda.community.rest.client.dto.GroupDto;
import org.camunda.community.rest.client.dto.GroupQueryDto;
import org.camunda.community.rest.client.dto.ResourceOptionsDto;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringJoiner;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-06-27T13:50:23.655629899Z[Etc/UTC]")
public class GroupApi {
private ApiClient apiClient;
public GroupApi() {
this(Configuration.getDefaultApiClient());
}
public GroupApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Group Resource Instance Options
* The `/group` resource supports two custom OPTIONS requests, one for the resource as such and this one for individual group instances. The OPTIONS request allows checking for the set of available operations that the currently authenticated user can perform on the `/group/{id}` resource instance. If the user can perform an operation or not may depend on various things, including the users authorizations to interact with this resource and the internal configuration of the process engine.
* @param id The id of the group. (required)
* @return ResourceOptionsDto
* @throws ApiException if fails to make API call
*/
public ResourceOptionsDto availableGroupInstanceOperations(String id) throws ApiException {
return this.availableGroupInstanceOperations(id, Collections.emptyMap());
}
/**
* Group Resource Instance Options
* The `/group` resource supports two custom OPTIONS requests, one for the resource as such and this one for individual group instances. The OPTIONS request allows checking for the set of available operations that the currently authenticated user can perform on the `/group/{id}` resource instance. If the user can perform an operation or not may depend on various things, including the users authorizations to interact with this resource and the internal configuration of the process engine.
* @param id The id of the group. (required)
* @param additionalHeaders additionalHeaders for this call
* @return ResourceOptionsDto
* @throws ApiException if fails to make API call
*/
public ResourceOptionsDto availableGroupInstanceOperations(String id, Map additionalHeaders) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling availableGroupInstanceOperations");
}
// create path and map variables
String localVarPath = "/group/{id}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
String localVarQueryParameterBaseName;
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
TypeReference localVarReturnType = new TypeReference() {};
return apiClient.invokeAPI(
localVarPath,
"OPTIONS",
localVarQueryParams,
localVarCollectionQueryParams,
localVarQueryStringJoiner.toString(),
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType
);
}
/**
* Group Membership Resource Options
* The OPTIONS request allows checking for the set of available operations that the currently authenticated user can perform on the resource. If the user can perform an operation or not may depend on various things, including the users authorizations to interact with this resource and the internal configuration of the process engine.
* @param id The id of the group. (required)
* @return ResourceOptionsDto
* @throws ApiException if fails to make API call
*/
public ResourceOptionsDto availableGroupMembersOperations(String id) throws ApiException {
return this.availableGroupMembersOperations(id, Collections.emptyMap());
}
/**
* Group Membership Resource Options
* The OPTIONS request allows checking for the set of available operations that the currently authenticated user can perform on the resource. If the user can perform an operation or not may depend on various things, including the users authorizations to interact with this resource and the internal configuration of the process engine.
* @param id The id of the group. (required)
* @param additionalHeaders additionalHeaders for this call
* @return ResourceOptionsDto
* @throws ApiException if fails to make API call
*/
public ResourceOptionsDto availableGroupMembersOperations(String id, Map additionalHeaders) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling availableGroupMembersOperations");
}
// create path and map variables
String localVarPath = "/group/{id}/members"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
String localVarQueryParameterBaseName;
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
TypeReference localVarReturnType = new TypeReference() {};
return apiClient.invokeAPI(
localVarPath,
"OPTIONS",
localVarQueryParams,
localVarCollectionQueryParams,
localVarQueryStringJoiner.toString(),
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType
);
}
/**
* Group Resource Options
* The `/group` resource supports two custom OPTIONS requests, this one for the resource as such and one for individual group instances. The OPTIONS request allows checking for the set of available operations that the currently authenticated user can perform on the `/group` resource. If the user can perform an operation or not may depend on various things, including the users authorizations to interact with this resource and the internal configuration of the process engine.
* @return ResourceOptionsDto
* @throws ApiException if fails to make API call
*/
public ResourceOptionsDto availableGroupOperations() throws ApiException {
return this.availableGroupOperations(Collections.emptyMap());
}
/**
* Group Resource Options
* The `/group` resource supports two custom OPTIONS requests, this one for the resource as such and one for individual group instances. The OPTIONS request allows checking for the set of available operations that the currently authenticated user can perform on the `/group` resource. If the user can perform an operation or not may depend on various things, including the users authorizations to interact with this resource and the internal configuration of the process engine.
* @param additionalHeaders additionalHeaders for this call
* @return ResourceOptionsDto
* @throws ApiException if fails to make API call
*/
public ResourceOptionsDto availableGroupOperations(Map additionalHeaders) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/group";
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
String localVarQueryParameterBaseName;
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
TypeReference localVarReturnType = new TypeReference() {};
return apiClient.invokeAPI(
localVarPath,
"OPTIONS",
localVarQueryParams,
localVarCollectionQueryParams,
localVarQueryStringJoiner.toString(),
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType
);
}
/**
* Create Group
* Creates a new group.
* @param groupDto (optional)
* @throws ApiException if fails to make API call
*/
public void createGroup(GroupDto groupDto) throws ApiException {
this.createGroup(groupDto, Collections.emptyMap());
}
/**
* Create Group
* Creates a new group.
* @param groupDto (optional)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void createGroup(GroupDto groupDto, Map additionalHeaders) throws ApiException {
Object localVarPostBody = groupDto;
// create path and map variables
String localVarPath = "/group/create";
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
String localVarQueryParameterBaseName;
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarQueryStringJoiner.toString(),
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null
);
}
/**
* Create Group Member
* Adds a member to a group.
* @param id The id of the group. (required)
* @param userId The id of user to add to the group. (required)
* @throws ApiException if fails to make API call
*/
public void createGroupMember(String id, String userId) throws ApiException {
this.createGroupMember(id, userId, Collections.emptyMap());
}
/**
* Create Group Member
* Adds a member to a group.
* @param id The id of the group. (required)
* @param userId The id of user to add to the group. (required)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void createGroupMember(String id, String userId, Map additionalHeaders) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling createGroupMember");
}
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling createGroupMember");
}
// create path and map variables
String localVarPath = "/group/{id}/members/{userId}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()))
.replaceAll("\\{" + "userId" + "\\}", apiClient.escapeString(userId.toString()));
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
String localVarQueryParameterBaseName;
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
apiClient.invokeAPI(
localVarPath,
"PUT",
localVarQueryParams,
localVarCollectionQueryParams,
localVarQueryStringJoiner.toString(),
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null
);
}
/**
* Delete Group
* Deletes a group by id.
* @param id The id of the group to be deleted. (required)
* @throws ApiException if fails to make API call
*/
public void deleteGroup(String id) throws ApiException {
this.deleteGroup(id, Collections.emptyMap());
}
/**
* Delete Group
* Deletes a group by id.
* @param id The id of the group to be deleted. (required)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void deleteGroup(String id, Map additionalHeaders) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling deleteGroup");
}
// create path and map variables
String localVarPath = "/group/{id}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
String localVarQueryParameterBaseName;
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
apiClient.invokeAPI(
localVarPath,
"DELETE",
localVarQueryParams,
localVarCollectionQueryParams,
localVarQueryStringJoiner.toString(),
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null
);
}
/**
* Delete a Group Member
* Removes a member from a group.
* @param id The id of the group. (required)
* @param userId The id of user to remove from the group. (required)
* @throws ApiException if fails to make API call
*/
public void deleteGroupMember(String id, String userId) throws ApiException {
this.deleteGroupMember(id, userId, Collections.emptyMap());
}
/**
* Delete a Group Member
* Removes a member from a group.
* @param id The id of the group. (required)
* @param userId The id of user to remove from the group. (required)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void deleteGroupMember(String id, String userId, Map additionalHeaders) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling deleteGroupMember");
}
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(400, "Missing the required parameter 'userId' when calling deleteGroupMember");
}
// create path and map variables
String localVarPath = "/group/{id}/members/{userId}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()))
.replaceAll("\\{" + "userId" + "\\}", apiClient.escapeString(userId.toString()));
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
String localVarQueryParameterBaseName;
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
apiClient.invokeAPI(
localVarPath,
"DELETE",
localVarQueryParams,
localVarCollectionQueryParams,
localVarQueryStringJoiner.toString(),
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null
);
}
/**
* Get Group
* Retrieves a group by id.
* @param id The id of the group to be retrieved. (required)
* @return GroupDto
* @throws ApiException if fails to make API call
*/
public GroupDto getGroup(String id) throws ApiException {
return this.getGroup(id, Collections.emptyMap());
}
/**
* Get Group
* Retrieves a group by id.
* @param id The id of the group to be retrieved. (required)
* @param additionalHeaders additionalHeaders for this call
* @return GroupDto
* @throws ApiException if fails to make API call
*/
public GroupDto getGroup(String id, Map additionalHeaders) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling getGroup");
}
// create path and map variables
String localVarPath = "/group/{id}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
String localVarQueryParameterBaseName;
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
TypeReference localVarReturnType = new TypeReference() {};
return apiClient.invokeAPI(
localVarPath,
"GET",
localVarQueryParams,
localVarCollectionQueryParams,
localVarQueryStringJoiner.toString(),
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType
);
}
/**
* Get List Count
* Queries for groups using a list of parameters and retrieves the count.
* @param id Filter by the id of the group. (optional)
* @param idIn Filter by a comma seperated list of group ids. (optional)
* @param name Filter by the name of the group. (optional)
* @param nameLike Filter by the name that the parameter is a substring of. (optional)
* @param type Filter by the type of the group. (optional)
* @param member Only retrieve groups where the given user id is a member of. (optional)
* @param memberOfTenant Only retrieve groups which are members of the given tenant. (optional)
* @return CountResultDto
* @throws ApiException if fails to make API call
*/
public CountResultDto getGroupCount(String id, String idIn, String name, String nameLike, String type, String member, String memberOfTenant) throws ApiException {
return this.getGroupCount(id, idIn, name, nameLike, type, member, memberOfTenant, Collections.emptyMap());
}
/**
* Get List Count
* Queries for groups using a list of parameters and retrieves the count.
* @param id Filter by the id of the group. (optional)
* @param idIn Filter by a comma seperated list of group ids. (optional)
* @param name Filter by the name of the group. (optional)
* @param nameLike Filter by the name that the parameter is a substring of. (optional)
* @param type Filter by the type of the group. (optional)
* @param member Only retrieve groups where the given user id is a member of. (optional)
* @param memberOfTenant Only retrieve groups which are members of the given tenant. (optional)
* @param additionalHeaders additionalHeaders for this call
* @return CountResultDto
* @throws ApiException if fails to make API call
*/
public CountResultDto getGroupCount(String id, String idIn, String name, String nameLike, String type, String member, String memberOfTenant, Map additionalHeaders) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/group/count";
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
String localVarQueryParameterBaseName;
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPair("id", id));
localVarQueryParams.addAll(apiClient.parameterToPair("idIn", idIn));
localVarQueryParams.addAll(apiClient.parameterToPair("name", name));
localVarQueryParams.addAll(apiClient.parameterToPair("nameLike", nameLike));
localVarQueryParams.addAll(apiClient.parameterToPair("type", type));
localVarQueryParams.addAll(apiClient.parameterToPair("member", member));
localVarQueryParams.addAll(apiClient.parameterToPair("memberOfTenant", memberOfTenant));
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
TypeReference localVarReturnType = new TypeReference() {};
return apiClient.invokeAPI(
localVarPath,
"GET",
localVarQueryParams,
localVarCollectionQueryParams,
localVarQueryStringJoiner.toString(),
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType
);
}
/**
* Get List
* Queries for a list of groups using a list of parameters. The size of the result set can be retrieved by using the [Get Group Count](https://docs.camunda.org/manual/7.21/reference/rest/group/get-query-count) method.
* @param sortBy Sort the results lexicographically by a given criterion. Must be used in conjunction with the sortOrder parameter. (optional)
* @param sortOrder Sort the results in a given order. Values may be asc for ascending order or desc for descending order. Must be used in conjunction with the sortBy parameter. (optional)
* @param firstResult Pagination of results. Specifies the index of the first result to return. (optional)
* @param maxResults Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left. (optional)
* @param id Filter by the id of the group. (optional)
* @param idIn Filter by a comma seperated list of group ids. (optional)
* @param name Filter by the name of the group. (optional)
* @param nameLike Filter by the name that the parameter is a substring of. (optional)
* @param type Filter by the type of the group. (optional)
* @param member Only retrieve groups where the given user id is a member of. (optional)
* @param memberOfTenant Only retrieve groups which are members of the given tenant. (optional)
* @return List<GroupDto>
* @throws ApiException if fails to make API call
*/
public List getQueryGroups(String sortBy, String sortOrder, Integer firstResult, Integer maxResults, String id, String idIn, String name, String nameLike, String type, String member, String memberOfTenant) throws ApiException {
return this.getQueryGroups(sortBy, sortOrder, firstResult, maxResults, id, idIn, name, nameLike, type, member, memberOfTenant, Collections.emptyMap());
}
/**
* Get List
* Queries for a list of groups using a list of parameters. The size of the result set can be retrieved by using the [Get Group Count](https://docs.camunda.org/manual/7.21/reference/rest/group/get-query-count) method.
* @param sortBy Sort the results lexicographically by a given criterion. Must be used in conjunction with the sortOrder parameter. (optional)
* @param sortOrder Sort the results in a given order. Values may be asc for ascending order or desc for descending order. Must be used in conjunction with the sortBy parameter. (optional)
* @param firstResult Pagination of results. Specifies the index of the first result to return. (optional)
* @param maxResults Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left. (optional)
* @param id Filter by the id of the group. (optional)
* @param idIn Filter by a comma seperated list of group ids. (optional)
* @param name Filter by the name of the group. (optional)
* @param nameLike Filter by the name that the parameter is a substring of. (optional)
* @param type Filter by the type of the group. (optional)
* @param member Only retrieve groups where the given user id is a member of. (optional)
* @param memberOfTenant Only retrieve groups which are members of the given tenant. (optional)
* @param additionalHeaders additionalHeaders for this call
* @return List<GroupDto>
* @throws ApiException if fails to make API call
*/
public List getQueryGroups(String sortBy, String sortOrder, Integer firstResult, Integer maxResults, String id, String idIn, String name, String nameLike, String type, String member, String memberOfTenant, Map additionalHeaders) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/group";
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
String localVarQueryParameterBaseName;
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPair("sortBy", sortBy));
localVarQueryParams.addAll(apiClient.parameterToPair("sortOrder", sortOrder));
localVarQueryParams.addAll(apiClient.parameterToPair("firstResult", firstResult));
localVarQueryParams.addAll(apiClient.parameterToPair("maxResults", maxResults));
localVarQueryParams.addAll(apiClient.parameterToPair("id", id));
localVarQueryParams.addAll(apiClient.parameterToPair("idIn", idIn));
localVarQueryParams.addAll(apiClient.parameterToPair("name", name));
localVarQueryParams.addAll(apiClient.parameterToPair("nameLike", nameLike));
localVarQueryParams.addAll(apiClient.parameterToPair("type", type));
localVarQueryParams.addAll(apiClient.parameterToPair("member", member));
localVarQueryParams.addAll(apiClient.parameterToPair("memberOfTenant", memberOfTenant));
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
TypeReference> localVarReturnType = new TypeReference>() {};
return apiClient.invokeAPI(
localVarPath,
"GET",
localVarQueryParams,
localVarCollectionQueryParams,
localVarQueryStringJoiner.toString(),
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType
);
}
/**
* Get List (POST)
* Queries for a list of groups using a list of parameters. The size of the result set can be retrieved by using the [Get Group Count (POST)](https://docs.camunda.org/manual/7.21/reference/rest/group/post-query-count/) method.
* @param firstResult Pagination of results. Specifies the index of the first result to return. (optional)
* @param maxResults Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left. (optional)
* @param groupQueryDto (optional)
* @return List<GroupDto>
* @throws ApiException if fails to make API call
*/
public List postQueryGroups(Integer firstResult, Integer maxResults, GroupQueryDto groupQueryDto) throws ApiException {
return this.postQueryGroups(firstResult, maxResults, groupQueryDto, Collections.emptyMap());
}
/**
* Get List (POST)
* Queries for a list of groups using a list of parameters. The size of the result set can be retrieved by using the [Get Group Count (POST)](https://docs.camunda.org/manual/7.21/reference/rest/group/post-query-count/) method.
* @param firstResult Pagination of results. Specifies the index of the first result to return. (optional)
* @param maxResults Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left. (optional)
* @param groupQueryDto (optional)
* @param additionalHeaders additionalHeaders for this call
* @return List<GroupDto>
* @throws ApiException if fails to make API call
*/
public List postQueryGroups(Integer firstResult, Integer maxResults, GroupQueryDto groupQueryDto, Map additionalHeaders) throws ApiException {
Object localVarPostBody = groupQueryDto;
// create path and map variables
String localVarPath = "/group";
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
String localVarQueryParameterBaseName;
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPair("firstResult", firstResult));
localVarQueryParams.addAll(apiClient.parameterToPair("maxResults", maxResults));
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
TypeReference> localVarReturnType = new TypeReference>() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarQueryStringJoiner.toString(),
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType
);
}
/**
* Get List Count (POST)
* Queries for groups using a list of parameters and retrieves the count.
* @param groupQueryDto (optional)
* @return CountResultDto
* @throws ApiException if fails to make API call
*/
public CountResultDto queryGroupCount(GroupQueryDto groupQueryDto) throws ApiException {
return this.queryGroupCount(groupQueryDto, Collections.emptyMap());
}
/**
* Get List Count (POST)
* Queries for groups using a list of parameters and retrieves the count.
* @param groupQueryDto (optional)
* @param additionalHeaders additionalHeaders for this call
* @return CountResultDto
* @throws ApiException if fails to make API call
*/
public CountResultDto queryGroupCount(GroupQueryDto groupQueryDto, Map additionalHeaders) throws ApiException {
Object localVarPostBody = groupQueryDto;
// create path and map variables
String localVarPath = "/group/count";
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
String localVarQueryParameterBaseName;
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
TypeReference localVarReturnType = new TypeReference() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarQueryStringJoiner.toString(),
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType
);
}
/**
* Update Group
* Updates a given group by id.
* @param id The id of the group. (required)
* @param groupDto (optional)
* @throws ApiException if fails to make API call
*/
public void updateGroup(String id, GroupDto groupDto) throws ApiException {
this.updateGroup(id, groupDto, Collections.emptyMap());
}
/**
* Update Group
* Updates a given group by id.
* @param id The id of the group. (required)
* @param groupDto (optional)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void updateGroup(String id, GroupDto groupDto, Map additionalHeaders) throws ApiException {
Object localVarPostBody = groupDto;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling updateGroup");
}
// create path and map variables
String localVarPath = "/group/{id}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
String localVarQueryParameterBaseName;
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
apiClient.invokeAPI(
localVarPath,
"PUT",
localVarQueryParams,
localVarCollectionQueryParams,
localVarQueryStringJoiner.toString(),
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null
);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy