Skip to content

Latest commit

 

History

History
607 lines (454 loc) · 24.8 KB

IssueTypeSchemesApi.md

File metadata and controls

607 lines (454 loc) · 24.8 KB

IssueTypeSchemesApi

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

Method HTTP request Description
addIssueTypesToIssueTypeScheme PUT /rest/api/3/issuetypescheme/{issueTypeSchemeId}/issuetype Add issue types to issue type scheme
assignIssueTypeSchemeToProject PUT /rest/api/3/issuetypescheme/project Assign issue type scheme to project
createIssueTypeScheme POST /rest/api/3/issuetypescheme Create issue type scheme
deleteIssueTypeScheme DELETE /rest/api/3/issuetypescheme/{issueTypeSchemeId} Delete issue type scheme
getAllIssueTypeSchemes GET /rest/api/3/issuetypescheme Get all issue type schemes
getIssueTypeSchemeForProjects GET /rest/api/3/issuetypescheme/project Get issue type schemes for projects
getIssueTypeSchemesMapping GET /rest/api/3/issuetypescheme/mapping Get issue type scheme items
removeIssueTypeFromIssueTypeScheme DELETE /rest/api/3/issuetypescheme/{issueTypeSchemeId}/issuetype/{issueTypeId} Remove issue type from issue type scheme
reorderIssueTypesInIssueTypeScheme PUT /rest/api/3/issuetypescheme/{issueTypeSchemeId}/issuetype/move Change order of issue types
updateIssueTypeScheme PUT /rest/api/3/issuetypescheme/{issueTypeSchemeId} Update issue type scheme

addIssueTypesToIssueTypeScheme

Object addIssueTypesToIssueTypeScheme(body, issueTypeSchemeId)

Add issue types to issue type scheme

Adds issue types to an issue type scheme. The added issue types are appended to the issue types list. If any of the issue types exist in the issue type scheme, the operation fails and no issue types are added. 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.IssueTypeSchemesApi;

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

