Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New JIRA 5 REST API

  • 479 views
Uploaded on

The existence of an API allows developers to extend software so as to cater for unique use cases beyond the software's original scope. Administrators and end users of JIRA 5 can expect its REST API to …

The existence of an API allows developers to extend software so as to cater for unique use cases beyond the software's original scope. Administrators and end users of JIRA 5 can expect its REST API to enable the creation of integrated applications to solve their unique concerns. This presentation aims to describe ways in which the JIRA 5 REST API can be used to make a tangible impact for the end user. Several use cases will be discussed, ranging from running simple command line apps, through to creating web applications that integrate with the JIRA 5 REST API.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
479
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
9
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • \n
  • Quick intro to Abhinav. Mention Trineo (nothing OTT).\n
  • Quick intro to the talk.\n
  • This slide can be used to break up the chapters of your talk - this would be the start to a new chapter\n- OR -\nThis could be used for making a single statement of a few words or a sentence.\n\nYou should choose one or the other, so that there’s a consistent system.\n
  • Move fast through this, and illustrate the reason why REST is well loved today.\nAll resources share a uniform interface.\n
  • Move fast through this, and illustrate the reason why REST is well loved today.\nAll resources share a uniform interface.\n
  • Move fast through this, and illustrate the reason why REST is well loved today.\nAll resources share a uniform interface.\n
  • this can be used for key ideas that you want people to tweet\n
  • \n
  • \n
  • Quickly illustrate how the well known data within JIRA can be accessed via the API.\n
  • Quickly illustrate how the well known data within JIRA can be accessed via the API.\n
  • Quickly illustrate how the well known data within JIRA can be accessed via the API.\n
  • Quickly illustrate how the well known data within JIRA can be accessed via the API.\n
  • Quickly illustrate how the well known data within JIRA can be accessed via the API.\n
  • Quickly illustrate how the well known data within JIRA can be accessed via the API.\n
  • Expand on the HTTP verbs as well as illustrate the uniform interface.\n
  • Expand on the HTTP verbs as well as illustrate the uniform interface.\n
  • Expand on the HTTP verbs as well as illustrate the uniform interface.\n
  • Expand on the HTTP verbs as well as illustrate the uniform interface.\n
  • Expand on the HTTP verbs as well as illustrate the uniform interface.\n
  • Expand on the HTTP verbs as well as illustrate the uniform interface.\n
  • Will elaborate on cookies in particular apart from the preferred http-basic and oauth approaches. Will point out the nice Rich Manalang oauth dance examples repo.\n
  • Will elaborate on cookies in particular apart from the preferred http-basic and oauth approaches. Will point out the nice Rich Manalang oauth dance examples repo.\n
  • \n
  • oauth basics - important to cover this\n
  • oauth basics - important to cover this\n
  • oauth basics - important to cover this\n
  • oauth basics - important to cover this\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Just meditating on what else I should cover...not sure whether I want to launch into the JIRA REST Browser here, or subsequently in the “useful resources” section. Either way I would like to show JSON representations, some auth patterns.\n
  • Just meditating on what else I should cover...not sure whether I want to launch into the JIRA REST Browser here, or subsequently in the “useful resources” section. Either way I would like to show JSON representations, some auth patterns.\n
  • \n
  • \n
  • Just meditating on what else I should cover...not sure whether I want to launch into the JIRA REST Browser here, or subsequently in the “useful resources” section. Either way I would like to show JSON representations, some auth patterns.\n
  • Flip over to my browser to show great docs on Atlassian developer site, docs site, and studio for JRJC.\n
  • Browse to the Trineo Ruby gem to flick through the README quickly.\n
  • \n
  • WIP. Not showing code, perhaps will show the console connecting to a locally running instance of JIRA. Follow the README in the Trineo gem repo.\n\n
  • WIP. Not showing code, perhaps will show the console connecting to a locally running instance of JIRA. Follow the README in the Trineo gem repo.\n\n
  • this can be used for key ideas that you want people to tweet\n
  • WIP. Idea is to show adding comments to an existing issue in JIRA using conversational theming (speech bubbles). Here’s one I prepared earlier ...\n
  • fin\n

