Please wait. This can take some minutes ...
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.
software.tnb.jira.validation.generated.api.IssueCustomFieldOptionsAppsApi Maven / Gradle / Ivy
/*
* The Jira Cloud platform REST API
* Jira Cloud platform REST API documentation
*
* The version of the OpenAPI document: 1001.0.0-SNAPSHOT
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package software.tnb.jira.validation.generated.api;
import software.tnb.jira.validation.generated.ApiCallback;
import software.tnb.jira.validation.generated.ApiClient;
import software.tnb.jira.validation.generated.ApiException;
import software.tnb.jira.validation.generated.ApiResponse;
import software.tnb.jira.validation.generated.Configuration;
import software.tnb.jira.validation.generated.Pair;
import software.tnb.jira.validation.generated.ProgressRequestBody;
import software.tnb.jira.validation.generated.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import software.tnb.jira.validation.generated.model.IssueFieldOption;
import software.tnb.jira.validation.generated.model.IssueFieldOptionCreateBean;
import software.tnb.jira.validation.generated.model.PageBeanIssueFieldOption;
import software.tnb.jira.validation.generated.model.TaskProgressBeanRemoveOptionFromIssuesResult;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class IssueCustomFieldOptionsAppsApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public IssueCustomFieldOptionsAppsApi() {
this(Configuration.getDefaultApiClient());
}
public IssueCustomFieldOptionsAppsApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public int getHostIndex() {
return localHostIndex;
}
public void setHostIndex(int hostIndex) {
this.localHostIndex = hostIndex;
}
public String getCustomBaseUrl() {
return localCustomBaseUrl;
}
public void setCustomBaseUrl(String customBaseUrl) {
this.localCustomBaseUrl = customBaseUrl;
}
/**
* Build call for createIssueFieldOption
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param requestBody (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 Returned if the request is successful. -
400 Returned if the option is invalid. -
403 Returned if the request is not authenticated as a Jira administrator or the app that provided the field. -
404 Returned if the field is not found or does not support options. -
*/
public okhttp3.Call createIssueFieldOptionCall(String fieldKey, Map requestBody, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = requestBody;
// create path and map variables
String localVarPath = "/rest/api/3/field/{fieldKey}/option"
.replace("{" + "fieldKey" + "}", localVarApiClient.escapeString(fieldKey.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);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call createIssueFieldOptionValidateBeforeCall(String fieldKey, Map requestBody, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'fieldKey' is set
if (fieldKey == null) {
throw new ApiException("Missing the required parameter 'fieldKey' when calling createIssueFieldOption(Async)");
}
// verify the required parameter 'requestBody' is set
if (requestBody == null) {
throw new ApiException("Missing the required parameter 'requestBody' when calling createIssueFieldOption(Async)");
}
return createIssueFieldOptionCall(fieldKey, requestBody, _callback);
}
/**
* Create issue field option
* Creates an option for a select list issue field. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param requestBody (required)
* @return IssueFieldOption
* @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 Returned if the request is successful. -
400 Returned if the option is invalid. -
403 Returned if the request is not authenticated as a Jira administrator or the app that provided the field. -
404 Returned if the field is not found or does not support options. -
*/
public IssueFieldOption createIssueFieldOption(String fieldKey, Map requestBody) throws ApiException {
ApiResponse localVarResp = createIssueFieldOptionWithHttpInfo(fieldKey, requestBody);
return localVarResp.getData();
}
/**
* Create issue field option
* Creates an option for a select list issue field. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param requestBody (required)
* @return ApiResponse<IssueFieldOption>
* @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 Returned if the request is successful. -
400 Returned if the option is invalid. -
403 Returned if the request is not authenticated as a Jira administrator or the app that provided the field. -
404 Returned if the field is not found or does not support options. -
*/
public ApiResponse createIssueFieldOptionWithHttpInfo(String fieldKey, Map requestBody) throws ApiException {
okhttp3.Call localVarCall = createIssueFieldOptionValidateBeforeCall(fieldKey, requestBody, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Create issue field option (asynchronously)
* Creates an option for a select list issue field. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param requestBody (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 Returned if the request is successful. -
400 Returned if the option is invalid. -
403 Returned if the request is not authenticated as a Jira administrator or the app that provided the field. -
404 Returned if the field is not found or does not support options. -
*/
public okhttp3.Call createIssueFieldOptionAsync(String fieldKey, Map requestBody, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createIssueFieldOptionValidateBeforeCall(fieldKey, requestBody, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for deleteIssueFieldOption
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param optionId The ID of the option 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 Returned if the field option is deleted. -
403 Returned if the request is not authenticated as a Jira administrator or the app that provided the field. -
404 Returned if the field or option is not found. -
409 Returned if the option is selected for the field in any issue. -
*/
public okhttp3.Call deleteIssueFieldOptionCall(String fieldKey, Long optionId, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/rest/api/3/field/{fieldKey}/option/{optionId}"
.replace("{" + "fieldKey" + "}", localVarApiClient.escapeString(fieldKey.toString()))
.replace("{" + "optionId" + "}", localVarApiClient.escapeString(optionId.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);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call deleteIssueFieldOptionValidateBeforeCall(String fieldKey, Long optionId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'fieldKey' is set
if (fieldKey == null) {
throw new ApiException("Missing the required parameter 'fieldKey' when calling deleteIssueFieldOption(Async)");
}
// verify the required parameter 'optionId' is set
if (optionId == null) {
throw new ApiException("Missing the required parameter 'optionId' when calling deleteIssueFieldOption(Async)");
}
return deleteIssueFieldOptionCall(fieldKey, optionId, _callback);
}
/**
* Delete issue field option
* Deletes an option from a select list issue field. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param optionId The ID of the option to be deleted. (required)
* @return Object
* @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 Returned if the field option is deleted. -
403 Returned if the request is not authenticated as a Jira administrator or the app that provided the field. -
404 Returned if the field or option is not found. -
409 Returned if the option is selected for the field in any issue. -
*/
public Object deleteIssueFieldOption(String fieldKey, Long optionId) throws ApiException {
ApiResponse localVarResp = deleteIssueFieldOptionWithHttpInfo(fieldKey, optionId);
return localVarResp.getData();
}
/**
* Delete issue field option
* Deletes an option from a select list issue field. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param optionId The ID of the option to be deleted. (required)
* @return ApiResponse<Object>
* @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 Returned if the field option is deleted. -
403 Returned if the request is not authenticated as a Jira administrator or the app that provided the field. -
404 Returned if the field or option is not found. -
409 Returned if the option is selected for the field in any issue. -
*/
public ApiResponse deleteIssueFieldOptionWithHttpInfo(String fieldKey, Long optionId) throws ApiException {
okhttp3.Call localVarCall = deleteIssueFieldOptionValidateBeforeCall(fieldKey, optionId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Delete issue field option (asynchronously)
* Deletes an option from a select list issue field. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param optionId The ID of the option 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 Returned if the field option is deleted. -
403 Returned if the request is not authenticated as a Jira administrator or the app that provided the field. -
404 Returned if the field or option is not found. -
409 Returned if the option is selected for the field in any issue. -
*/
public okhttp3.Call deleteIssueFieldOptionAsync(String fieldKey, Long optionId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteIssueFieldOptionValidateBeforeCall(fieldKey, optionId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getAllIssueFieldOptions
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional, default to 50)
* @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 Returned if the request is successful. -
400 Returned if the field is not found or does not support options. -
403 Returned if the request is not authenticated as a Jira administrator or the app that provided the field. -
*/
public okhttp3.Call getAllIssueFieldOptionsCall(String fieldKey, Long startAt, Integer maxResults, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/rest/api/3/field/{fieldKey}/option"
.replace("{" + "fieldKey" + "}", localVarApiClient.escapeString(fieldKey.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (startAt != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("startAt", startAt));
}
if (maxResults != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("maxResults", maxResults));
}
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);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getAllIssueFieldOptionsValidateBeforeCall(String fieldKey, Long startAt, Integer maxResults, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'fieldKey' is set
if (fieldKey == null) {
throw new ApiException("Missing the required parameter 'fieldKey' when calling getAllIssueFieldOptions(Async)");
}
return getAllIssueFieldOptionsCall(fieldKey, startAt, maxResults, _callback);
}
/**
* Get all issue field options
* Returns a [paginated](#pagination) list of all the options of a select list issue field. A select list issue field is a type of [issue field](https://developer.atlassian.com/cloud/jira/platform/modules/issue-field/) that enables a user to select a value from a list of options. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional, default to 50)
* @return PageBeanIssueFieldOption
* @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 Returned if the request is successful. -
400 Returned if the field is not found or does not support options. -
403 Returned if the request is not authenticated as a Jira administrator or the app that provided the field. -
*/
public PageBeanIssueFieldOption getAllIssueFieldOptions(String fieldKey, Long startAt, Integer maxResults) throws ApiException {
ApiResponse localVarResp = getAllIssueFieldOptionsWithHttpInfo(fieldKey, startAt, maxResults);
return localVarResp.getData();
}
/**
* Get all issue field options
* Returns a [paginated](#pagination) list of all the options of a select list issue field. A select list issue field is a type of [issue field](https://developer.atlassian.com/cloud/jira/platform/modules/issue-field/) that enables a user to select a value from a list of options. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional, default to 50)
* @return ApiResponse<PageBeanIssueFieldOption>
* @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 Returned if the request is successful. -
400 Returned if the field is not found or does not support options. -
403 Returned if the request is not authenticated as a Jira administrator or the app that provided the field. -
*/
public ApiResponse getAllIssueFieldOptionsWithHttpInfo(String fieldKey, Long startAt, Integer maxResults) throws ApiException {
okhttp3.Call localVarCall = getAllIssueFieldOptionsValidateBeforeCall(fieldKey, startAt, maxResults, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get all issue field options (asynchronously)
* Returns a [paginated](#pagination) list of all the options of a select list issue field. A select list issue field is a type of [issue field](https://developer.atlassian.com/cloud/jira/platform/modules/issue-field/) that enables a user to select a value from a list of options. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional, default to 50)
* @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 Returned if the request is successful. -
400 Returned if the field is not found or does not support options. -
403 Returned if the request is not authenticated as a Jira administrator or the app that provided the field. -
*/
public okhttp3.Call getAllIssueFieldOptionsAsync(String fieldKey, Long startAt, Integer maxResults, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getAllIssueFieldOptionsValidateBeforeCall(fieldKey, startAt, maxResults, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getIssueFieldOption
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param optionId The ID of the option to be returned. (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 Returned if the requested option is returned. -
400 Returned if the field is not found or does not support options. -
403 Returned if the request is not authenticated as a Jira administrator or the app that provided the field. -
404 Returned if the option is not found. -
*/
public okhttp3.Call getIssueFieldOptionCall(String fieldKey, Long optionId, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/rest/api/3/field/{fieldKey}/option/{optionId}"
.replace("{" + "fieldKey" + "}", localVarApiClient.escapeString(fieldKey.toString()))
.replace("{" + "optionId" + "}", localVarApiClient.escapeString(optionId.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);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getIssueFieldOptionValidateBeforeCall(String fieldKey, Long optionId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'fieldKey' is set
if (fieldKey == null) {
throw new ApiException("Missing the required parameter 'fieldKey' when calling getIssueFieldOption(Async)");
}
// verify the required parameter 'optionId' is set
if (optionId == null) {
throw new ApiException("Missing the required parameter 'optionId' when calling getIssueFieldOption(Async)");
}
return getIssueFieldOptionCall(fieldKey, optionId, _callback);
}
/**
* Get issue field option
* Returns an option from a select list issue field. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param optionId The ID of the option to be returned. (required)
* @return IssueFieldOption
* @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 Returned if the requested option is returned. -
400 Returned if the field is not found or does not support options. -
403 Returned if the request is not authenticated as a Jira administrator or the app that provided the field. -
404 Returned if the option is not found. -
*/
public IssueFieldOption getIssueFieldOption(String fieldKey, Long optionId) throws ApiException {
ApiResponse localVarResp = getIssueFieldOptionWithHttpInfo(fieldKey, optionId);
return localVarResp.getData();
}
/**
* Get issue field option
* Returns an option from a select list issue field. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param optionId The ID of the option to be returned. (required)
* @return ApiResponse<IssueFieldOption>
* @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 Returned if the requested option is returned. -
400 Returned if the field is not found or does not support options. -
403 Returned if the request is not authenticated as a Jira administrator or the app that provided the field. -
404 Returned if the option is not found. -
*/
public ApiResponse getIssueFieldOptionWithHttpInfo(String fieldKey, Long optionId) throws ApiException {
okhttp3.Call localVarCall = getIssueFieldOptionValidateBeforeCall(fieldKey, optionId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get issue field option (asynchronously)
* Returns an option from a select list issue field. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param optionId The ID of the option to be returned. (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 Returned if the requested option is returned. -
400 Returned if the field is not found or does not support options. -
403 Returned if the request is not authenticated as a Jira administrator or the app that provided the field. -
404 Returned if the option is not found. -
*/
public okhttp3.Call getIssueFieldOptionAsync(String fieldKey, Long optionId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getIssueFieldOptionValidateBeforeCall(fieldKey, optionId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getSelectableIssueFieldOptions
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional, default to 50)
* @param projectId Filters the results to options that are only available in the specified project. (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 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the field is not found or does not support options. -
*/
public okhttp3.Call getSelectableIssueFieldOptionsCall(String fieldKey, Long startAt, Integer maxResults, Long projectId, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/rest/api/3/field/{fieldKey}/option/suggestions/edit"
.replace("{" + "fieldKey" + "}", localVarApiClient.escapeString(fieldKey.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (startAt != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("startAt", startAt));
}
if (maxResults != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("maxResults", maxResults));
}
if (projectId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("projectId", projectId));
}
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);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getSelectableIssueFieldOptionsValidateBeforeCall(String fieldKey, Long startAt, Integer maxResults, Long projectId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'fieldKey' is set
if (fieldKey == null) {
throw new ApiException("Missing the required parameter 'fieldKey' when calling getSelectableIssueFieldOptions(Async)");
}
return getSelectableIssueFieldOptionsCall(fieldKey, startAt, maxResults, projectId, _callback);
}
/**
* Get selectable issue field options
* Returns a [paginated](#pagination) list of options for a select list issue field that can be viewed and selected by the user. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** Permission to access Jira.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional, default to 50)
* @param projectId Filters the results to options that are only available in the specified project. (optional)
* @return PageBeanIssueFieldOption
* @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 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the field is not found or does not support options. -
*/
public PageBeanIssueFieldOption getSelectableIssueFieldOptions(String fieldKey, Long startAt, Integer maxResults, Long projectId) throws ApiException {
ApiResponse localVarResp = getSelectableIssueFieldOptionsWithHttpInfo(fieldKey, startAt, maxResults, projectId);
return localVarResp.getData();
}
/**
* Get selectable issue field options
* Returns a [paginated](#pagination) list of options for a select list issue field that can be viewed and selected by the user. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** Permission to access Jira.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional, default to 50)
* @param projectId Filters the results to options that are only available in the specified project. (optional)
* @return ApiResponse<PageBeanIssueFieldOption>
* @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 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the field is not found or does not support options. -
*/
public ApiResponse getSelectableIssueFieldOptionsWithHttpInfo(String fieldKey, Long startAt, Integer maxResults, Long projectId) throws ApiException {
okhttp3.Call localVarCall = getSelectableIssueFieldOptionsValidateBeforeCall(fieldKey, startAt, maxResults, projectId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get selectable issue field options (asynchronously)
* Returns a [paginated](#pagination) list of options for a select list issue field that can be viewed and selected by the user. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** Permission to access Jira.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional, default to 50)
* @param projectId Filters the results to options that are only available in the specified project. (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 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the field is not found or does not support options. -
*/
public okhttp3.Call getSelectableIssueFieldOptionsAsync(String fieldKey, Long startAt, Integer maxResults, Long projectId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getSelectableIssueFieldOptionsValidateBeforeCall(fieldKey, startAt, maxResults, projectId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getVisibleIssueFieldOptions
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional)
* @param projectId Filters the results to options that are only available in the specified project. (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 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the field is not found or does not support options. -
*/
public okhttp3.Call getVisibleIssueFieldOptionsCall(String fieldKey, Long startAt, Integer maxResults, Long projectId, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/rest/api/3/field/{fieldKey}/option/suggestions/search"
.replace("{" + "fieldKey" + "}", localVarApiClient.escapeString(fieldKey.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (startAt != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("startAt", startAt));
}
if (maxResults != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("maxResults", maxResults));
}
if (projectId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("projectId", projectId));
}
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);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getVisibleIssueFieldOptionsValidateBeforeCall(String fieldKey, Long startAt, Integer maxResults, Long projectId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'fieldKey' is set
if (fieldKey == null) {
throw new ApiException("Missing the required parameter 'fieldKey' when calling getVisibleIssueFieldOptions(Async)");
}
return getVisibleIssueFieldOptionsCall(fieldKey, startAt, maxResults, projectId, _callback);
}
/**
* Get visible issue field options
* Returns a [paginated](#pagination) list of options for a select list issue field that can be viewed by the user. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** Permission to access Jira.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional)
* @param projectId Filters the results to options that are only available in the specified project. (optional)
* @return PageBeanIssueFieldOption
* @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 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the field is not found or does not support options. -
*/
public PageBeanIssueFieldOption getVisibleIssueFieldOptions(String fieldKey, Long startAt, Integer maxResults, Long projectId) throws ApiException {
ApiResponse localVarResp = getVisibleIssueFieldOptionsWithHttpInfo(fieldKey, startAt, maxResults, projectId);
return localVarResp.getData();
}
/**
* Get visible issue field options
* Returns a [paginated](#pagination) list of options for a select list issue field that can be viewed by the user. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** Permission to access Jira.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional)
* @param projectId Filters the results to options that are only available in the specified project. (optional)
* @return ApiResponse<PageBeanIssueFieldOption>
* @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 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the field is not found or does not support options. -
*/
public ApiResponse getVisibleIssueFieldOptionsWithHttpInfo(String fieldKey, Long startAt, Integer maxResults, Long projectId) throws ApiException {
okhttp3.Call localVarCall = getVisibleIssueFieldOptionsValidateBeforeCall(fieldKey, startAt, maxResults, projectId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get visible issue field options (asynchronously)
* Returns a [paginated](#pagination) list of options for a select list issue field that can be viewed by the user. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** Permission to access Jira.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional)
* @param projectId Filters the results to options that are only available in the specified project. (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 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the field is not found or does not support options. -
*/
public okhttp3.Call getVisibleIssueFieldOptionsAsync(String fieldKey, Long startAt, Integer maxResults, Long projectId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getVisibleIssueFieldOptionsValidateBeforeCall(fieldKey, startAt, maxResults, projectId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for replaceIssueFieldOption
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param optionId The ID of the option to be deselected. (required)
* @param replaceWith The ID of the option that will replace the currently selected option. (optional)
* @param jql A JQL query that specifies the issues to be updated. For example, *project=10000*. (optional)
* @param overrideScreenSecurity Whether screen security is overridden to enable hidden fields to be edited. Available to Connect and Forge app users with admin permission. (optional, default to false)
* @param overrideEditableFlag Whether screen security is overridden to enable uneditable fields to be edited. Available to Connect and Forge app users with *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). (optional, default to false)
* @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
303 Returned if the long-running task to deselect the option is started. -
400 Returned if the request is not valid. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the field is not found or does not support options, or the options to be replaced are not found. -
*/
public okhttp3.Call replaceIssueFieldOptionCall(String fieldKey, Long optionId, Long replaceWith, String jql, Boolean overrideScreenSecurity, Boolean overrideEditableFlag, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/rest/api/3/field/{fieldKey}/option/{optionId}/issue"
.replace("{" + "fieldKey" + "}", localVarApiClient.escapeString(fieldKey.toString()))
.replace("{" + "optionId" + "}", localVarApiClient.escapeString(optionId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (replaceWith != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("replaceWith", replaceWith));
}
if (jql != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("jql", jql));
}
if (overrideScreenSecurity != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("overrideScreenSecurity", overrideScreenSecurity));
}
if (overrideEditableFlag != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("overrideEditableFlag", overrideEditableFlag));
}
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);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call replaceIssueFieldOptionValidateBeforeCall(String fieldKey, Long optionId, Long replaceWith, String jql, Boolean overrideScreenSecurity, Boolean overrideEditableFlag, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'fieldKey' is set
if (fieldKey == null) {
throw new ApiException("Missing the required parameter 'fieldKey' when calling replaceIssueFieldOption(Async)");
}
// verify the required parameter 'optionId' is set
if (optionId == null) {
throw new ApiException("Missing the required parameter 'optionId' when calling replaceIssueFieldOption(Async)");
}
return replaceIssueFieldOptionCall(fieldKey, optionId, replaceWith, jql, overrideScreenSecurity, overrideEditableFlag, _callback);
}
/**
* Replace issue field option
* Deselects an issue-field select-list option from all issues where it is selected. A different option can be selected to replace the deselected option. The update can also be limited to a smaller set of issues by using a JQL query. Connect and Forge app users with *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) can override the screen security configuration using `overrideScreenSecurity` and `overrideEditableFlag`. This is an [asynchronous operation](#async). The response object contains a link to the long-running task. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param optionId The ID of the option to be deselected. (required)
* @param replaceWith The ID of the option that will replace the currently selected option. (optional)
* @param jql A JQL query that specifies the issues to be updated. For example, *project=10000*. (optional)
* @param overrideScreenSecurity Whether screen security is overridden to enable hidden fields to be edited. Available to Connect and Forge app users with admin permission. (optional, default to false)
* @param overrideEditableFlag Whether screen security is overridden to enable uneditable fields to be edited. Available to Connect and Forge app users with *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). (optional, default to false)
* @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
303 Returned if the long-running task to deselect the option is started. -
400 Returned if the request is not valid. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the field is not found or does not support options, or the options to be replaced are not found. -
*/
public void replaceIssueFieldOption(String fieldKey, Long optionId, Long replaceWith, String jql, Boolean overrideScreenSecurity, Boolean overrideEditableFlag) throws ApiException {
replaceIssueFieldOptionWithHttpInfo(fieldKey, optionId, replaceWith, jql, overrideScreenSecurity, overrideEditableFlag);
}
/**
* Replace issue field option
* Deselects an issue-field select-list option from all issues where it is selected. A different option can be selected to replace the deselected option. The update can also be limited to a smaller set of issues by using a JQL query. Connect and Forge app users with *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) can override the screen security configuration using `overrideScreenSecurity` and `overrideEditableFlag`. This is an [asynchronous operation](#async). The response object contains a link to the long-running task. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param optionId The ID of the option to be deselected. (required)
* @param replaceWith The ID of the option that will replace the currently selected option. (optional)
* @param jql A JQL query that specifies the issues to be updated. For example, *project=10000*. (optional)
* @param overrideScreenSecurity Whether screen security is overridden to enable hidden fields to be edited. Available to Connect and Forge app users with admin permission. (optional, default to false)
* @param overrideEditableFlag Whether screen security is overridden to enable uneditable fields to be edited. Available to Connect and Forge app users with *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). (optional, default to false)
* @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
303 Returned if the long-running task to deselect the option is started. -
400 Returned if the request is not valid. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the field is not found or does not support options, or the options to be replaced are not found. -
*/
public ApiResponse replaceIssueFieldOptionWithHttpInfo(String fieldKey, Long optionId, Long replaceWith, String jql, Boolean overrideScreenSecurity, Boolean overrideEditableFlag) throws ApiException {
okhttp3.Call localVarCall = replaceIssueFieldOptionValidateBeforeCall(fieldKey, optionId, replaceWith, jql, overrideScreenSecurity, overrideEditableFlag, null);
return localVarApiClient.execute(localVarCall);
}
/**
* Replace issue field option (asynchronously)
* Deselects an issue-field select-list option from all issues where it is selected. A different option can be selected to replace the deselected option. The update can also be limited to a smaller set of issues by using a JQL query. Connect and Forge app users with *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) can override the screen security configuration using `overrideScreenSecurity` and `overrideEditableFlag`. This is an [asynchronous operation](#async). The response object contains a link to the long-running task. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param optionId The ID of the option to be deselected. (required)
* @param replaceWith The ID of the option that will replace the currently selected option. (optional)
* @param jql A JQL query that specifies the issues to be updated. For example, *project=10000*. (optional)
* @param overrideScreenSecurity Whether screen security is overridden to enable hidden fields to be edited. Available to Connect and Forge app users with admin permission. (optional, default to false)
* @param overrideEditableFlag Whether screen security is overridden to enable uneditable fields to be edited. Available to Connect and Forge app users with *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). (optional, default to false)
* @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
303 Returned if the long-running task to deselect the option is started. -
400 Returned if the request is not valid. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the field is not found or does not support options, or the options to be replaced are not found. -
*/
public okhttp3.Call replaceIssueFieldOptionAsync(String fieldKey, Long optionId, Long replaceWith, String jql, Boolean overrideScreenSecurity, Boolean overrideEditableFlag, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = replaceIssueFieldOptionValidateBeforeCall(fieldKey, optionId, replaceWith, jql, overrideScreenSecurity, overrideEditableFlag, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for updateIssueFieldOption
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param optionId The ID of the option to be updated. (required)
* @param issueFieldOption (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 Returned if the option is updated or created. -
400 Returned if the option is invalid, or the *ID* in the request object does not match the *optionId* parameter. -
403 Returned if the request is not authenticated as a Jira administrator or the app that provided the field. -
404 Returned if field is not found. -
*/
public okhttp3.Call updateIssueFieldOptionCall(String fieldKey, Long optionId, IssueFieldOption issueFieldOption, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = issueFieldOption;
// create path and map variables
String localVarPath = "/rest/api/3/field/{fieldKey}/option/{optionId}"
.replace("{" + "fieldKey" + "}", localVarApiClient.escapeString(fieldKey.toString()))
.replace("{" + "optionId" + "}", localVarApiClient.escapeString(optionId.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);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call updateIssueFieldOptionValidateBeforeCall(String fieldKey, Long optionId, IssueFieldOption issueFieldOption, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'fieldKey' is set
if (fieldKey == null) {
throw new ApiException("Missing the required parameter 'fieldKey' when calling updateIssueFieldOption(Async)");
}
// verify the required parameter 'optionId' is set
if (optionId == null) {
throw new ApiException("Missing the required parameter 'optionId' when calling updateIssueFieldOption(Async)");
}
// verify the required parameter 'issueFieldOption' is set
if (issueFieldOption == null) {
throw new ApiException("Missing the required parameter 'issueFieldOption' when calling updateIssueFieldOption(Async)");
}
return updateIssueFieldOptionCall(fieldKey, optionId, issueFieldOption, _callback);
}
/**
* Update issue field option
* Updates or creates an option for a select list issue field. This operation requires that the option ID is provided when creating an option, therefore, the option ID needs to be specified as a path and body parameter. The option ID provided in the path and body must be identical. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param optionId The ID of the option to be updated. (required)
* @param issueFieldOption (required)
* @return IssueFieldOption
* @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 Returned if the option is updated or created. -
400 Returned if the option is invalid, or the *ID* in the request object does not match the *optionId* parameter. -
403 Returned if the request is not authenticated as a Jira administrator or the app that provided the field. -
404 Returned if field is not found. -
*/
public IssueFieldOption updateIssueFieldOption(String fieldKey, Long optionId, IssueFieldOption issueFieldOption) throws ApiException {
ApiResponse localVarResp = updateIssueFieldOptionWithHttpInfo(fieldKey, optionId, issueFieldOption);
return localVarResp.getData();
}
/**
* Update issue field option
* Updates or creates an option for a select list issue field. This operation requires that the option ID is provided when creating an option, therefore, the option ID needs to be specified as a path and body parameter. The option ID provided in the path and body must be identical. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param optionId The ID of the option to be updated. (required)
* @param issueFieldOption (required)
* @return ApiResponse<IssueFieldOption>
* @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 Returned if the option is updated or created. -
400 Returned if the option is invalid, or the *ID* in the request object does not match the *optionId* parameter. -
403 Returned if the request is not authenticated as a Jira administrator or the app that provided the field. -
404 Returned if field is not found. -
*/
public ApiResponse updateIssueFieldOptionWithHttpInfo(String fieldKey, Long optionId, IssueFieldOption issueFieldOption) throws ApiException {
okhttp3.Call localVarCall = updateIssueFieldOptionValidateBeforeCall(fieldKey, optionId, issueFieldOption, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Update issue field option (asynchronously)
* Updates or creates an option for a select list issue field. This operation requires that the option ID is provided when creating an option, therefore, the option ID needs to be specified as a path and body parameter. The option ID provided in the path and body must be identical. Note that this operation **only works for issue field select list options added by Connect apps**, it cannot be used with issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app providing the field.
* @param fieldKey The field key is specified in the following format: **$(app-key)\\_\\_$(field-key)**. For example, *example-add-on\\_\\_example-issue-field*. To determine the `fieldKey` value, do one of the following: * open the app's plugin descriptor, then **app-key** is the key at the top and **field-key** is the key in the `jiraIssueFields` module. **app-key** can also be found in the app listing in the Atlassian Universal Plugin Manager. * run [Get fields](#api-rest-api-3-field-get) and in the field details the value is returned in `key`. For example, `\"key\": \"teams-add-on__team-issue-field\"` (required)
* @param optionId The ID of the option to be updated. (required)
* @param issueFieldOption (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 Returned if the option is updated or created. -
400 Returned if the option is invalid, or the *ID* in the request object does not match the *optionId* parameter. -
403 Returned if the request is not authenticated as a Jira administrator or the app that provided the field. -
404 Returned if field is not found. -
*/
public okhttp3.Call updateIssueFieldOptionAsync(String fieldKey, Long optionId, IssueFieldOption issueFieldOption, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = updateIssueFieldOptionValidateBeforeCall(fieldKey, optionId, issueFieldOption, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}