All URIs are relative to https://your-domain.atlassian.com
Method | HTTP request | Description |
---|---|---|
getProjectEmail | GET /rest/api/3/project/{projectId}/email | Get project's sender email |
updateProjectEmail | PUT /rest/api/3/project/{projectId}/email | Set project's sender email |
ProjectEmailAddress getProjectEmail(projectId)
Get project's sender email
Returns the project's sender email address. Permissions required: Browse projects project permission for the project.
// 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.ProjectEmailApi;
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");
ProjectEmailApi apiInstance = new ProjectEmailApi();
Long projectId = 789L; // Long | The project ID.
try {
ProjectEmailAddress result = apiInstance.getProjectEmail(projectId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectEmailApi#getProjectEmail");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
projectId | Long | The project ID. |
- Content-Type: Not defined
- Accept: application/json
Object updateProjectEmail(body, projectId)
Set project's sender email
Sets the project's sender email address. If `emailAddress` is an empty string, the default email address is restored. Permissions required: Browse projects project permission for the project.
// 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.ProjectEmailApi;
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");
ProjectEmailApi apiInstance = new ProjectEmailApi();
ProjectEmailAddress body = new ProjectEmailAddress(); // ProjectEmailAddress | The project's sender email address to be set.
Long projectId = 789L; // Long | The project ID.
try {
Object result = apiInstance.updateProjectEmail(body, projectId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProjectEmailApi#updateProjectEmail");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | ProjectEmailAddress | The project's sender email address to be set. | |
projectId | Long | The project ID. |
Object
- Content-Type: application/json
- Accept: application/json