All URIs are relative to https://your-domain.atlassian.com
Method | HTTP request | Description |
---|---|---|
createProjectCategory | POST /rest/api/3/projectCategory | Create project category |
getAllProjectCategories | GET /rest/api/3/projectCategory | Get all project categories |
getProjectCategoryById | GET /rest/api/3/projectCategory/{id} | Get project category by ID |
removeProjectCategory | DELETE /rest/api/3/projectCategory/{id} | Delete project category |
updateProjectCategory | PUT /rest/api/3/projectCategory/{id} | Update project category |
ProjectCategory createProjectCategory(body)
Create project category
Creates a project category. Permissions required: Administer Jira global permission.
// 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.ProjectCategoriesApi;
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");
ProjectCategoriesApi apiInstance = new ProjectCategoriesApi();
ProjectCategory body = new ProjectCategory(); // ProjectCategory |
try {
ProjectCategory result = apiInstance.createProjectCategory(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectCategoriesApi#createProjectCategory");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | ProjectCategory |
- Content-Type: application/json
- Accept: application/json
List<ProjectCategory> getAllProjectCategories()
Get all project categories
Returns all project categories. Permissions required: Permission to access Jira.
// 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.ProjectCategoriesApi;
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");
ProjectCategoriesApi apiInstance = new ProjectCategoriesApi();
try {
List<ProjectCategory> result = apiInstance.getAllProjectCategories();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectCategoriesApi#getAllProjectCategories");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
ProjectCategory getProjectCategoryById(id)
Get project category by ID
Returns a project category. Permissions required: Permission to access Jira.
// 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.ProjectCategoriesApi;
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");
ProjectCategoriesApi apiInstance = new ProjectCategoriesApi();
Long id = 789L; // Long | The ID of the project category.
try {
ProjectCategory result = apiInstance.getProjectCategoryById(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectCategoriesApi#getProjectCategoryById");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | Long | The ID of the project category. |
- Content-Type: Not defined
- Accept: application/json
removeProjectCategory(id)
Delete project category
Deletes a project category. Permissions required: Administer Jira global permission.
// 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.ProjectCategoriesApi;
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");
ProjectCategoriesApi apiInstance = new ProjectCategoriesApi();
Long id = 789L; // Long | ID of the project category to delete.
try {
apiInstance.removeProjectCategory(id);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectCategoriesApi#removeProjectCategory");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | Long | ID of the project category to delete. |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined
UpdatedProjectCategory updateProjectCategory(body, id)
Update project category
Updates a project category. Permissions required: Administer Jira global permission.
// 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.ProjectCategoriesApi;
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");
ProjectCategoriesApi apiInstance = new ProjectCategoriesApi();
ProjectCategory body = new ProjectCategory(); // ProjectCategory |
Long id = 789L; // Long |
try {
UpdatedProjectCategory result = apiInstance.updateProjectCategory(body, id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectCategoriesApi#updateProjectCategory");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | ProjectCategory | ||
id | Long |
- Content-Type: application/json
- Accept: application/json