jira-rest-api

Spring boot and Jira REST API give dependency errors in maven

北城余情 提交于 2019-12-11 12:49:23
问题 project main dependencies <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.2.1.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>

JIRA Cloud REST API (OAuth 2.0) Error 403 on POST Requests

痴心易碎 提交于 2019-12-11 12:09:45
问题 I am trying to connect my React app to the Jira Cloud API and can't seem to get past a 403 error. My code currently does a Auth dance using OAuth 2.0 and returns the token and cloudid. I can use this to GET issues, however POST request (like creating an issue) return with 403. I have found here that this error is returned if the user does not have the necessary permission to access the resource or run the method. I have ensured the user has the correct scope ([write: jira-work, read: jira

Jira rest client in javascript giving error

萝らか妹 提交于 2019-12-11 10:34:29
问题 <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> </script> <script> $(document).ready(function(){ $.ajax({ type: "GET", dataType: 'jsonp', url: "http://myJira.com/rest/api/2/issue/MA-6614/comment", username : "myusrName", password : "myPwd", success: function (data) { console.log( "Sample of data:", JSON.stringify(data)); }, error: function (errormessage) { console.log( "errorMessage:", errormessage); } }); }); </script> </head> <body> </body> <

Jira API with python returns error 401 on valid credentials

杀马特。学长 韩版系。学妹 提交于 2019-12-11 08:23:52
问题 I am trying to use the Jira python library to do some quite basic things. Even before doing anything, the constructor fails. address = 'https://myaddress.atlassian.net' options = {'server': address} un = 'my@user.com' #un = 'my' #also doesn't work pw = 'the_pasSword!' cookie = (un, pw) j = JIRA(options, basic_auth=cookie) This is ALL the code. The last line fails with WARNING:root:Got recoverable error from GET https://myaddress.atlassian.net/rest/api/2/serverInfo, will retry [1/3] in 13

Get Credentials from Current User in Atlassian Plugin

。_饼干妹妹 提交于 2019-12-11 08:17:08
问题 is it possible to get Username and Password in a Confluence Plugin? The Usernam works for me like this: ApplicationUser user = userUtil.getUserByName(userManager.getRemoteUsername(request)); I want to connect to the Jira Rest Api with the current User. 回答1: As @Philipp Sander already commented, it is not possible to retrieve the user's password. Confluence only stores passwords in an encrypted way, so it doesn't even know user passwords. However, since you're talking about a Confluence plugin

JIRA creating issue using java

放肆的年华 提交于 2019-12-11 05:40:31
问题 What I'm trying to do is creating a new issue on JIRA over Java. Actually I'm on internship and didn't work with APIs before. Here is the code I found while studying JIRA's documents. Not sure if paramaters are wrong. public class ExampleCreateIssuesAsynchronous { private static URI jiraServerUri = URI.create("https://stajtest.atlassian.net/"); public static void main(String[] args) throws IOException { final AsynchronousJiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();

400 / 500 error adding worklog in Jira REST API

杀马特。学长 韩版系。学妹 提交于 2019-12-11 03:06:10
问题 I am ready to bang my head off a brick wall so would greatly appreciate any input on this. I am getting the above mentioned errors when I try to add a new worklog. The code to try and add the worklog.... // convert worklog to json string JavaScriptSerializer serializer = new JavaScriptSerializer(); string data = serializer.Serialize(worklog); // set up the web request HttpWebRequest request = WebRequest.Create(baseUrl) as HttpWebRequest; request.ContentType = "application/json"; request

How to Create a Issue into JIRA through REST api?

笑着哭i 提交于 2019-12-10 16:34:11
问题 I am sending the POST request to the JIRA with my json data for create a project, but I am unable to create a project into JIRA, I tried to see the error from the Fiddler and I got following error. I am using the C# and created console application for it. My JSON data which I am posting is following. { "fields": { "project": { "key": "JTL" }, "issuetype": { "name": "BUG" } } } Error Message is following: {"errorMessages":[],"errors":{"issuetype":"issue type is required"}} I am posting json

JIRA REST API to get work log - “You do not have the permission to see the specified issue”

自闭症网瘾萝莉.ら 提交于 2019-12-10 15:42:34
问题 I want to get work log of a specified issue on Jira. According to this document https://docs.atlassian.com/jira/REST/latest/#d2e774 I'm using this format giving my issue id: /rest/api/2/issue/{issueIdOrKey}/worklog Although I have logged in Jira, I got this error: {"errorMessages":["You do not have the permission to see the specified issue.","Login Required"],"errors":{}} Besides, I can see work log on Jira's interface. I don't think there is an permission constraint. Any help to solve? 回答1:

Adding attachment to Jira's api

时光总嘲笑我的痴心妄想 提交于 2019-12-10 15:19:40
问题 I am trying to attach a file to a Jira case, using their API. I am doing this in Drupal 6 (PHP v.5.0). Here is the code I have: $ch = curl_init(); $header = array( 'Content-Type: multipart/form-data', 'X-Atlassian-Token: no-check' ); $attachmentPath = $this->get_file_uploads(); //$attachmentPath comes out to be something like: //http://localhost/mySite/web/system/files/my_folder/DSC_0344_3.JPG $data = array('file'=>"@". $attachmentPath, 'filename'=>'test.png'); $url= 'https://mysite.atlassian