Transcript

  • 1. Extend your use of JIRA.Solve your unique concerns.An exposé of the new JIRA 5 REST APIAbhinav Keswani // @wasabhiPrincipal, Bespoke Solutions // trineo.com.au // @trineoltd
  • 2. What lies ahead?• JIRA 5 REST API • Structure, Authentication, and Entity Expansion• Remote Apps: Key concepts.• How to begin? Useful resources.• In the wild: Use cases and examples of web apps.
  • 3. REST(an extremely brief overview)
  • 4. Representational State Transfer
  • 5. Representational State Transfer• Client/Server requests/responses are to facilitate the transfer of representations of resources.
  • 6. Representational State Transfer• Client/Server requests/responses are to facilitate the transfer of representations of resources.• Resources are sources of specific information with a unique identifier.
  • 7. Representational State Transfer• Client/Server requests/responses are to facilitate the transfer of representations of resources.• Resources are sources of specific information with a unique identifier.• Uniform interface; identify/manipulate resources, self descriptive messages, hypermedia used for application state.
  • 8. Hearing @wasabhi talk about the JIRA 5 REST API -a uniform interface for extensive integration. #summit12
  • 9. JIRA 5 REST API
  • 10. Resources
  • 11. ASSIGNEE COMMENTVOTES ISSUEWATCHERS WORKLOG
  • 12. ASSIGNEE COMMENTVOTES ISSUEWATCHERS WORKLOG COMPONENTS PROJECT VERSIONS
  • 13. ASSIGNEE COMMENT VOTES ISSUE WATCHERSUSER WORKLOG COMPONENTS PROJECT VERSIONS
  • 14. ASSIGNEESEARCH COMMENT VOTES ISSUE WATCHERSUSER WORKLOG COMPONENTS PROJECT VERSIONS
  • 15. ASSIGNEESEARCH COMMENT VOTES ISSUE FILTER WATCHERSUSER WORKLOG COMPONENTS PROJECT VERSIONS
  • 16. FIELD ASSIGNEESEARCH COMMENT VOTES ISSUE FILTER WATCHERSUSER WORKLOG COMPONENTS PROJECT VERSIONS
  • 17. REST URI Structure
  • 18. REST URI Structurehttp://host:port/context/rest/api-name/api-version/resource-name
  • 19. REST URI Structurehttp://host:port/context/rest/api-name/api-version/resource-name http://example.com:8080/jira/rest/api/2/issue [POST]
  • 20. REST URI Structurehttp://host:port/context/rest/api-name/api-version/resource-name http://example.com:8080/jira/rest/api/2/issue [POST] http://example.com:8080/jira/rest/api/2/issue/{issueIdOrKey} [GET, DELETE, PUT]
  • 21. REST URI Structurehttp://host:port/context/rest/api-name/api-version/resource-name http://example.com:8080/jira/rest/api/2/issue [POST] http://example.com:8080/jira/rest/api/2/issue/{issueIdOrKey} [GET, DELETE, PUT] http://example.com:8080/jira/rest/api/2/issue/{issueIdOrKey}/assignee [PUT]
  • 22. REST URI Structurehttp://host:port/context/rest/api-name/api-version/resource-name http://example.com:8080/jira/rest/api/2/issue [POST] http://example.com:8080/jira/rest/api/2/issue/{issueIdOrKey} [GET, DELETE, PUT] http://example.com:8080/jira/rest/api/2/issue/{issueIdOrKey}/assignee [PUT] http://example.com:8080/jira/rest/api/2/issue/{issueIdOrKey}/comments [GET, POST]
  • 23. REST URI Structurehttp://host:port/context/rest/api-name/api-version/resource-name http://example.com:8080/jira/rest/api/2/issue [POST] http://example.com:8080/jira/rest/api/2/issue/{issueIdOrKey} [GET, DELETE, PUT] http://example.com:8080/jira/rest/api/2/issue/{issueIdOrKey}/assignee [PUT] http://example.com:8080/jira/rest/api/2/issue/{issueIdOrKey}/comments [GET, POST] http://example.com:8080/jira/rest/api/2/issue/{issueIdOrKey}/comment/{id} [GET, PUT, DELETE]
  • 24. Authentication HTTP BASIC (SSL) OAUTH ...and...HTTP Cookies, Trusted Applications, OS Username & Password
  • 25. Response Notation JSON
  • 26. OAuth (1.0a)
  • 27. Your app is the “Consumer”. JIRA is the “Service Provider”. You must register your app as an“application link”, which can be identified by JIRA using a “consumer key”, and a public key (x509 RSA-SHA1).
  • 28. • You request a token from the service provider.• Do this by presenting a signed request including your consumer key.Consumer. Service Provider Request Grant Request Token Request Token
  • 29. • The service provider grants you a request token.• The token does not authorize you yet.• The end user must authenticate with the service provider and authorize access for the consumer. Consumer. Service ProviderDirect End User to Obtain Service Provider User Authorization Direct End User To Consumer
  • 30. • The end user authorized Consumer access, and the Consumer was presented with an oauth token.• Use the oauth token to request an access token from the Service Provider. Consumer. Service Provider Request Grant Access Token Access Token AccessProtected Resources
  • 31. Entity Expansion
  • 32. Entity ExpansionThe expand query parameter allows a comma-separatedlist of identifiers to expand.The motivation is to save CPU and network traffic.
  • 33. Entity ExpansionSpecify expansion of entities within another entity usingdot notation. For example ?expand=starships.warpexpands the starships collection and also the warpproperty on each starship.
  • 34. remoteapps
  • 35. Remoteapps Key ConceptsA Remote App is a web application thatruns outside the Atlassian application, andyet is accessible by it.
  • 36. Remoteapps Key ConceptsAs a result, no code is executed on theAtlassian application, but instead, contentfrom the Remote App is included inAtlassian application pages or renderingprocesses.
  • 37. Remoteapps Key ConceptsIn the other direction, a Remote App cansubscribe to key events via web hooks toenable more complex workflowintegrations.
  • 38. Remoteapps Key ConceptsCommunication to and from the RemoteApp is secured through OAuth.
  • 39. Remoteapps Key ConceptsRemote Apps can be written in anyapplication language and deployed on anyserver, as long as it is reachable from theAtlassian application over web protocols.
  • 40. Key Concepts ★ Secure ★ You are in control of ★ form and function ★ performance and scale ★ Bi directional communication yields superb efficient result
  • 41. Go learn more ...Don Brown: Plugins OnDemandwith RemoteApps. ...tomorrow 11:20-12:00
  • 42. Useful Resources
  • 43. Choose your weapon.• Customise your integration. CLI or Web usage. • JIRA Java REST Client (JRJC) • JIRA Ruby Gem • Python CLI for JIRA • JIRA Issue Collector (JavaScript)
  • 44. Go learn more ...Ben Speakmon: JIRA REST Clientfor Python. ...tomorrow 14:50-15:00
  • 45. Oodles of great docs...
  • 46. Quick look at the Ruby gem.
  • 47. In The Wild
  • 48. JIRA on Ruby Console
  • 49. JIRA on Rails
  • 50. Thanks @wizzfiz for letting @wasabhi come out toplay! #summit12
  • 51. Documentationhttps://developer.atlassian.com/static/rest/jira/5.0.htmlhttps://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Tutorialshttps://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+OAuth+authenticationhttps://developer.atlassian.com/display/REST/REST+API+Developer+Documentationhttp://www.25hoursaday.com/weblog/2008/08/17/ExplainingRESTToDamienKatz.aspx
  • 52. Thank you!