Skip to content

Latest commit

 

History

History
237 lines (176 loc) · 14.5 KB

JiraSettingsApi.md

File metadata and controls

237 lines (176 loc) · 14.5 KB

JiraSettingsApi

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

Method HTTP request Description
getAdvancedSettings GET /rest/api/3/application-properties/advanced-settings Get advanced settings
getApplicationProperty GET /rest/api/3/application-properties Get application property
getConfiguration GET /rest/api/3/configuration Get global settings
setApplicationProperty PUT /rest/api/3/application-properties/{id} Set application property

getAdvancedSettings

List<ApplicationProperty> getAdvancedSettings()

Get advanced settings

Returns the application properties that are accessible on the Advanced Settings page. To navigate to the Advanced Settings page in Jira, choose the Jira icon > Jira settings > System, General Configuration and then click Advanced Settings (in the upper right). Permissions required: Administer Jira global permission.

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.JiraSettingsApi;

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");

JiraSettingsApi apiInstance = new JiraSettingsApi();
try {
    List<ApplicationProperty> result = apiInstance.getAdvancedSettings();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling JiraSettingsApi#getAdvancedSettings");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

List<ApplicationProperty>

Authorization

OAuth2basicAuth

HTTP request headers

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

getApplicationProperty

List<ApplicationProperty> getApplicationProperty(key, permissionLevel, keyFilter)

Get application property

Returns all application properties or an application property. If you specify a value for the `key` parameter, then an application property is returned as an object (not in an array). Otherwise, an array of all editable application properties is returned. See Set application property for descriptions of editable properties. Permissions required: Administer Jira global permission.

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.JiraSettingsApi;

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");

JiraSettingsApi apiInstance = new JiraSettingsApi();
String key = "key_example"; // String | The key of the application property.
String permissionLevel = "permissionLevel_example"; // String | The permission level of all items being returned in the list.
String keyFilter = "keyFilter_example"; // String | When a `key` isn't provided, this filters the list of results by the application property `key` using a regular expression. For example, using `jira.lf.*` will return all application properties with keys that start with *jira.lf.*.
try {
    List<ApplicationProperty> result = apiInstance.getApplicationProperty(key, permissionLevel, keyFilter);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling JiraSettingsApi#getApplicationProperty");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
key String The key of the application property. [optional]
permissionLevel String The permission level of all items being returned in the list. [optional]
keyFilter String When a `key` isn't provided, this filters the list of results by the application property `key` using a regular expression. For example, using `jira.lf.*` will return all application properties with keys that start with jira.lf.. [optional]

Return type

List<ApplicationProperty>

Authorization

OAuth2basicAuth

HTTP request headers

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

getConfiguration

ModelConfiguration getConfiguration()

Get global settings

Returns the global settings in Jira. These settings determine whether optional features (for example, subtasks, time tracking, and others) are enabled. If time tracking is enabled, this operation also returns the time tracking configuration. This operation can be accessed anonymously. Permissions required: None.

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.JiraSettingsApi;

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");

JiraSettingsApi apiInstance = new JiraSettingsApi();
try {
    ModelConfiguration result = apiInstance.getConfiguration();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling JiraSettingsApi#getConfiguration");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

ModelConfiguration

Authorization

OAuth2basicAuth

HTTP request headers

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

setApplicationProperty

ApplicationProperty setApplicationProperty(body, id)

Set application property

Changes the value of an application property. For example, you can change the value of the `jira.clone.prefix` from its default value of CLONE - to Clone - if you prefer sentence case capitalization. Editable properties are described below along with their default values. #### Advanced settings #### The advanced settings below are also accessible in Jira. | Key | Description | Default value | | -- | -- | -- | | `jira.clone.prefix` | The string of text prefixed to the title of a cloned issue. | `CLONE -` | | `jira.date.picker.java.format` | The date format for the Java (server-side) generated dates. This must be the same as the `jira.date.picker.javascript.format` format setting. | `d/MMM/yy` | | `jira.date.picker.javascript.format` | The date format for the JavaScript (client-side) generated dates. This must be the same as the `jira.date.picker.java.format` format setting. | `%e/%b/%y` | | `jira.date.time.picker.java.format` | The date format for the Java (server-side) generated date times. This must be the same as the `jira.date.time.picker.javascript.format` format setting. | `dd/MMM/yy h:mm a` | | `jira.date.time.picker.javascript.format` | The date format for the JavaScript (client-side) generated date times. This must be the same as the `jira.date.time.picker.java.format` format setting. | `%e/%b/%y %I:%M %p` | | `jira.issue.actions.order` | The default order of actions (such as Comments or Change history) displayed on the issue view. | `asc` | | `jira.table.cols.subtasks` | The columns to show while viewing subtask issues in a table. For example, a list of subtasks on an issue. | `issuetype, status, assignee, progress` | | `jira.view.issue.links.sort.order` | The sort order of the list of issue links on the issue view. | `type, status, priority` | | `jira.comment.collapsing.minimum.hidden` | The minimum number of comments required for comment collapsing to occur. A value of `0` disables comment collapsing. | `4` | | `jira.newsletter.tip.delay.days` | The number of days before a prompt to sign up to the Jira Insiders newsletter is shown. A value of `-1` disables this feature. | `7` | #### Look and feel #### The settings listed below adjust the look and feel. | Key | Description | Default value | | -- | -- | -- | | `jira.lf.date.time` | The time format. | `h:mm a` | | `jira.lf.date.day` | The day format. | `EEEE h:mm a` | | `jira.lf.date.complete` | The date and time format. | `dd/MMM/yy h:mm a` | | `jira.lf.date.dmy` | The date format. | `dd/MMM/yy` | | `jira.date.time.picker.use.iso8061` | When enabled, sets Monday as the first day of the week in the date picker, as specified by the ISO8601 standard. | `false` | | `jira.lf.logo.url` | The URL of the logo image file. | `/images/icon-jira-logo.png` | | `jira.lf.logo.show.application.title` | Controls the visibility of the application title on the sidebar. | `false` | | `jira.lf.favicon.url` | The URL of the favicon. | `/favicon.ico` | | `jira.lf.favicon.hires.url` | The URL of the high-resolution favicon. | `/images/64jira.png` | | `jira.lf.top.adg3.bgcolour` | The background color of the sidebar. | `#0747A6` | | `jira.lf.top.adg3.textcolour` | The color of the text and logo of the sidebar. | `#DEEBFF` | | `jira.lf.hero.button.base.bg.colour` | The background color of the hero button. | `#3b7fc4` | | `jira.title` | The text for the application title. The application title can also be set in General settings. | `Jira` | | `jira.option.globalsharing` | Whether filters and dashboards can be shared with anyone signed into Jira. | `true` | | `xflow.product.suggestions.enabled` | Whether to expose product suggestions for other Atlassian products within Jira. | `true` | #### Other settings #### | Key | Description | Default value | | -- | -- | -- | | `jira.issuenav.criteria.autoupdate` | Whether instant updates to search criteria is active. | `true` | Note: Be careful when changing application properties and advanced settings. Permissions required: Administer Jira global permission.

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.JiraSettingsApi;

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");

JiraSettingsApi apiInstance = new JiraSettingsApi();
SimpleApplicationPropertyBean body = new SimpleApplicationPropertyBean(); // SimpleApplicationPropertyBean | 
String id = "id_example"; // String | The key of the application property to update.
try {
    ApplicationProperty result = apiInstance.setApplicationProperty(body, id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling JiraSettingsApi#setApplicationProperty");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body SimpleApplicationPropertyBean
id String The key of the application property to update.

Return type

ApplicationProperty

Authorization

OAuth2basicAuth

HTTP request headers

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