Skip to content

Latest commit

 

History

History
502 lines (379 loc) · 32.6 KB

IssueCustomFieldOptionsAppsApi.md

File metadata and controls

502 lines (379 loc) · 32.6 KB

IssueCustomFieldOptionsAppsApi

All URIs are relative to https://your-domain.atlassian.com

Method HTTP request Description
createIssueFieldOption POST /rest/api/3/field/{fieldKey}/option Create issue field option
deleteIssueFieldOption DELETE /rest/api/3/field/{fieldKey}/option/{optionId} Delete issue field option
getAllIssueFieldOptions GET /rest/api/3/field/{fieldKey}/option Get all issue field options
getIssueFieldOption GET /rest/api/3/field/{fieldKey}/option/{optionId} Get issue field option
getSelectableIssueFieldOptions GET /rest/api/3/field/{fieldKey}/option/suggestions/edit Get selectable issue field options
getVisibleIssueFieldOptions GET /rest/api/3/field/{fieldKey}/option/suggestions/search Get visible issue field options
replaceIssueFieldOption DELETE /rest/api/3/field/{fieldKey}/option/{optionId}/issue Replace issue field option
updateIssueFieldOption PUT /rest/api/3/field/{fieldKey}/option/{optionId} Update issue field option

createIssueFieldOption

IssueFieldOption createIssueFieldOption(body, fieldKey)

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 resource. Permissions required: Administer Jira global permission. Jira permissions are not required for the app providing the field.

Example

// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.IssueCustomFieldOptionsAppsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