IssueTypeSchemesApi apiInstance = new IssueTypeSchemesApi();
IssueTypeIDs body = new IssueTypeIDs(); // IssueTypeIDs | 
Long issueTypeSchemeId = 789L; // Long | The ID of the issue type scheme.
try {
    Object result = apiInstance.addIssueTypesToIssueTypeScheme(body, issueTypeSchemeId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueTypeSchemesApi#addIssueTypesToIssueTypeScheme");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body IssueTypeIDs
issueTypeSchemeId Long The ID of the issue type scheme.

Return type

Object

Authorization

OAuth2basicAuth

HTTP request headers

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

assignIssueTypeSchemeToProject

Object assignIssueTypeSchemeToProject(body)

Assign issue type scheme to project

Assigns an issue type scheme to a project. If any issues in the project are assigned issue types not present in the new scheme, the operation will fail. To complete the assignment those issues must be updated to use issue types in the new scheme. Issue type schemes can only be assigned to classic projects. 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.IssueTypeSchemesApi;

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

IssueTypeSchemesApi apiInstance = new IssueTypeSchemesApi();
IssueTypeSchemeProjectAssociation body = new IssueTypeSchemeProjectAssociation(); // IssueTypeSchemeProjectAssociation | 
try {
    Object result = apiInstance.assignIssueTypeSchemeToProject(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueTypeSchemesApi#assignIssueTypeSchemeToProject");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body IssueTypeSchemeProjectAssociation

Return type

Object

Authorization

OAuth2basicAuth

HTTP request headers

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

createIssueTypeScheme

IssueTypeSchemeID createIssueTypeScheme(body)

Create issue type scheme

Creates an issue type scheme. 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.IssueTypeSchemesApi;

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

IssueTypeSchemesApi apiInstance = new IssueTypeSchemesApi();
IssueTypeSchemeDetails body = new IssueTypeSchemeDetails(); // IssueTypeSchemeDetails | 
try {
    IssueTypeSchemeID result = apiInstance.createIssueTypeScheme(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueTypeSchemesApi#createIssueTypeScheme");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body IssueTypeSchemeDetails

Return type

IssueTypeSchemeID

Authorization

OAuth2basicAuth

HTTP request headers

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

deleteIssueTypeScheme

Object deleteIssueTypeScheme(issueTypeSchemeId)

Delete issue type scheme

Deletes an issue type scheme. Only issue type schemes used in classic projects can be deleted. Any projects assigned to the scheme are reassigned to the default issue type scheme. 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.IssueTypeSchemesApi;

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

IssueTypeSchemesApi apiInstance = new IssueTypeSchemesApi();
Long issueTypeSchemeId = 789L; // Long | The ID of the issue type scheme.
try {
    Object result = apiInstance.deleteIssueTypeScheme(issueTypeSchemeId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueTypeSchemesApi#deleteIssueTypeScheme");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
issueTypeSchemeId Long The ID of the issue type scheme.

Return type

Object

Authorization

OAuth2basicAuth

HTTP request headers

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

getAllIssueTypeSchemes

PageBeanIssueTypeScheme getAllIssueTypeSchemes(startAt, maxResults, id)

Get all issue type schemes

Returns a paginated list of issue type schemes. Only issue type schemes used in classic projects are returned. 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.IssueTypeSchemesApi;

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

IssueTypeSchemesApi apiInstance = new IssueTypeSchemesApi();
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.
List<Long> id = Arrays.asList(56L); // List<Long> | The list of issue type schemes IDs. To include multiple IDs, provide an ampersand-separated list. For example, `id=10000&id=10001`.
try {
    PageBeanIssueTypeScheme result = apiInstance.getAllIssueTypeSchemes(startAt, maxResults, id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueTypeSchemesApi#getAllIssueTypeSchemes");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
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]
id List<Long> The list of issue type schemes IDs. To include multiple IDs, provide an ampersand-separated list. For example, `id=10000&id=10001`. [optional]

Return type

PageBeanIssueTypeScheme

Authorization

OAuth2basicAuth

HTTP request headers

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

getIssueTypeSchemeForProjects

PageBeanIssueTypeSchemeProjects getIssueTypeSchemeForProjects(projectId, startAt, maxResults)

Get issue type schemes for projects

Returns a paginated list of issue type schemes and, for each issue type scheme, a list of the projects that use it. Only issue type schemes used in classic projects are returned. 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.IssueTypeSchemesApi;

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

IssueTypeSchemesApi apiInstance = new IssueTypeSchemesApi();
List<Long> projectId = Arrays.asList(56L); // List<Long> | The list of project IDs. To include multiple project IDs, provide an ampersand-separated list. For example, `projectId=10000&projectId=10001`.
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 {
    PageBeanIssueTypeSchemeProjects result = apiInstance.getIssueTypeSchemeForProjects(projectId, startAt, maxResults);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueTypeSchemesApi#getIssueTypeSchemeForProjects");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
projectId List<Long> The list of project IDs. To include multiple project IDs, provide an ampersand-separated list. For example, `projectId=10000&projectId=10001`.
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

PageBeanIssueTypeSchemeProjects

Authorization

OAuth2basicAuth

HTTP request headers

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

getIssueTypeSchemesMapping

PageBeanIssueTypeSchemeMapping getIssueTypeSchemesMapping(startAt, maxResults, issueTypeSchemeId)

Get issue type scheme items

Returns a paginated list of issue type scheme items. Only issue type scheme items used in classic projects are returned. 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.IssueTypeSchemesApi;

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

IssueTypeSchemesApi apiInstance = new IssueTypeSchemesApi();
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.
List<Long> issueTypeSchemeId = Arrays.asList(56L); // List<Long> | The list of issue type scheme IDs. To include multiple IDs, provide an ampersand-separated list. For example, `issueTypeSchemeId=10000&issueTypeSchemeId=10001`.
try {
    PageBeanIssueTypeSchemeMapping result = apiInstance.getIssueTypeSchemesMapping(startAt, maxResults, issueTypeSchemeId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueTypeSchemesApi#getIssueTypeSchemesMapping");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
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]
issueTypeSchemeId List<Long> The list of issue type scheme IDs. To include multiple IDs, provide an ampersand-separated list. For example, `issueTypeSchemeId=10000&issueTypeSchemeId=10001`. [optional]

Return type

PageBeanIssueTypeSchemeMapping

Authorization

OAuth2basicAuth

HTTP request headers

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

removeIssueTypeFromIssueTypeScheme

Object removeIssueTypeFromIssueTypeScheme(issueTypeSchemeId, issueTypeId)

Remove issue type from issue type scheme

Removes an issue type from an issue type scheme. This operation cannot remove: * any issue type used by issues. * any issue types from the default issue type scheme. * the last standard issue type from an issue type scheme. 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.IssueTypeSchemesApi;

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

IssueTypeSchemesApi apiInstance = new IssueTypeSchemesApi();
Long issueTypeSchemeId = 789L; // Long | The ID of the issue type scheme.
Long issueTypeId = 789L; // Long | The ID of the issue type.
try {
    Object result = apiInstance.removeIssueTypeFromIssueTypeScheme(issueTypeSchemeId, issueTypeId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueTypeSchemesApi#removeIssueTypeFromIssueTypeScheme");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
issueTypeSchemeId Long The ID of the issue type scheme.
issueTypeId Long The ID of the issue type.

Return type

Object

Authorization

OAuth2basicAuth

HTTP request headers

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

reorderIssueTypesInIssueTypeScheme

Object reorderIssueTypesInIssueTypeScheme(body, issueTypeSchemeId)

Change order of issue types

Changes the order of issue types in an issue type scheme. The request body parameters must meet the following requirements: * all of the issue types must belong to the issue type scheme. * either `after` or `position` must be provided. * the issue type in `after` must not be in the issue type list. 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.IssueTypeSchemesApi;

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

IssueTypeSchemesApi apiInstance = new IssueTypeSchemesApi();
OrderOfIssueTypes body = new OrderOfIssueTypes(); // OrderOfIssueTypes | 
Long issueTypeSchemeId = 789L; // Long | The ID of the issue type scheme.
try {
    Object result = apiInstance.reorderIssueTypesInIssueTypeScheme(body, issueTypeSchemeId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueTypeSchemesApi#reorderIssueTypesInIssueTypeScheme");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body OrderOfIssueTypes
issueTypeSchemeId Long The ID of the issue type scheme.

Return type

Object

Authorization

OAuth2basicAuth

HTTP request headers

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

updateIssueTypeScheme

Object updateIssueTypeScheme(body, issueTypeSchemeId)

Update issue type scheme

Updates an issue type scheme. 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.IssueTypeSchemesApi;

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

IssueTypeSchemesApi apiInstance = new IssueTypeSchemesApi();
IssueTypeSchemeUpdateDetails body = new IssueTypeSchemeUpdateDetails(); // IssueTypeSchemeUpdateDetails | 
Long issueTypeSchemeId = 789L; // Long | The ID of the issue type scheme.
try {
    Object result = apiInstance.updateIssueTypeScheme(body, issueTypeSchemeId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueTypeSchemesApi#updateIssueTypeScheme");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body IssueTypeSchemeUpdateDetails
issueTypeSchemeId Long The ID of the issue type scheme.

Return type

Object

Authorization

OAuth2basicAuth

HTTP request headers

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