All URIs are relative to https://your-domain.atlassian.com
Method | HTTP request | Description |
---|---|---|
getAvailableTimeTrackingImplementations | GET /rest/api/3/configuration/timetracking/list | Get all time tracking providers |
getSelectedTimeTrackingImplementation | GET /rest/api/3/configuration/timetracking | Get selected time tracking provider |
getSharedTimeTrackingConfiguration | GET /rest/api/3/configuration/timetracking/options | Get time tracking settings |
selectTimeTrackingImplementation | PUT /rest/api/3/configuration/timetracking | Select time tracking provider |
setSharedTimeTrackingConfiguration | PUT /rest/api/3/configuration/timetracking/options | Set time tracking settings |
List<TimeTrackingProvider> getAvailableTimeTrackingImplementations()
Get all time tracking providers
Returns all time tracking providers. By default, Jira only has one time tracking provider: JIRA provided time tracking. However, you can install other time tracking providers via apps from the Atlassian Marketplace. For more information on time tracking providers, see the documentation for the Time Tracking Provider module. 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.TimeTrackingApi;
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");
TimeTrackingApi apiInstance = new TimeTrackingApi();
try {
List<TimeTrackingProvider> result = apiInstance.getAvailableTimeTrackingImplementations();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TimeTrackingApi#getAvailableTimeTrackingImplementations");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
TimeTrackingProvider getSelectedTimeTrackingImplementation()
Get selected time tracking provider
Returns the time tracking provider that is currently selected. Note that if time tracking is disabled, then a successful but empty response is returned. 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.TimeTrackingApi;
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");
TimeTrackingApi apiInstance = new TimeTrackingApi();
try {
TimeTrackingProvider result = apiInstance.getSelectedTimeTrackingImplementation();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TimeTrackingApi#getSelectedTimeTrackingImplementation");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
TimeTrackingConfiguration getSharedTimeTrackingConfiguration()
Get time tracking settings
Returns the time tracking settings. This includes settings such as the time format, default time unit, and others. For more information, see Configuring time tracking. 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.TimeTrackingApi;
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");
TimeTrackingApi apiInstance = new TimeTrackingApi();
try {
TimeTrackingConfiguration result = apiInstance.getSharedTimeTrackingConfiguration();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TimeTrackingApi#getSharedTimeTrackingConfiguration");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Object selectTimeTrackingImplementation(body)
Select time tracking provider
Selects a time tracking provider. 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.TimeTrackingApi;
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");
TimeTrackingApi apiInstance = new TimeTrackingApi();
TimeTrackingProvider body = new TimeTrackingProvider(); // TimeTrackingProvider |
try {
Object result = apiInstance.selectTimeTrackingImplementation(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TimeTrackingApi#selectTimeTrackingImplementation");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | TimeTrackingProvider |
Object
- Content-Type: application/json
- Accept: application/json
TimeTrackingConfiguration setSharedTimeTrackingConfiguration(body)
Set time tracking settings
Sets the time tracking settings. 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.TimeTrackingApi;
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");
TimeTrackingApi apiInstance = new TimeTrackingApi();
TimeTrackingConfiguration body = new TimeTrackingConfiguration(); // TimeTrackingConfiguration |
try {
TimeTrackingConfiguration result = apiInstance.setSharedTimeTrackingConfiguration(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TimeTrackingApi#setSharedTimeTrackingConfiguration");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | TimeTrackingConfiguration |
- Content-Type: application/json
- Accept: application/json