IssueCustomFieldOptionsAppsApi apiInstance = new IssueCustomFieldOptionsAppsApi();
Map<String, Object> body = new Map(); // Map<String, Object> | 
String fieldKey = "fieldKey_example"; // String | 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\"`
try {
    IssueFieldOption result = apiInstance.createIssueFieldOption(body, fieldKey);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueCustomFieldOptionsAppsApi#createIssueFieldOption");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body Map<String, Object>
fieldKey String 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 and in the field details the value is returned in `key`. For example, `&quot;key&quot;: &quot;teams-add-on__team-issue-field&quot;`

Return type

IssueFieldOption

Authorization

OAuth2basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteIssueFieldOption

Object deleteIssueFieldOption(fieldKey, optionId)

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 resource. Permissions required: Administer Jira global permission. Jira permissions are not required for the app providing the field.

Example

// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.IssueCustomFieldOptionsAppsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

IssueCustomFieldOptionsAppsApi apiInstance = new IssueCustomFieldOptionsAppsApi();
String fieldKey = "fieldKey_example"; // String | 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\"`
Long optionId = 789L; // Long | The ID of the option to be deleted.
try {
    Object result = apiInstance.deleteIssueFieldOption(fieldKey, optionId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueCustomFieldOptionsAppsApi#deleteIssueFieldOption");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
fieldKey String 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 and in the field details the value is returned in `key`. For example, `&quot;key&quot;: &quot;teams-add-on__team-issue-field&quot;`
optionId Long The ID of the option to be deleted.

Return type

Object

Authorization

OAuth2basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getAllIssueFieldOptions

PageBeanIssueFieldOption getAllIssueFieldOptions(fieldKey, startAt, maxResults)

Get all issue field options

Returns a paginated list of all the options of a select list issue field. A select list issue field is a type of 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 resource. Permissions required: Administer Jira global permission. Jira permissions are not required for the app providing the field.

Example

// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.IssueCustomFieldOptionsAppsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

IssueCustomFieldOptionsAppsApi apiInstance = new IssueCustomFieldOptionsAppsApi();
String fieldKey = "fieldKey_example"; // String | 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\"`
Long startAt = 0L; // Long | The index of the first item to return in a page of results (page offset).
Integer maxResults = 50; // Integer | The maximum number of items to return per page.
try {
    PageBeanIssueFieldOption result = apiInstance.getAllIssueFieldOptions(fieldKey, startAt, maxResults);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueCustomFieldOptionsAppsApi#getAllIssueFieldOptions");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
fieldKey String 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 and in the field details the value is returned in `key`. For example, `&quot;key&quot;: &quot;teams-add-on__team-issue-field&quot;`
startAt Long The index of the first item to return in a page of results (page offset). [optional] [default to 0]
maxResults Integer The maximum number of items to return per page. [optional] [default to 50]

Return type

PageBeanIssueFieldOption

Authorization

OAuth2basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getIssueFieldOption

IssueFieldOption getIssueFieldOption(fieldKey, optionId)

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 resource. Permissions required: Administer Jira global permission. Jira permissions are not required for the app providing the field.

Example

// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.IssueCustomFieldOptionsAppsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

IssueCustomFieldOptionsAppsApi apiInstance = new IssueCustomFieldOptionsAppsApi();
String fieldKey = "fieldKey_example"; // String | 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\"`
Long optionId = 789L; // Long | The ID of the option to be returned.
try {
    IssueFieldOption result = apiInstance.getIssueFieldOption(fieldKey, optionId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueCustomFieldOptionsAppsApi#getIssueFieldOption");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
fieldKey String 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 and in the field details the value is returned in `key`. For example, `&quot;key&quot;: &quot;teams-add-on__team-issue-field&quot;`
optionId Long The ID of the option to be returned.

Return type

IssueFieldOption

Authorization

OAuth2basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getSelectableIssueFieldOptions

PageBeanIssueFieldOption getSelectableIssueFieldOptions(fieldKey, startAt, maxResults, projectId)

Get selectable issue field options

Returns a paginated 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 resource. Permissions required: Permission to access Jira.

Example

// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.IssueCustomFieldOptionsAppsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

IssueCustomFieldOptionsAppsApi apiInstance = new IssueCustomFieldOptionsAppsApi();
String fieldKey = "fieldKey_example"; // String | 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\"`
Long startAt = 0L; // Long | The index of the first item to return in a page of results (page offset).
Integer maxResults = 50; // Integer | The maximum number of items to return per page.
Long projectId = 789L; // Long | Filters the results to options that are only available in the specified project.
try {
    PageBeanIssueFieldOption result = apiInstance.getSelectableIssueFieldOptions(fieldKey, startAt, maxResults, projectId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueCustomFieldOptionsAppsApi#getSelectableIssueFieldOptions");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
fieldKey String 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 and in the field details the value is returned in `key`. For example, `&quot;key&quot;: &quot;teams-add-on__team-issue-field&quot;`
startAt Long The index of the first item to return in a page of results (page offset). [optional] [default to 0]
maxResults Integer The maximum number of items to return per page. [optional] [default to 50]
projectId Long Filters the results to options that are only available in the specified project. [optional]

Return type

PageBeanIssueFieldOption

Authorization

OAuth2basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getVisibleIssueFieldOptions

PageBeanIssueFieldOption getVisibleIssueFieldOptions(fieldKey, startAt, maxResults, projectId)

Get visible issue field options

Returns a paginated 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 resource. Permissions required: Permission to access Jira.

Example

// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.IssueCustomFieldOptionsAppsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

IssueCustomFieldOptionsAppsApi apiInstance = new IssueCustomFieldOptionsAppsApi();
String fieldKey = "fieldKey_example"; // String | 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\"`
Long startAt = 0L; // Long | The index of the first item to return in a page of results (page offset).
Integer maxResults = 56; // Integer | The maximum number of items to return per page.
Long projectId = 789L; // Long | Filters the results to options that are only available in the specified project.
try {
    PageBeanIssueFieldOption result = apiInstance.getVisibleIssueFieldOptions(fieldKey, startAt, maxResults, projectId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueCustomFieldOptionsAppsApi#getVisibleIssueFieldOptions");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
fieldKey String 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 and in the field details the value is returned in `key`. For example, `&quot;key&quot;: &quot;teams-add-on__team-issue-field&quot;`
startAt Long The index of the first item to return in a page of results (page offset). [optional] [default to 0]
maxResults Integer The maximum number of items to return per page. [optional]
projectId Long Filters the results to options that are only available in the specified project. [optional]

Return type

PageBeanIssueFieldOption

Authorization

OAuth2basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

replaceIssueFieldOption

replaceIssueFieldOption(fieldKey, optionId, replaceWith, jql)

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. This is an asynchronous operation. 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 resource. Permissions required: Administer Jira global permission. Jira permissions are not required for the app providing the field.

Example

// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.IssueCustomFieldOptionsAppsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

IssueCustomFieldOptionsAppsApi apiInstance = new IssueCustomFieldOptionsAppsApi();
String fieldKey = "fieldKey_example"; // String | 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\"`
Long optionId = 789L; // Long | The ID of the option to be deselected.
Long replaceWith = 789L; // Long | The ID of the option that will replace the currently selected option.
String jql = "jql_example"; // String | A JQL query that specifies the issues to be updated. For example, *project=10000*.
try {
    apiInstance.replaceIssueFieldOption(fieldKey, optionId, replaceWith, jql);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueCustomFieldOptionsAppsApi#replaceIssueFieldOption");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
fieldKey String 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 and in the field details the value is returned in `key`. For example, `&quot;key&quot;: &quot;teams-add-on__team-issue-field&quot;`
optionId Long The ID of the option to be deselected.
replaceWith Long The ID of the option that will replace the currently selected option. [optional]
jql String A JQL query that specifies the issues to be updated. For example, project=10000. [optional]

Return type

null (empty response body)

Authorization

OAuth2basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

updateIssueFieldOption

IssueFieldOption updateIssueFieldOption(body, fieldKey, optionId)

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 resource. Permissions required: Administer Jira global permission. Jira permissions are not required for the app providing the field.

Example

// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.IssueCustomFieldOptionsAppsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

IssueCustomFieldOptionsAppsApi apiInstance = new IssueCustomFieldOptionsAppsApi();
IssueFieldOption body = new IssueFieldOption(); // IssueFieldOption | 
String fieldKey = "fieldKey_example"; // String | 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\"`
Long optionId = 789L; // Long | The ID of the option to be updated.
try {
    IssueFieldOption result = apiInstance.updateIssueFieldOption(body, fieldKey, optionId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueCustomFieldOptionsAppsApi#updateIssueFieldOption");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body IssueFieldOption
fieldKey String 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 and in the field details the value is returned in `key`. For example, `&quot;key&quot;: &quot;teams-add-on__team-issue-field&quot;`
optionId Long The ID of the option to be updated.

Return type

IssueFieldOption

Authorization

OAuth2basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json