[LRA-100] Research the JIRA API Created: 04/Mar/14 Updated: 21/Mar/14 Resolved: 17/Mar/14 |
|
| Status: | Resolved |
| Project: | Liferay Apps |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | mcalvo | Assignee: | mcalvo |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 6d | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | 6d | ||
| Attachments: |
|
| Description |
|
Research the JIRA API:
https://docs.atlassian.com/jira/REST/latest/ After you have done your research, you have to come up with a document in which you have to present the features of this API: what can be done with it and how to do it. You have 5 days to research the API and 1 day to develop a document in which you present your findings. |
| Comments |
| Comment by Eugenio Segura [X] (Inactive) [ 10/Mar/14 ] |
| Test Comment |
| Comment by Eugenio Segura [X] (Inactive) [ 10/Mar/14 ] |
| Other Test Comment |
| Comment by mcalvo [ 10/Mar/14 ] |
|
If you need a JIRA server to test the API you can download a trial version from here:
https://www.atlassian.com/software/jira/download o setup a cloud account here (requires a credit card, that would be charged $10 after evaluation period): https://www.atlassian.com/ondemand/signup/?product=jira.ondemand If you have downloaded the app for local installation follow these steps: Summary from here: https://confluence.atlassian.com/display/JIRA/Installing+JIRA+from+an+Archive+File+on+Windows%2C+Linux+or+Solaris + extract JIRA zip + Edit <jira-application-dir>/atlassian-jira/WEB-INF/classes/jira-application.properties and set value for jira.home. It is a new folder that you need to create. I doesn't have to be inside <jira-application-dir>. + Uncomment line in file and set a value: <jira-application-dir>/bin/setenv.sh and set a value for #JIRA_HOME="" + Run start-jira.sh. In the same folder where that .sh file is, run this: tail -f ../logs/catalina.out to check the logs until you see "INFO: Server startup in X ms" + Access JIRA in browser: http://localhost:8080/secure/MyJiraHome.jspa + In the setup web page select: - Built in DB. - Private Mode. - Create an account and/or generate license key - Create an admin account To test the REST API calls you can use the REST API Browser. You can access it here: http://localhost:8080/plugins/servlet/restbrowser#/ if it is not included in your installation you can get it from here: https://marketplace.atlassian.com/plugins/com.atlassian.labs.rest-api-browser |
| Comment by mcalvo [ 10/Mar/14 ] |
|
A web client can't make the REST calls to a JIRA that is running on a different domain (CORS request), because of browsers' same domain restrictions. See:
http://stackoverflow.com/questions/19821753/jquery-xml-error-no-access-control-allow-origin-header-is-present-on-the-req JIRA doesn't support CORS requests: https://answers.atlassian.com/questions/69356/cross-origin-resource-sharing-with-jira-rest-api-and-javascript We need to make these REST calls from the server side. We can use this Java library to do that (but it only supports HTTP basic authentication, hopefully through SSL, OAuth is not supported by that library yet): https://ecosystem.atlassian.net/wiki/display/JRJC/Home In addition OAuth requires setup at the server side, which might be a blocker for this app adoption: https://confluence.atlassian.com/display/JIRA/Allowing+OAuth+Access |
| Comment by mcalvo [ 10/Mar/14 ] |
|
Eugenio because we can't use Ajax calls, use the REST API Browser plugin and test the API. Create a document with your ideas for the initial integration: + How the interface might look like. + The set of rest calls needed (that will be executed at the backend side). + You can expect that the backend side will provide you the JSON object as it comes from the JIRA. |
| Comment by Eugenio Segura [X] (Inactive) [ 17/Mar/14 ] |
| Hi Steven here's the document https://docs.google.com/a/rivetlogic.com/document/d/1-pYNLH7h-MEGs5XUROJ8vhgKVKwueWiNBMKbB4fsMHE/edit?usp=sharing |