All URIs are relative to https://your-domain.atlassian.com
Method | HTTP request | Description |
---|---|---|
addVote | POST /rest/api/3/issue/{issueIdOrKey}/votes | Add vote |
getVotes | GET /rest/api/3/issue/{issueIdOrKey}/votes | Get votes |
removeVote | DELETE /rest/api/3/issue/{issueIdOrKey}/votes | Delete vote |
Object addVote(issueIdOrKey)
Add vote
Adds the user's vote to an issue. This is the equivalent of the user clicking Vote on an issue in Jira. This operation requires the Allow users to vote on issues option to be ON. This option is set in General configuration for Jira. See Configuring Jira application options for details. Permissions required: * Browse projects project permission for the project that the issue is in. * If issue-level security is configured, issue-level security permission to view the issue.
// 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.IssueVotesApi;
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");
IssueVotesApi apiInstance = new IssueVotesApi();
String issueIdOrKey = "issueIdOrKey_example"; // String | The ID or key of the issue.
try {
Object result = apiInstance.addVote(issueIdOrKey);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling IssueVotesApi#addVote");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
issueIdOrKey | String | The ID or key of the issue. |
Object
- Content-Type: Not defined
- Accept: application/json
Votes getVotes(issueIdOrKey)
Get votes
Returns details about the votes on an issue. This operation requires the Allow users to vote on issues option to be ON. This option is set in General configuration for Jira. See Configuring Jira application options for details. This operation can be accessed anonymously. Permissions required: * Browse projects project permission for the project that the issue is ini * If issue-level security is configured, issue-level security permission to view the issue. Note that users with the necessary permissions for this operation but without the View voters and watchers project permissions are not returned details in the `voters` field.
// 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.IssueVotesApi;
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");
IssueVotesApi apiInstance = new IssueVotesApi();
String issueIdOrKey = "issueIdOrKey_example"; // String | The ID or key of the issue.
try {
Votes result = apiInstance.getVotes(issueIdOrKey);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling IssueVotesApi#getVotes");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
issueIdOrKey | String | The ID or key of the issue. |
- Content-Type: Not defined
- Accept: application/json
removeVote(issueIdOrKey)
Delete vote
Deletes a user's vote from an issue. This is the equivalent of the user clicking Unvote on an issue in Jira. This operation requires the Allow users to vote on issues option to be ON. This option is set in General configuration for Jira. See Configuring Jira application options for details. Permissions required: * Browse projects project permission for the project that the issue is in. * If issue-level security is configured, issue-level security permission to view the issue.
// 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.IssueVotesApi;
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");
IssueVotesApi apiInstance = new IssueVotesApi();
String issueIdOrKey = "issueIdOrKey_example"; // String | The ID or key of the issue.
try {
apiInstance.removeVote(issueIdOrKey);
} catch (ApiException e) {
System.err.println("Exception when calling IssueVotesApi#removeVote");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
issueIdOrKey | String | The ID or key of the issue. |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined