Skip to content

Latest commit

 

History

History
294 lines (217 loc) · 10.5 KB

IssueLinkTypesApi.md

File metadata and controls

294 lines (217 loc) · 10.5 KB

IssueLinkTypesApi

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

Method HTTP request Description
createIssueLinkType POST /rest/api/3/issueLinkType Create issue link type
deleteIssueLinkType DELETE /rest/api/3/issueLinkType/{issueLinkTypeId} Delete issue link type
getIssueLinkType GET /rest/api/3/issueLinkType/{issueLinkTypeId} Get issue link type
getIssueLinkTypes GET /rest/api/3/issueLinkType Get issue link types
updateIssueLinkType PUT /rest/api/3/issueLinkType/{issueLinkTypeId} Update issue link type

createIssueLinkType

IssueLinkType createIssueLinkType(body)

Create issue link type

Creates an issue link type. Use this operation to create descriptions of the reasons why issues are linked. The issue link type consists of a name and descriptions for a link's inward and outward relationships. To use this operation, the site must have issue linking enabled. 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.IssueLinkTypesApi;

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

IssueLinkTypesApi apiInstance = new IssueLinkTypesApi();
IssueLinkType body = new IssueLinkType(); // IssueLinkType | 
try {
    IssueLinkType result = apiInstance.createIssueLinkType(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueLinkTypesApi#createIssueLinkType");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body IssueLinkType

Return type

IssueLinkType

Authorization

OAuth2basicAuth

HTTP request headers

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

deleteIssueLinkType

deleteIssueLinkType(issueLinkTypeId)

Delete issue link type

Deletes an issue link type. To use this operation, the site must have issue linking enabled. 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.IssueLinkTypesApi;

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

IssueLinkTypesApi apiInstance = new IssueLinkTypesApi();
String issueLinkTypeId = "issueLinkTypeId_example"; // String | The ID of the issue link type.
try {
    apiInstance.deleteIssueLinkType(issueLinkTypeId);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueLinkTypesApi#deleteIssueLinkType");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
issueLinkTypeId String The ID of the issue link type.

Return type

null (empty response body)

Authorization

OAuth2basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getIssueLinkType

IssueLinkType getIssueLinkType(issueLinkTypeId)

Get issue link type

Returns an issue link type. To use this operation, the site must have issue linking enabled. This operation can be accessed anonymously. Permissions required: Browse projects project permission for a project in the site.

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

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

IssueLinkTypesApi apiInstance = new IssueLinkTypesApi();
String issueLinkTypeId = "issueLinkTypeId_example"; // String | The ID of the issue link type.
try {
    IssueLinkType result = apiInstance.getIssueLinkType(issueLinkTypeId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueLinkTypesApi#getIssueLinkType");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
issueLinkTypeId String The ID of the issue link type.

Return type

IssueLinkType

Authorization

OAuth2basicAuth

HTTP request headers

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

getIssueLinkTypes

IssueLinkTypes getIssueLinkTypes()

Get issue link types

Returns a list of all issue link types. To use this operation, the site must have issue linking enabled. This operation can be accessed anonymously. Permissions required: Browse projects project permission for a project in the site.

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

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

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

Parameters

This endpoint does not need any parameter.

Return type

IssueLinkTypes

Authorization

OAuth2basicAuth

HTTP request headers

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

updateIssueLinkType

IssueLinkType updateIssueLinkType(body, issueLinkTypeId)

Update issue link type

Updates an issue link type. To use this operation, the site must have issue linking enabled. 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.IssueLinkTypesApi;

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

IssueLinkTypesApi apiInstance = new IssueLinkTypesApi();
IssueLinkType body = new IssueLinkType(); // IssueLinkType | 
String issueLinkTypeId = "issueLinkTypeId_example"; // String | The ID of the issue link type.
try {
    IssueLinkType result = apiInstance.updateIssueLinkType(body, issueLinkTypeId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueLinkTypesApi#updateIssueLinkType");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body IssueLinkType
issueLinkTypeId String The ID of the issue link type.

Return type

IssueLinkType

Authorization

OAuth2basicAuth

HTTP request headers

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