Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Camunda Platform REST API
* OpenApi Spec for Camunda Platform REST API.
*
* The version of the OpenAPI document: 7.19.0-alpha2
*
*
* 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.openapitools.client.api;
import org.openapitools.client.ApiCallback;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import org.openapitools.client.ProgressRequestBody;
import org.openapitools.client.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import org.openapitools.client.model.AuthorizationCheckResultDto;
import org.openapitools.client.model.AuthorizationCreateDto;
import org.openapitools.client.model.AuthorizationDto;
import org.openapitools.client.model.AuthorizationUpdateDto;
import org.openapitools.client.model.CountResultDto;
import org.openapitools.client.model.ExceptionDto;
import org.openapitools.client.model.ResourceOptionsDto;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class AuthorizationApi {
private ApiClient localVarApiClient;
public AuthorizationApi() {
this(Configuration.getDefaultApiClient());
}
public AuthorizationApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
/**
* Build call for availableOperationsAuthorization
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
*/
public okhttp3.Call availableOperationsAuthorizationCall(final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/authorization";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basicAuth" };
return localVarApiClient.buildCall(localVarPath, "OPTIONS", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call availableOperationsAuthorizationValidateBeforeCall(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = availableOperationsAuthorizationCall(_callback);
return localVarCall;
}
/**
* Authorization Resource Options
* The OPTIONS request allows you to check for the set of available operations that the currently authenticated user can perform on the `/authorization` resource. Whether the user can perform an operation or not may depend on various factors, including the users authorizations to interact with this resource and the internal configuration of the process engine.
* @return ResourceOptionsDto
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
*/
public ResourceOptionsDto availableOperationsAuthorization() throws ApiException {
ApiResponse localVarResp = availableOperationsAuthorizationWithHttpInfo();
return localVarResp.getData();
}
/**
* Authorization Resource Options
* The OPTIONS request allows you to check for the set of available operations that the currently authenticated user can perform on the `/authorization` resource. Whether the user can perform an operation or not may depend on various factors, including the users authorizations to interact with this resource and the internal configuration of the process engine.
* @return ApiResponse<ResourceOptionsDto>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
*/
public ApiResponse availableOperationsAuthorizationWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = availableOperationsAuthorizationValidateBeforeCall(null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Authorization Resource Options (asynchronously)
* The OPTIONS request allows you to check for the set of available operations that the currently authenticated user can perform on the `/authorization` resource. Whether the user can perform an operation or not may depend on various factors, including the users authorizations to interact with this resource and the internal configuration of the process engine.
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
*/
public okhttp3.Call availableOperationsAuthorizationAsync(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = availableOperationsAuthorizationValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for availableOperationsAuthorizationInstance
* @param id The id of the authorization to be retrieved. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
*/
public okhttp3.Call availableOperationsAuthorizationInstanceCall(String id, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/authorization/{id}"
.replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basicAuth" };
return localVarApiClient.buildCall(localVarPath, "OPTIONS", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call availableOperationsAuthorizationInstanceValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling availableOperationsAuthorizationInstance(Async)");
}
okhttp3.Call localVarCall = availableOperationsAuthorizationInstanceCall(id, _callback);
return localVarCall;
}
/**
* Authorization Resource Options
* The OPTIONS request allows you to check for the set of available operations that the currently authenticated user can perform on a given instance of the `/authorization` resource. Whether the user can perform an operation or not may depend on various factors, including the users authorizations to interact with this resource and the internal configuration of the process engine.
* @param id The id of the authorization to be retrieved. (required)
* @return ResourceOptionsDto
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
*/
public ResourceOptionsDto availableOperationsAuthorizationInstance(String id) throws ApiException {
ApiResponse localVarResp = availableOperationsAuthorizationInstanceWithHttpInfo(id);
return localVarResp.getData();
}
/**
* Authorization Resource Options
* The OPTIONS request allows you to check for the set of available operations that the currently authenticated user can perform on a given instance of the `/authorization` resource. Whether the user can perform an operation or not may depend on various factors, including the users authorizations to interact with this resource and the internal configuration of the process engine.
* @param id The id of the authorization to be retrieved. (required)
* @return ApiResponse<ResourceOptionsDto>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
*/
public ApiResponse availableOperationsAuthorizationInstanceWithHttpInfo(String id) throws ApiException {
okhttp3.Call localVarCall = availableOperationsAuthorizationInstanceValidateBeforeCall(id, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Authorization Resource Options (asynchronously)
* The OPTIONS request allows you to check for the set of available operations that the currently authenticated user can perform on a given instance of the `/authorization` resource. Whether the user can perform an operation or not may depend on various factors, including the users authorizations to interact with this resource and the internal configuration of the process engine.
* @param id The id of the authorization to be retrieved. (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
*/
public okhttp3.Call availableOperationsAuthorizationInstanceAsync(String id, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = availableOperationsAuthorizationInstanceValidateBeforeCall(id, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for createAuthorization
* @param authorizationCreateDto (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
400
Returned if some of the properties in the request body are invalid, for example if a permission parameter is not valid for the provided resourceType. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
403
The authenticated user is unauthorized to create an instance of this resource. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
500
The authorization could not be updated due to an internal server error. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public okhttp3.Call createAuthorizationCall(AuthorizationCreateDto authorizationCreateDto, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = authorizationCreateDto;
// create path and map variables
String localVarPath = "/authorization/create";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basicAuth" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call createAuthorizationValidateBeforeCall(AuthorizationCreateDto authorizationCreateDto, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createAuthorizationCall(authorizationCreateDto, _callback);
return localVarCall;
}
/**
* Create a New Authorization
* Creates a new authorization.
* @param authorizationCreateDto (optional)
* @return AuthorizationDto
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
400
Returned if some of the properties in the request body are invalid, for example if a permission parameter is not valid for the provided resourceType. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
403
The authenticated user is unauthorized to create an instance of this resource. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
500
The authorization could not be updated due to an internal server error. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public AuthorizationDto createAuthorization(AuthorizationCreateDto authorizationCreateDto) throws ApiException {
ApiResponse localVarResp = createAuthorizationWithHttpInfo(authorizationCreateDto);
return localVarResp.getData();
}
/**
* Create a New Authorization
* Creates a new authorization.
* @param authorizationCreateDto (optional)
* @return ApiResponse<AuthorizationDto>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
400
Returned if some of the properties in the request body are invalid, for example if a permission parameter is not valid for the provided resourceType. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
403
The authenticated user is unauthorized to create an instance of this resource. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
500
The authorization could not be updated due to an internal server error. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public ApiResponse createAuthorizationWithHttpInfo(AuthorizationCreateDto authorizationCreateDto) throws ApiException {
okhttp3.Call localVarCall = createAuthorizationValidateBeforeCall(authorizationCreateDto, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Create a New Authorization (asynchronously)
* Creates a new authorization.
* @param authorizationCreateDto (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
400
Returned if some of the properties in the request body are invalid, for example if a permission parameter is not valid for the provided resourceType. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
403
The authenticated user is unauthorized to create an instance of this resource. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
500
The authorization could not be updated due to an internal server error. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public okhttp3.Call createAuthorizationAsync(AuthorizationCreateDto authorizationCreateDto, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createAuthorizationValidateBeforeCall(authorizationCreateDto, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for deleteAuthorization
* @param id The id of the authorization to be deleted. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
204
Request successful. This method returns no content.
-
403
If the authenticated user is unauthorized to delete the resource instance. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
404
Authorization cannot be found. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public okhttp3.Call deleteAuthorizationCall(String id, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/authorization/{id}"
.replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basicAuth" };
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call deleteAuthorizationValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling deleteAuthorization(Async)");
}
okhttp3.Call localVarCall = deleteAuthorizationCall(id, _callback);
return localVarCall;
}
/**
* Delete Authorization
* Deletes an authorization by id.
* @param id The id of the authorization to be deleted. (required)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
Request successful. This method returns no content.
-
403
If the authenticated user is unauthorized to delete the resource instance. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
404
Authorization cannot be found. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public void deleteAuthorization(String id) throws ApiException {
deleteAuthorizationWithHttpInfo(id);
}
/**
* Delete Authorization
* Deletes an authorization by id.
* @param id The id of the authorization to be deleted. (required)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
Request successful. This method returns no content.
-
403
If the authenticated user is unauthorized to delete the resource instance. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
404
Authorization cannot be found. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public ApiResponse deleteAuthorizationWithHttpInfo(String id) throws ApiException {
okhttp3.Call localVarCall = deleteAuthorizationValidateBeforeCall(id, null);
return localVarApiClient.execute(localVarCall);
}
/**
* Delete Authorization (asynchronously)
* Deletes an authorization by id.
* @param id The id of the authorization to be deleted. (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
204
Request successful. This method returns no content.
-
403
If the authenticated user is unauthorized to delete the resource instance. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
404
Authorization cannot be found. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public okhttp3.Call deleteAuthorizationAsync(String id, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteAuthorizationValidateBeforeCall(id, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for getAuthorization
* @param id The id of the authorization to be retrieved. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
404
Authorization with given id does not exist. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public okhttp3.Call getAuthorizationCall(String id, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/authorization/{id}"
.replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basicAuth" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getAuthorizationValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling getAuthorization(Async)");
}
okhttp3.Call localVarCall = getAuthorizationCall(id, _callback);
return localVarCall;
}
/**
* Get Authorization
* Retrieves an authorization by id.
* @param id The id of the authorization to be retrieved. (required)
* @return AuthorizationDto
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
404
Authorization with given id does not exist. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public AuthorizationDto getAuthorization(String id) throws ApiException {
ApiResponse localVarResp = getAuthorizationWithHttpInfo(id);
return localVarResp.getData();
}
/**
* Get Authorization
* Retrieves an authorization by id.
* @param id The id of the authorization to be retrieved. (required)
* @return ApiResponse<AuthorizationDto>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
404
Authorization with given id does not exist. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public ApiResponse getAuthorizationWithHttpInfo(String id) throws ApiException {
okhttp3.Call localVarCall = getAuthorizationValidateBeforeCall(id, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get Authorization (asynchronously)
* Retrieves an authorization by id.
* @param id The id of the authorization to be retrieved. (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
404
Authorization with given id does not exist. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public okhttp3.Call getAuthorizationAsync(String id, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getAuthorizationValidateBeforeCall(id, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getAuthorizationCount
* @param id Filter by the id of the authorization. (optional)
* @param type Filter by authorization type. (0=global, 1=grant, 2=revoke). See the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/#authorization-type) for more information about authorization types. (optional)
* @param userIdIn Filter by a comma-separated list of userIds. (optional)
* @param groupIdIn Filter by a comma-separated list of groupIds. (optional)
* @param resourceType Filter by an integer representation of the resource type. See the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/#resources) for a list of integer representations of resource types. (optional)
* @param resourceId Filter by resource id. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
400
Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied, but no `sortBy` is specified. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public okhttp3.Call getAuthorizationCountCall(String id, Integer type, String userIdIn, String groupIdIn, Integer resourceType, String resourceId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/authorization/count";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (id != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id));
}
if (type != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
}
if (userIdIn != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("userIdIn", userIdIn));
}
if (groupIdIn != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupIdIn", groupIdIn));
}
if (resourceType != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceType", resourceType));
}
if (resourceId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceId", resourceId));
}
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basicAuth" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getAuthorizationCountValidateBeforeCall(String id, Integer type, String userIdIn, String groupIdIn, Integer resourceType, String resourceId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getAuthorizationCountCall(id, type, userIdIn, groupIdIn, resourceType, resourceId, _callback);
return localVarCall;
}
/**
* Get Authorization Count
* Queries for authorizations using a list of parameters and retrieves the count.
* @param id Filter by the id of the authorization. (optional)
* @param type Filter by authorization type. (0=global, 1=grant, 2=revoke). See the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/#authorization-type) for more information about authorization types. (optional)
* @param userIdIn Filter by a comma-separated list of userIds. (optional)
* @param groupIdIn Filter by a comma-separated list of groupIds. (optional)
* @param resourceType Filter by an integer representation of the resource type. See the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/#resources) for a list of integer representations of resource types. (optional)
* @param resourceId Filter by resource id. (optional)
* @return CountResultDto
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
400
Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied, but no `sortBy` is specified. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public CountResultDto getAuthorizationCount(String id, Integer type, String userIdIn, String groupIdIn, Integer resourceType, String resourceId) throws ApiException {
ApiResponse localVarResp = getAuthorizationCountWithHttpInfo(id, type, userIdIn, groupIdIn, resourceType, resourceId);
return localVarResp.getData();
}
/**
* Get Authorization Count
* Queries for authorizations using a list of parameters and retrieves the count.
* @param id Filter by the id of the authorization. (optional)
* @param type Filter by authorization type. (0=global, 1=grant, 2=revoke). See the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/#authorization-type) for more information about authorization types. (optional)
* @param userIdIn Filter by a comma-separated list of userIds. (optional)
* @param groupIdIn Filter by a comma-separated list of groupIds. (optional)
* @param resourceType Filter by an integer representation of the resource type. See the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/#resources) for a list of integer representations of resource types. (optional)
* @param resourceId Filter by resource id. (optional)
* @return ApiResponse<CountResultDto>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
400
Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied, but no `sortBy` is specified. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public ApiResponse getAuthorizationCountWithHttpInfo(String id, Integer type, String userIdIn, String groupIdIn, Integer resourceType, String resourceId) throws ApiException {
okhttp3.Call localVarCall = getAuthorizationCountValidateBeforeCall(id, type, userIdIn, groupIdIn, resourceType, resourceId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get Authorization Count (asynchronously)
* Queries for authorizations using a list of parameters and retrieves the count.
* @param id Filter by the id of the authorization. (optional)
* @param type Filter by authorization type. (0=global, 1=grant, 2=revoke). See the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/#authorization-type) for more information about authorization types. (optional)
* @param userIdIn Filter by a comma-separated list of userIds. (optional)
* @param groupIdIn Filter by a comma-separated list of groupIds. (optional)
* @param resourceType Filter by an integer representation of the resource type. See the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/#resources) for a list of integer representations of resource types. (optional)
* @param resourceId Filter by resource id. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
400
Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied, but no `sortBy` is specified. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public okhttp3.Call getAuthorizationCountAsync(String id, Integer type, String userIdIn, String groupIdIn, Integer resourceType, String resourceId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getAuthorizationCountValidateBeforeCall(id, type, userIdIn, groupIdIn, resourceType, resourceId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for isUserAuthorized
* @param permissionName String value representing the permission name to check for. (required)
* @param resourceName String value for the name of the resource to check permissions for. (required)
* @param resourceType An integer representing the resource type to check permissions for. See the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/#resources) for a list of integer representations of resource types. (required)
* @param resourceId The id of the resource to check permissions for. If left blank, a check for global permissions on the resource is performed. (optional)
* @param userId The id of the user to check permissions for. The currently authenticated user must have a READ permission for the Authorization resource. If `userId` is blank, a check for the currently authenticated user is performed. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
400
Returned if some of the query parameters are invalid, for example if a permission parameterName is not valid for the provided resourceType. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
401
The user is not authenticated. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
403
When a `userId` is passed and the user does not possess a READ permission for the Authorization resource. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
404
Authorization with given id does not exist. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public okhttp3.Call isUserAuthorizedCall(String permissionName, String resourceName, Integer resourceType, String resourceId, String userId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/authorization/check";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (permissionName != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("permissionName", permissionName));
}
if (resourceName != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceName", resourceName));
}
if (resourceType != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceType", resourceType));
}
if (resourceId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceId", resourceId));
}
if (userId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId));
}
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basicAuth" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call isUserAuthorizedValidateBeforeCall(String permissionName, String resourceName, Integer resourceType, String resourceId, String userId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'permissionName' is set
if (permissionName == null) {
throw new ApiException("Missing the required parameter 'permissionName' when calling isUserAuthorized(Async)");
}
// verify the required parameter 'resourceName' is set
if (resourceName == null) {
throw new ApiException("Missing the required parameter 'resourceName' when calling isUserAuthorized(Async)");
}
// verify the required parameter 'resourceType' is set
if (resourceType == null) {
throw new ApiException("Missing the required parameter 'resourceType' when calling isUserAuthorized(Async)");
}
okhttp3.Call localVarCall = isUserAuthorizedCall(permissionName, resourceName, resourceType, resourceId, userId, _callback);
return localVarCall;
}
/**
* Perform an Authorization Check
* Performs an authorization check for the currently authenticated user.
* @param permissionName String value representing the permission name to check for. (required)
* @param resourceName String value for the name of the resource to check permissions for. (required)
* @param resourceType An integer representing the resource type to check permissions for. See the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/#resources) for a list of integer representations of resource types. (required)
* @param resourceId The id of the resource to check permissions for. If left blank, a check for global permissions on the resource is performed. (optional)
* @param userId The id of the user to check permissions for. The currently authenticated user must have a READ permission for the Authorization resource. If `userId` is blank, a check for the currently authenticated user is performed. (optional)
* @return AuthorizationCheckResultDto
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
400
Returned if some of the query parameters are invalid, for example if a permission parameterName is not valid for the provided resourceType. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
401
The user is not authenticated. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
403
When a `userId` is passed and the user does not possess a READ permission for the Authorization resource. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
404
Authorization with given id does not exist. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public AuthorizationCheckResultDto isUserAuthorized(String permissionName, String resourceName, Integer resourceType, String resourceId, String userId) throws ApiException {
ApiResponse localVarResp = isUserAuthorizedWithHttpInfo(permissionName, resourceName, resourceType, resourceId, userId);
return localVarResp.getData();
}
/**
* Perform an Authorization Check
* Performs an authorization check for the currently authenticated user.
* @param permissionName String value representing the permission name to check for. (required)
* @param resourceName String value for the name of the resource to check permissions for. (required)
* @param resourceType An integer representing the resource type to check permissions for. See the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/#resources) for a list of integer representations of resource types. (required)
* @param resourceId The id of the resource to check permissions for. If left blank, a check for global permissions on the resource is performed. (optional)
* @param userId The id of the user to check permissions for. The currently authenticated user must have a READ permission for the Authorization resource. If `userId` is blank, a check for the currently authenticated user is performed. (optional)
* @return ApiResponse<AuthorizationCheckResultDto>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
400
Returned if some of the query parameters are invalid, for example if a permission parameterName is not valid for the provided resourceType. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
401
The user is not authenticated. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
403
When a `userId` is passed and the user does not possess a READ permission for the Authorization resource. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
404
Authorization with given id does not exist. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public ApiResponse isUserAuthorizedWithHttpInfo(String permissionName, String resourceName, Integer resourceType, String resourceId, String userId) throws ApiException {
okhttp3.Call localVarCall = isUserAuthorizedValidateBeforeCall(permissionName, resourceName, resourceType, resourceId, userId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Perform an Authorization Check (asynchronously)
* Performs an authorization check for the currently authenticated user.
* @param permissionName String value representing the permission name to check for. (required)
* @param resourceName String value for the name of the resource to check permissions for. (required)
* @param resourceType An integer representing the resource type to check permissions for. See the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/#resources) for a list of integer representations of resource types. (required)
* @param resourceId The id of the resource to check permissions for. If left blank, a check for global permissions on the resource is performed. (optional)
* @param userId The id of the user to check permissions for. The currently authenticated user must have a READ permission for the Authorization resource. If `userId` is blank, a check for the currently authenticated user is performed. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
400
Returned if some of the query parameters are invalid, for example if a permission parameterName is not valid for the provided resourceType. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
401
The user is not authenticated. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
403
When a `userId` is passed and the user does not possess a READ permission for the Authorization resource. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
404
Authorization with given id does not exist. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public okhttp3.Call isUserAuthorizedAsync(String permissionName, String resourceName, Integer resourceType, String resourceId, String userId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = isUserAuthorizedValidateBeforeCall(permissionName, resourceName, resourceType, resourceId, userId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for queryAuthorizations
* @param id Filter by the id of the authorization. (optional)
* @param type Filter by authorization type. (0=global, 1=grant, 2=revoke). See the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/#authorization-type) for more information about authorization types. (optional)
* @param userIdIn Filter by a comma-separated list of userIds. (optional)
* @param groupIdIn Filter by a comma-separated list of groupIds. (optional)
* @param resourceType Filter by an integer representation of the resource type. See the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/#resources) for a list of integer representations of resource types. (optional)
* @param resourceId Filter by resource id. (optional)
* @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 _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
400
Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied, but no `sortBy` is specified. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public okhttp3.Call queryAuthorizationsCall(String id, Integer type, String userIdIn, String groupIdIn, Integer resourceType, String resourceId, String sortBy, String sortOrder, Integer firstResult, Integer maxResults, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/authorization";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (id != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id));
}
if (type != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
}
if (userIdIn != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("userIdIn", userIdIn));
}
if (groupIdIn != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupIdIn", groupIdIn));
}
if (resourceType != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceType", resourceType));
}
if (resourceId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("resourceId", resourceId));
}
if (sortBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortBy", sortBy));
}
if (sortOrder != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("sortOrder", sortOrder));
}
if (firstResult != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("firstResult", firstResult));
}
if (maxResults != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("maxResults", maxResults));
}
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basicAuth" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call queryAuthorizationsValidateBeforeCall(String id, Integer type, String userIdIn, String groupIdIn, Integer resourceType, String resourceId, String sortBy, String sortOrder, Integer firstResult, Integer maxResults, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = queryAuthorizationsCall(id, type, userIdIn, groupIdIn, resourceType, resourceId, sortBy, sortOrder, firstResult, maxResults, _callback);
return localVarCall;
}
/**
* Get Authorizations
* Queries for a list of authorizations using a list of parameters. The size of the result set can be retrieved by using the [Get Authorization Count](https://docs.camunda.org/manual/latest/reference/rest/authorization/get-query-count/) method.
* @param id Filter by the id of the authorization. (optional)
* @param type Filter by authorization type. (0=global, 1=grant, 2=revoke). See the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/#authorization-type) for more information about authorization types. (optional)
* @param userIdIn Filter by a comma-separated list of userIds. (optional)
* @param groupIdIn Filter by a comma-separated list of groupIds. (optional)
* @param resourceType Filter by an integer representation of the resource type. See the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/#resources) for a list of integer representations of resource types. (optional)
* @param resourceId Filter by resource id. (optional)
* @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)
* @return List<AuthorizationDto>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
400
Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied, but no `sortBy` is specified. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public List queryAuthorizations(String id, Integer type, String userIdIn, String groupIdIn, Integer resourceType, String resourceId, String sortBy, String sortOrder, Integer firstResult, Integer maxResults) throws ApiException {
ApiResponse> localVarResp = queryAuthorizationsWithHttpInfo(id, type, userIdIn, groupIdIn, resourceType, resourceId, sortBy, sortOrder, firstResult, maxResults);
return localVarResp.getData();
}
/**
* Get Authorizations
* Queries for a list of authorizations using a list of parameters. The size of the result set can be retrieved by using the [Get Authorization Count](https://docs.camunda.org/manual/latest/reference/rest/authorization/get-query-count/) method.
* @param id Filter by the id of the authorization. (optional)
* @param type Filter by authorization type. (0=global, 1=grant, 2=revoke). See the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/#authorization-type) for more information about authorization types. (optional)
* @param userIdIn Filter by a comma-separated list of userIds. (optional)
* @param groupIdIn Filter by a comma-separated list of groupIds. (optional)
* @param resourceType Filter by an integer representation of the resource type. See the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/#resources) for a list of integer representations of resource types. (optional)
* @param resourceId Filter by resource id. (optional)
* @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)
* @return ApiResponse<List<AuthorizationDto>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
400
Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied, but no `sortBy` is specified. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public ApiResponse> queryAuthorizationsWithHttpInfo(String id, Integer type, String userIdIn, String groupIdIn, Integer resourceType, String resourceId, String sortBy, String sortOrder, Integer firstResult, Integer maxResults) throws ApiException {
okhttp3.Call localVarCall = queryAuthorizationsValidateBeforeCall(id, type, userIdIn, groupIdIn, resourceType, resourceId, sortBy, sortOrder, firstResult, maxResults, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get Authorizations (asynchronously)
* Queries for a list of authorizations using a list of parameters. The size of the result set can be retrieved by using the [Get Authorization Count](https://docs.camunda.org/manual/latest/reference/rest/authorization/get-query-count/) method.
* @param id Filter by the id of the authorization. (optional)
* @param type Filter by authorization type. (0=global, 1=grant, 2=revoke). See the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/#authorization-type) for more information about authorization types. (optional)
* @param userIdIn Filter by a comma-separated list of userIds. (optional)
* @param groupIdIn Filter by a comma-separated list of groupIds. (optional)
* @param resourceType Filter by an integer representation of the resource type. See the [User Guide](https://docs.camunda.org/manual/latest/user-guide/process-engine/authorization-service/#resources) for a list of integer representations of resource types. (optional)
* @param resourceId Filter by resource id. (optional)
* @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 _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Request successful.
-
400
Returned if some of the query parameters are invalid, for example if a `sortOrder` parameter is supplied, but no `sortBy` is specified. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public okhttp3.Call queryAuthorizationsAsync(String id, Integer type, String userIdIn, String groupIdIn, Integer resourceType, String resourceId, String sortBy, String sortOrder, Integer firstResult, Integer maxResults, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = queryAuthorizationsValidateBeforeCall(id, type, userIdIn, groupIdIn, resourceType, resourceId, sortBy, sortOrder, firstResult, maxResults, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for updateAuthorization
* @param id The id of the authorization to be updated. (required)
* @param authorizationUpdateDto (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
204
Request successful. This method returns no content.
-
400
Returned if some of the properties in the request body are invalid, for example if a permission parameter is not valid for the provided resourceType. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
403
The authenticated user is unauthorized to update this resource. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
404
The authorization with the requested Id cannot be found.
-
500
The authorization could not be updated due to an internal server error. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public okhttp3.Call updateAuthorizationCall(String id, AuthorizationUpdateDto authorizationUpdateDto, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = authorizationUpdateDto;
// create path and map variables
String localVarPath = "/authorization/{id}"
.replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basicAuth" };
return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call updateAuthorizationValidateBeforeCall(String id, AuthorizationUpdateDto authorizationUpdateDto, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling updateAuthorization(Async)");
}
okhttp3.Call localVarCall = updateAuthorizationCall(id, authorizationUpdateDto, _callback);
return localVarCall;
}
/**
* Update an Authorization
* Updates an authorization by id.
* @param id The id of the authorization to be updated. (required)
* @param authorizationUpdateDto (optional)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
Request successful. This method returns no content.
-
400
Returned if some of the properties in the request body are invalid, for example if a permission parameter is not valid for the provided resourceType. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
403
The authenticated user is unauthorized to update this resource. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
404
The authorization with the requested Id cannot be found.
-
500
The authorization could not be updated due to an internal server error. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public void updateAuthorization(String id, AuthorizationUpdateDto authorizationUpdateDto) throws ApiException {
updateAuthorizationWithHttpInfo(id, authorizationUpdateDto);
}
/**
* Update an Authorization
* Updates an authorization by id.
* @param id The id of the authorization to be updated. (required)
* @param authorizationUpdateDto (optional)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
Request successful. This method returns no content.
-
400
Returned if some of the properties in the request body are invalid, for example if a permission parameter is not valid for the provided resourceType. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
403
The authenticated user is unauthorized to update this resource. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
404
The authorization with the requested Id cannot be found.
-
500
The authorization could not be updated due to an internal server error. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
*/
public ApiResponse updateAuthorizationWithHttpInfo(String id, AuthorizationUpdateDto authorizationUpdateDto) throws ApiException {
okhttp3.Call localVarCall = updateAuthorizationValidateBeforeCall(id, authorizationUpdateDto, null);
return localVarApiClient.execute(localVarCall);
}
/**
* Update an Authorization (asynchronously)
* Updates an authorization by id.
* @param id The id of the authorization to be updated. (required)
* @param authorizationUpdateDto (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
204
Request successful. This method returns no content.
-
400
Returned if some of the properties in the request body are invalid, for example if a permission parameter is not valid for the provided resourceType. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
403
The authenticated user is unauthorized to update this resource. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.
-
404
The authorization with the requested Id cannot be found.
-
500
The authorization could not be updated due to an internal server error. See the [Introduction](https://docs.camunda.org/manual/latest/reference/rest/overview/#error-handling) for the error response format.