Unable to get Team managed project data using Rest Api in Java

suranjan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 7, 2022

HI, I am trying to fetch Jira project details and others stuff using java. I want to do some CURD operation with my test data. we are doing automation kind of work using JAVA Rest API call which is provided by Atlassian URL.(https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/). But unable to get details using my credentials(Username and access token) in java code.

Note:- I have site  admin and project admin access. we want know any other access is also required for JAVA Jira connectivity?   

Code:- HttpResponse<JsonNode> response1 =    Unirest.get("https://mphasis.atlassian.net/rest/api/3/permissions")
.basicAuth("*********", "***********")
.header("Accept", "application/json")
.asJson();

Error :-  <?xml version="1.0" encoding="UTF-8" ?>
<permissions>
<DELETE_OWN_WORKLOGS>
<name>Delete Own Worklogs</name>
<description>Ability to delete own worklogs made on issues.</description>
<type>PROJECT</type>
<key>DELETE_OWN_WORKLOGS</key>
</DELETE_OWN_WORKLOGS>
<VIEW_AGGREGATED_DATA>
<name>View aggregated data</name>
<description>Users with this permission will have access to view combined and summarized project data, regardless of their individual permissions.</description>
<type>PROJECT</type>
<key>VIEW_AGGREGATED_DATA</key>
</VIEW_AGGREGATED_DATA>
<BULK_CHANGE>
<name>Make bulk changes</name>
<description>Modify collections of issues at once. For example, resolve multiple issues in one step.</description>
<type>GLOBAL</type>
<key>BULK_CHANGE</key>
</BULK_CHANGE>
<CREATE_ISSUES>
<name>Create Issues</name>
<description>Ability to create issues.</description>
<type>PROJECT</type>
<key>CREATE_ISSUES</key>
</CREATE_ISSUES>
<VIEW_DEV_TOOLS>
<name>View Development Tools</name>
<description>Allows users in a software project to view development-related information on the issue, such as commits, reviews and build information.</description>
<type>PROJECT</type>
<key>VIEW_DEV_TOOLS</key>
</VIEW_DEV_TOOLS>
<DELETE_OWN_COMMENTS>
<name>Delete Own Comments</name>
<description>Ability to delete own comments made on issues.</description>
<type>PROJECT</type>
<key>DELETE_OWN_COMMENTS</key>
</DELETE_OWN_COMMENTS>
<WORK_ON_ISSUES>
<name>Work On Issues</name>
<description>Ability to log work done against an issue. Only useful if Time Tracking is turned on.</description>
<type>PROJECT</type>
<key>WORK_ON_ISSUES</key>
</WORK_ON_ISSUES>
<MODIFY_REPORTER>
<name>Modify Reporter</name>
<description>Ability to modify the reporter when creating or editing an issue.</description>
<type>PROJECT</type>
<key>MODIFY_REPORTER</key>
</MODIFY_REPORTER>
<EDIT_ISSUES>
<name>Edit Issues</name>
<description>Ability to edit issues.</description>
<type>PROJECT</type>
<key>EDIT_ISSUES</key>
</EDIT_ISSUES>
<MANAGE_WATCHERS>
<name>Manage Watchers</name>
<description>Ability to manage the watchers of an issue.</description>
<type>PROJECT</type>
<key>MANAGE_WATCHERS</key>
</MANAGE_WATCHERS>
<ADD_COMMENTS>
<name>Add Comments</name>
<description>Ability to comment on issues.</description>
<type>PROJECT</type>
<key>ADD_COMMENTS</key>
</ADD_COMMENTS>
<VIEW_VOTERS_AND_WATCHERS>
<name>View Voters and Watchers</name>
<description>Ability to view the voters and watchers of an issue.</description>
<type>PROJECT</type>
<key>VIEW_VOTERS_AND_WATCHERS</key>
</VIEW_VOTERS_AND_WATCHERS>
<EDIT_OWN_COMMENTS>
<name>Edit Own Comments</name>
<description>Ability to edit own comments made on issues.</description>
<type>PROJECT</type>
<key>EDIT_OWN_COMMENTS</key>
</EDIT_OWN_COMMENTS>
<ASSIGN_ISSUES>
<name>Assign Issues</name>
<description>Ability to assign issues to other people.</description>
<type>PROJECT</type>
<key>ASSIGN_ISSUES</key>
</ASSIGN_ISSUES>
<BROWSE_PROJECTS>
<name>Browse Projects</name>
<description>Ability to browse projects and the issues within them.</description>
<type>PROJECT</type>
<key>BROWSE_PROJECTS</key>
</BROWSE_PROJECTS>
<DELETE_OWN_ATTACHMENTS>
<name>Delete Own Attachments</name>
<description>Users with this permission may delete own attachments.</description>
<type>PROJECT</type>
<key>DELETE_OWN_ATTACHMENTS</key>
</DELETE_OWN_ATTACHMENTS>
<DELETE_ALL_ATTACHMENTS>
<name>Delete All Attachments</name>
<description>Users with this permission may delete all attachments.</description>
<type>PROJECT</type>
<key>DELETE_ALL_ATTACHMENTS</key>
</DELETE_ALL_ATTACHMENTS>
<CREATE_PROJECT>
<name>Create next-gen projects</name>
<description>Create projects separate from shared configurations and schemes. Next-gen projects don&#x27;t affect existing projects or shared configurations like workflows, fields or permissions. Only licensed users can create next-gen projects.</description>
<type>GLOBAL</type>
<key>CREATE_PROJECT</key>
</CREATE_PROJECT>
<EDIT_OWN_WORKLOGS>
<name>Edit Own Worklogs</name>
<description>Ability to edit own worklogs made on issues.</description>
<type>PROJECT</type>
<key>EDIT_OWN_WORKLOGS</key>
</EDIT_OWN_WORKLOGS>
<CREATE_ATTACHMENTS>
<name>Create Attachments</name>
<description>Users with this permission may create attachments.</description>
<type>PROJECT</type>
<key>CREATE_ATTACHMENTS</key>
</CREATE_ATTACHMENTS>
<EDIT_ALL_WORKLOGS>
<name>Edit All Worklogs</name>
<description>Ability to edit all worklogs made on issues.</description>
<type>PROJECT</type>
<key>EDIT_ALL_WORKLOGS</key>
</EDIT_ALL_WORKLOGS>
<EDIT_ALL_COMMENTS>
<name>Edit All Comments</name>
<description>Ability to edit all comments made on issues.</description>
<type>PROJECT</type>
<key>EDIT_ALL_COMMENTS</key>
</EDIT_ALL_COMMENTS>
<CLOSE_ISSUES>
<name>Close Issues</name>
<description>Ability to close issues. Often useful where your developers resolve issues, and a QA department closes them.</description>
<type>PROJECT</type>
<key>CLOSE_ISSUES</key>
</CLOSE_ISSUES>
<MANAGE_SPRINTS_PERMISSION>
<name>Manage sprints</name>
<description>Ability to manage sprints.</description>
<type>PROJECT</type>
<key>MANAGE_SPRINTS_PERMISSION</key>
</MANAGE_SPRINTS_PERMISSION>
<SET_ISSUE_SECURITY>
<name>Set Issue Security</name>
<description>Ability to set the level of security on an issue so that only people in that security level can see the issue.</description>
<type>PROJECT</type>
<key>SET_ISSUE_SECURITY</key>
</SET_ISSUE_SECURITY>
<CREATE_SHARED_OBJECTS>
<name>Share dashboards and filters</name>
<description>Share dashboards and filters with other users.</description>
<type>GLOBAL</type>
<key>CREATE_SHARED_OBJECTS</key>
</CREATE_SHARED_OBJECTS>
<SCHEDULE_ISSUES>
<name>Schedule Issues</name>
<description>Ability to view or edit an issue&#x27;s due date.</description>
<type>PROJECT</type>
<key>SCHEDULE_ISSUES</key>
</SCHEDULE_ISSUES>
<USER_PICKER>
<name>Browse users and groups</name>
<description>View and select users or groups from the user picker, and share issues. Users with this permission can see the names of all users and groups on your site.</description>
<type>GLOBAL</type>
<key>USER_PICKER</key>
</USER_PICKER>
<ADMINISTER_PROJECTS>
<name>Administer Projects</name>
<description>Ability to administer a project in Jira.</description>
<type>PROJECT</type>
<key>ADMINISTER_PROJECTS</key>
</ADMINISTER_PROJECTS>
<DELETE_ALL_COMMENTS>
<name>Delete All Comments</name>
<description>Ability to delete all comments made on issues.</description>
<type>PROJECT</type>
<key>DELETE_ALL_COMMENTS</key>
</DELETE_ALL_COMMENTS>
<RESOLVE_ISSUES>
<name>Resolve Issues</name>
<description>Ability to resolve and reopen issues. This includes the ability to set a fix version.</description>
<type>PROJECT</type>
<key>RESOLVE_ISSUES</key>
</RESOLVE_ISSUES>
<DELETE_ISSUES>
<name>Delete Issues</name>
<description>Ability to delete issues.</description>
<type>PROJECT</type>
<key>DELETE_ISSUES</key>
</DELETE_ISSUES>
<MANAGE_GROUP_FILTER_SUBSCRIPTIONS>
<name>Manage group filter subscriptions</name>
<description>Create and delete group filter subscriptions.</description>
<type>GLOBAL</type>
<key>MANAGE_GROUP_FILTER_SUBSCRIPTIONS</key>
</MANAGE_GROUP_FILTER_SUBSCRIPTIONS>
<ADMINISTER>
<name>Administer Jira</name>
<description>Create and administer projects, issue types, fields, workflows, and schemes for all projects. Users with this permission can perform most administration tasks, except: managing users, importing data, and editing system email settings.</description>
<type>GLOBAL</type>
<key>ADMINISTER</key>
</ADMINISTER>
<VIEW_READONLY_WORKFLOW>
<name>View Read-Only Workflow</name>
<description>Users with this permission may view a read-only version of a workflow.</description>
<type>PROJECT</type>
<key>VIEW_READONLY_WORKFLOW</key>
</VIEW_READONLY_WORKFLOW>
<MOVE_ISSUES>
<name>Move Issues</name>
<description>Ability to move issues between projects or between workflows of the same project (if applicable). Note the user can only move issues to a project they have the create permission for.</description>
<type>PROJECT</type>
<key>MOVE_ISSUES</key>
</MOVE_ISSUES>
<ASSIGNABLE_USER>
<name>Assignable User</name>
<description>Users with this permission may be assigned to issues.</description>
<type>PROJECT</type>
<key>ASSIGNABLE_USER</key>
</ASSIGNABLE_USER>
<TRANSITION_ISSUES>
<name>Transition Issues</name>
<description>Ability to transition issues.</description>
<type>PROJECT</type>
<key>TRANSITION_ISSUES</key>
</TRANSITION_ISSUES>
<DELETE_ALL_WORKLOGS>
<name>Delete All Worklogs</name>
<description>Ability to delete all worklogs made on issues.</description>
<type>PROJECT</type>
<key>DELETE_ALL_WORKLOGS</key>
</DELETE_ALL_WORKLOGS>
<LINK_ISSUES>
<name>Link Issues</name>
<description>Ability to link issues together and create linked issues. Only useful if issue linking is turned on.</description>
<type>PROJECT</type>
<key>LINK_ISSUES</key>
</LINK_ISSUES>
<SYSTEM_ADMIN>
<name>Jira System Administrators</name>
<description>Ability to perform all administration functions. There must be at least one group with this permission.</description>
<type>GLOBAL</type>
<key>SYSTEM_ADMIN</key>
</SYSTEM_ADMIN>
</permissions>

 

 

1 answer

1 accepted

1 vote
Answer accepted
suranjan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 7, 2022

I got the solution. Thank you 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events