Skip to content

Latest commit

 

History

History
231 lines (170 loc) · 7.78 KB

ProjectTypesApi.md

File metadata and controls

231 lines (170 loc) · 7.78 KB

ProjectTypesApi

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

Method HTTP request Description
getAccessibleProjectTypeByKey GET /rest/api/3/project/type/{projectTypeKey}/accessible Get accessible project type by key
getAllAccessibleProjectTypes GET /rest/api/3/project/type/accessible Get licensed project types
getAllProjectTypes GET /rest/api/3/project/type Get all project types
getProjectTypeByKey GET /rest/api/3/project/type/{projectTypeKey} Get project type by key

getAccessibleProjectTypeByKey

ProjectType getAccessibleProjectTypeByKey(projectTypeKey)

Get accessible project type by key

Returns a project type if it is accessible to the user. 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.ProjectTypesApi;

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

ProjectTypesApi apiInstance = new ProjectTypesApi();
String projectTypeKey = "projectTypeKey_example"; // String | The key of the project type.
try {
    ProjectType result = apiInstance.getAccessibleProjectTypeByKey(projectTypeKey);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ProjectTypesApi#getAccessibleProjectTypeByKey");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
projectTypeKey String The key of the project type. [enum: software, service_desk, business]

Return type

ProjectType

Authorization

OAuth2basicAuth

HTTP request headers

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

getAllAccessibleProjectTypes

List<ProjectType> getAllAccessibleProjectTypes()

Get licensed project types

Returns all project types with a valid license.

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

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

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

Parameters

This endpoint does not need any parameter.

Return type

List<ProjectType>

Authorization

OAuth2basicAuth

HTTP request headers

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

getAllProjectTypes

List<ProjectType> getAllProjectTypes()

Get all project types

Returns all project types, whether or not the instance has a valid license for each type. 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.ProjectTypesApi;

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

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

Parameters

This endpoint does not need any parameter.

Return type

List<ProjectType>

Authorization

OAuth2basicAuth

HTTP request headers

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

getProjectTypeByKey

ProjectType getProjectTypeByKey(projectTypeKey)

Get project type by key

Returns a project type. 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.ProjectTypesApi;

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

ProjectTypesApi apiInstance = new ProjectTypesApi();
String projectTypeKey = "projectTypeKey_example"; // String | The key of the project type.
try {
    ProjectType result = apiInstance.getProjectTypeByKey(projectTypeKey);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ProjectTypesApi#getProjectTypeByKey");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
projectTypeKey String The key of the project type. [enum: software, service_desk, business]

Return type

ProjectType

Authorization

OAuth2basicAuth

HTTP request headers

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