SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Downloaden Sie, um offline zu lesen
June 3-5, 2014 | Berlin, Germany
Steve Lancashire, Senior Developer - Confluence Platform, Atlassian
Introducing the
Confluence REST
API
Confluence Platform
Tweet any questions using #confluenceREST
Confluence Platform Goal
Make Confluence a simple, fast, reliable
product, and platform supporting
content applications, for the next ten
years.
”
“
Confluence Platform
Who are our “customers”?
Other
Atlassian	

Devs
Internal	

Confluence	

Devs
Our
Ecosystem	

(you)
Remote APIs - the past
SOAP and	

Xml RPC
!
Json
RPC
Prototype
REST	

(read only)
Feature specific
REST Resources
Many different APIs
• Developing a feature could end up using all of them!
• RPC and SOAP ignores the architecture of the Web!
• Incompatible representations between APIs!
• No cross version stability for feature specific resources
Confluence REST API
Tweet any questions using #confluenceREST
• Language agnostic!
• Doesn’t ignore the architecture of the web!
• cross version stability guarantees
Benefits of a REST API
Features of our REST API
• Default JSON representation!
• Hypermedia inside entities!
• Embed entities through expansions!
• Common Content model
• Paginated, filterable list of content!
• Content is any page, blogpost,
comment or attachment in
Confluence!
• Initially terse, but accepts nested
expansions!
• lets have a look at it
/rest/api/content
GET
Tooltip:	

The most readily available REST client
is your browser install a JSON
formatting extension, like JSONView
for Chrome
DEMO - list content
https://confluence.atlassian.com/rest/api/content
• Retrieve a piece of content by id!
• has a default set of expansions!
• supports nested, dot separated
expansions!
• example : confluence.atlassian.com/
rest/api/content/12
/api/content/{id}
GET
Tooltip:	

The most readily available REST client
is your browser install a JSON
formatting extension, like JSONView
for Chrome
Content Body Representations
STORAGE EDITOR	

(internal)
VIEW	

(read only)
WIKI	

(write only)
• Converts content representations
from one representation to another!
• lets have a look at an example using
cURL!
• you can find more about storage
format on confluence.atlassian.com!
!
!
!
…/contentbody/convert/{to}
POST
Tooltip:	

cURL is a simple command line tool,
there are some cUrl examples using
the new REST API on
developer.atlassian.com
DEMO - Convert content
curl -u admin:admin -X POST -H 'Content-Type: application/json'
-d'{"value":"<ac:structured-macro ac:name="cheese" /
>","representation":"storage"}' "http://localhost:8080/confluence/
rest/api/contentbody/convert/view" | python mjson.tool
• Creates a new piece of content!
• Similar required fields as creating
content in the Confluence Editor!
• create from STORAGE, EDITOR
or WIKI content representations!
• returns the new piece of content
with generated id
/api/content/
POST
Tooltip:	

The REST API Browser on Atlassian
Marketplace provides a useful UI for
exploring the REST API
DEMO - Creating Content
http://localhost:8080/confluence/plugins/servlet/restbrowser#/resource/api-content/POST
!
{
"title" : "Atlascamp 2014",
"type" : "page",
"body" : {
"storage" : {"value" : "<p>Hi everyone</p>", “representation":"storage"}
},
"space" : {"key":"DS"}
}
• Modify and delete existing content!
• Modifying requires an explicit version increment!
• DELETE removes the content from the resource
and moves it to the trash
/api/content/{id}
PUT / DELETE
DEMO - Updating Content
https://stevelan.jira-dev.com/wiki/plugins/servlet/restbrowser#/resource/api-content-id/PUT
!
{
"id":4685825,
"type":"page",
“body":{"storage":
{
"representation":"storage",
"value":"<p>Hi to everyone else</p>“}
},
"version":{"number":2}
}
Content Properties
A key / value store for the REST API
Content Properties
• Key / value store of properties on
content!
• Store up to 32KB of JSON!
• Great for Atlassian Connect
• Collection of properties on a piece of content!
• GET to fetch all properties !
• POST to create a new property!
!
/api/content/{id}/property
GET / POST
/api/content/{id}/property/arbitrary-key
• GET a particular property by specifying the key!
• PUT the value to update!
• DELETE removes the property
/api/content/{id}/property/{key}
GET / PUT / DELETE
{!
!! “key” : “arbitrary-key”, !
!! “value” : { “random-json“: “data” } !
!! ...!
}
/api/content/{id}/property/arbitrary-key
DEMO - add a property
chrome://apps/
• spaces, child content, content
history, labels!
• API Reference docs can be found
via developer.atlassian.com!
• or google : confluence rest api docs
Plus lots more
• More small script examples on developer.atlassian.com
More examples
• Can extend the API with
metadata!
• P2 plugins can surface their
feature through the API!
• Implement
ModelMetadataProvider interface
Extending the API
ADVANCED TOPICS
• Capabilities API since Confluence 5.0!
• provides api “feature” discovery!
• confluence-content-api indicates the presence of the api
Migrating to the new API
ADVANCED TOPICS
“application” : “confluence”, !
“capabilities” : {!
!! “confluence-content-api“: “/rest/api/content”,!
!! ! … !
}
/rest/capabilities
So what is next?
CQL
Confluence Query Language for the REST API
• Query language for finding content !
• Similar to JQL / SQL where clause!
• API only, not user facing!
• i.e.: space in (DEV, DOCS) and title ~ “rest api”!
What is CQL?
• Flexible!
• Fast!
• Familiar
CQL Benefits
Functions!
• similar to JQL functions!
• i.e. creator = currentUser()
Extensibility
CQL BENEFITS
Fields!
• plugins can add indexed fields to the CQL grammar!
• i.e. macro = cheese
!
• https://pug.jira.com/wiki/plugins/cqlsearch/cql.action
Demo
Before and After
1.0 - MVP!
• Existing fields in the index!
• Extensible fields and functions!
• Operators : =, !=, ~, !~, <=, >=,
IN, NOT IN, EMPTY
• 1.1 Expand the index!
• Indexing service for plugins!
• Additional fields from plugin
data stored in AO!
• Content properties
CQL Roadmap
Questions
Tweet any questions using #confluenceREST
Thank you
Go build something awesome!

Weitere ähnliche Inhalte

Was ist angesagt?

Unleash the power of HTTP with ASP.NET Web API
Unleash the power of HTTP with ASP.NET Web APIUnleash the power of HTTP with ASP.NET Web API
Unleash the power of HTTP with ASP.NET Web APIFilip W
 
Building an API using Grape
Building an API using GrapeBuilding an API using Grape
Building an API using Grapevisnu priya
 
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!Evan Mullins
 
WordPress REST API v2: Overview & Exploring
WordPress REST API v2: Overview & ExploringWordPress REST API v2: Overview & Exploring
WordPress REST API v2: Overview & ExploringNick Pelton
 
Creating hypermedia APIs in a few minutes using the API Platform framework
Creating hypermedia APIs in a few minutes using the API Platform frameworkCreating hypermedia APIs in a few minutes using the API Platform framework
Creating hypermedia APIs in a few minutes using the API Platform frameworkLes-Tilleuls.coop
 
Building Your Own Development Tools With the Force.com Tooling API
Building Your Own Development Tools With the Force.com Tooling APIBuilding Your Own Development Tools With the Force.com Tooling API
Building Your Own Development Tools With the Force.com Tooling APISalesforce Developers
 
Padrino - the Godfather of Sinatra
Padrino - the Godfather of SinatraPadrino - the Godfather of Sinatra
Padrino - the Godfather of SinatraStoyan Zhekov
 
Maine WordPress Meetup JSON REST API, 3/16/2016
Maine WordPress Meetup JSON REST API, 3/16/2016Maine WordPress Meetup JSON REST API, 3/16/2016
Maine WordPress Meetup JSON REST API, 3/16/2016Andre Gagnon
 
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with  PHP, HTML & Javascript  in AIRBuilding Desktop RIAs with  PHP, HTML & Javascript  in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIRfunkatron
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on RailsAlessandro DS
 
Building RESTful APIs w/ Grape
Building RESTful APIs w/ GrapeBuilding RESTful APIs w/ Grape
Building RESTful APIs w/ GrapeDaniel Doubrovkine
 
Elixir と Maru で REST API
Elixir と Maru で REST APIElixir と Maru で REST API
Elixir と Maru で REST APIKohei Kimura
 
Introduction to Alfresco Surf Platform
Introduction to Alfresco Surf PlatformIntroduction to Alfresco Surf Platform
Introduction to Alfresco Surf PlatformAlfresco Software
 
REST Development made Easy with ColdFusion Aether
REST Development made Easy with ColdFusion AetherREST Development made Easy with ColdFusion Aether
REST Development made Easy with ColdFusion AetherPavan Kumar
 
Introduction to React Native & Redux
Introduction to React Native & ReduxIntroduction to React Native & Redux
Introduction to React Native & ReduxBarak Cohen
 
Ria Development With Flex And PHP
Ria Development With Flex And PHPRia Development With Flex And PHP
Ria Development With Flex And PHPJohn Coggeshall
 
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)Chris O'Brien
 
20180618 wwdc cherrypick_xcode10beta
20180618 wwdc cherrypick_xcode10beta20180618 wwdc cherrypick_xcode10beta
20180618 wwdc cherrypick_xcode10betaトニー 森田
 

Was ist angesagt? (20)

Unleash the power of HTTP with ASP.NET Web API
Unleash the power of HTTP with ASP.NET Web APIUnleash the power of HTTP with ASP.NET Web API
Unleash the power of HTTP with ASP.NET Web API
 
Building an API using Grape
Building an API using GrapeBuilding an API using Grape
Building an API using Grape
 
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
WordCamp Raleigh 2016 - WP API, What is it good for? Absolutely Everything!
 
WordPress REST API v2: Overview & Exploring
WordPress REST API v2: Overview & ExploringWordPress REST API v2: Overview & Exploring
WordPress REST API v2: Overview & Exploring
 
Creating hypermedia APIs in a few minutes using the API Platform framework
Creating hypermedia APIs in a few minutes using the API Platform frameworkCreating hypermedia APIs in a few minutes using the API Platform framework
Creating hypermedia APIs in a few minutes using the API Platform framework
 
WDI-Poject-4-README
WDI-Poject-4-READMEWDI-Poject-4-README
WDI-Poject-4-README
 
Building Your Own Development Tools With the Force.com Tooling API
Building Your Own Development Tools With the Force.com Tooling APIBuilding Your Own Development Tools With the Force.com Tooling API
Building Your Own Development Tools With the Force.com Tooling API
 
Padrino - the Godfather of Sinatra
Padrino - the Godfather of SinatraPadrino - the Godfather of Sinatra
Padrino - the Godfather of Sinatra
 
Maine WordPress Meetup JSON REST API, 3/16/2016
Maine WordPress Meetup JSON REST API, 3/16/2016Maine WordPress Meetup JSON REST API, 3/16/2016
Maine WordPress Meetup JSON REST API, 3/16/2016
 
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with  PHP, HTML & Javascript  in AIRBuilding Desktop RIAs with  PHP, HTML & Javascript  in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIR
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
 
Building RESTful APIs w/ Grape
Building RESTful APIs w/ GrapeBuilding RESTful APIs w/ Grape
Building RESTful APIs w/ Grape
 
Elixir と Maru で REST API
Elixir と Maru で REST APIElixir と Maru で REST API
Elixir と Maru で REST API
 
Introduction to Alfresco Surf Platform
Introduction to Alfresco Surf PlatformIntroduction to Alfresco Surf Platform
Introduction to Alfresco Surf Platform
 
REST Development made Easy with ColdFusion Aether
REST Development made Easy with ColdFusion AetherREST Development made Easy with ColdFusion Aether
REST Development made Easy with ColdFusion Aether
 
Introduction to React Native & Redux
Introduction to React Native & ReduxIntroduction to React Native & Redux
Introduction to React Native & Redux
 
Design REST APIs using RAML
Design REST APIs using RAMLDesign REST APIs using RAML
Design REST APIs using RAML
 
Ria Development With Flex And PHP
Ria Development With Flex And PHPRia Development With Flex And PHP
Ria Development With Flex And PHP
 
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
 
20180618 wwdc cherrypick_xcode10beta
20180618 wwdc cherrypick_xcode10beta20180618 wwdc cherrypick_xcode10beta
20180618 wwdc cherrypick_xcode10beta
 

Ähnlich wie AtlasCamp2014: Introducing the Confluence REST API

JSON REST API for WordPress
JSON REST API for WordPressJSON REST API for WordPress
JSON REST API for WordPressTaylor Lovett
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformAntonio Peric-Mazar
 
Harnessing Free Content with Web Service APIs
Harnessing Free Content with Web Service APIsHarnessing Free Content with Web Service APIs
Harnessing Free Content with Web Service APIsALATechSource
 
Be a microservices hero
Be a microservices heroBe a microservices hero
Be a microservices heroOpenRestyCon
 
Writing Usable REST APIs. Javier Ramirez
Writing Usable REST APIs. Javier RamirezWriting Usable REST APIs. Javier Ramirez
Writing Usable REST APIs. Javier RamirezFuture Insights
 
Building Usable REST APIs. By Javier Ramirez, teowaki. FOWA London
Building Usable REST APIs. By Javier Ramirez, teowaki. FOWA LondonBuilding Usable REST APIs. By Javier Ramirez, teowaki. FOWA London
Building Usable REST APIs. By Javier Ramirez, teowaki. FOWA Londonjavier ramirez
 
Practices and tools for building better API (JFall 2013)
Practices and tools for building better API (JFall 2013)Practices and tools for building better API (JFall 2013)
Practices and tools for building better API (JFall 2013)Peter Hendriks
 
Practices and tools for building better APIs
Practices and tools for building better APIsPractices and tools for building better APIs
Practices and tools for building better APIsNLJUG
 
How to – rest api proxy to soap webservice
How to – rest api proxy to soap webserviceHow to – rest api proxy to soap webservice
How to – rest api proxy to soap webserviceSon Nguyen
 
A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)Julien SIMON
 
Building Content-Rich Java Apps in the Cloud with the Alfresco API
Building Content-Rich Java Apps in the Cloud with the Alfresco APIBuilding Content-Rich Java Apps in the Cloud with the Alfresco API
Building Content-Rich Java Apps in the Cloud with the Alfresco APIJeff Potts
 
Building Better Web APIs with Rails
Building Better Web APIs with RailsBuilding Better Web APIs with Rails
Building Better Web APIs with RailsAll Things Open
 
Documenting REST APIs
Documenting REST APIsDocumenting REST APIs
Documenting REST APIsTom Johnson
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Tom Johnson
 
GraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer toolsGraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer toolsSashko Stubailo
 
API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)Tom Johnson
 
RESTful web APIs (build, document, manage)
RESTful web APIs (build, document, manage)RESTful web APIs (build, document, manage)
RESTful web APIs (build, document, manage)Cisco DevNet
 
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms BootcampMike Melusky
 
PLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring SurfPLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring SurfAlfresco Software
 
2.28.17 Introducing DSpace 7 Webinar Slides
2.28.17 Introducing DSpace 7 Webinar Slides2.28.17 Introducing DSpace 7 Webinar Slides
2.28.17 Introducing DSpace 7 Webinar SlidesDuraSpace
 

Ähnlich wie AtlasCamp2014: Introducing the Confluence REST API (20)

JSON REST API for WordPress
JSON REST API for WordPressJSON REST API for WordPress
JSON REST API for WordPress
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
Harnessing Free Content with Web Service APIs
Harnessing Free Content with Web Service APIsHarnessing Free Content with Web Service APIs
Harnessing Free Content with Web Service APIs
 
Be a microservices hero
Be a microservices heroBe a microservices hero
Be a microservices hero
 
Writing Usable REST APIs. Javier Ramirez
Writing Usable REST APIs. Javier RamirezWriting Usable REST APIs. Javier Ramirez
Writing Usable REST APIs. Javier Ramirez
 
Building Usable REST APIs. By Javier Ramirez, teowaki. FOWA London
Building Usable REST APIs. By Javier Ramirez, teowaki. FOWA LondonBuilding Usable REST APIs. By Javier Ramirez, teowaki. FOWA London
Building Usable REST APIs. By Javier Ramirez, teowaki. FOWA London
 
Practices and tools for building better API (JFall 2013)
Practices and tools for building better API (JFall 2013)Practices and tools for building better API (JFall 2013)
Practices and tools for building better API (JFall 2013)
 
Practices and tools for building better APIs
Practices and tools for building better APIsPractices and tools for building better APIs
Practices and tools for building better APIs
 
How to – rest api proxy to soap webservice
How to – rest api proxy to soap webserviceHow to – rest api proxy to soap webservice
How to – rest api proxy to soap webservice
 
A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)A 60-mn tour of AWS compute (March 2016)
A 60-mn tour of AWS compute (March 2016)
 
Building Content-Rich Java Apps in the Cloud with the Alfresco API
Building Content-Rich Java Apps in the Cloud with the Alfresco APIBuilding Content-Rich Java Apps in the Cloud with the Alfresco API
Building Content-Rich Java Apps in the Cloud with the Alfresco API
 
Building Better Web APIs with Rails
Building Better Web APIs with RailsBuilding Better Web APIs with Rails
Building Better Web APIs with Rails
 
Documenting REST APIs
Documenting REST APIsDocumenting REST APIs
Documenting REST APIs
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
 
GraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer toolsGraphQL: Enabling a new generation of API developer tools
GraphQL: Enabling a new generation of API developer tools
 
API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)
 
RESTful web APIs (build, document, manage)
RESTful web APIs (build, document, manage)RESTful web APIs (build, document, manage)
RESTful web APIs (build, document, manage)
 
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms Bootcamp
 
PLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring SurfPLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring Surf
 
2.28.17 Introducing DSpace 7 Webinar Slides
2.28.17 Introducing DSpace 7 Webinar Slides2.28.17 Introducing DSpace 7 Webinar Slides
2.28.17 Introducing DSpace 7 Webinar Slides
 

Mehr von Atlassian

International Women's Day 2020
International Women's Day 2020International Women's Day 2020
International Women's Day 2020Atlassian
 
10 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 202010 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 2020Atlassian
 
Forge App Showcase
Forge App ShowcaseForge App Showcase
Forge App ShowcaseAtlassian
 
Let's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UILet's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UIAtlassian
 
Meet the Forge Runtime
Meet the Forge RuntimeMeet the Forge Runtime
Meet the Forge RuntimeAtlassian
 
Forge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User ExperienceForge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User ExperienceAtlassian
 
Take Action with Forge Triggers
Take Action with Forge TriggersTake Action with Forge Triggers
Take Action with Forge TriggersAtlassian
 
Observability and Troubleshooting in Forge
Observability and Troubleshooting in ForgeObservability and Troubleshooting in Forge
Observability and Troubleshooting in ForgeAtlassian
 
Trusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy ModelTrusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy ModelAtlassian
 
Designing Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI SystemDesigning Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI SystemAtlassian
 
Forge: Under the Hood
Forge: Under the HoodForge: Under the Hood
Forge: Under the HoodAtlassian
 
Access to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIsAccess to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIsAtlassian
 
Design Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch PluginDesign Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch PluginAtlassian
 
Tear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the BuildingTear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the BuildingAtlassian
 
Nailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that MatterNailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that MatterAtlassian
 
Building Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in MindBuilding Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in MindAtlassian
 
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...Atlassian
 
Beyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced TeamsBeyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced TeamsAtlassian
 
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed TeamThe Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed TeamAtlassian
 
Building Apps With Enterprise in Mind
Building Apps With Enterprise in MindBuilding Apps With Enterprise in Mind
Building Apps With Enterprise in MindAtlassian
 

Mehr von Atlassian (20)

International Women's Day 2020
International Women's Day 2020International Women's Day 2020
International Women's Day 2020
 
10 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 202010 emerging trends that will unbreak your workplace in 2020
10 emerging trends that will unbreak your workplace in 2020
 
Forge App Showcase
Forge App ShowcaseForge App Showcase
Forge App Showcase
 
Let's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UILet's Build an Editor Macro with Forge UI
Let's Build an Editor Macro with Forge UI
 
Meet the Forge Runtime
Meet the Forge RuntimeMeet the Forge Runtime
Meet the Forge Runtime
 
Forge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User ExperienceForge UI: A New Way to Customize the Atlassian User Experience
Forge UI: A New Way to Customize the Atlassian User Experience
 
Take Action with Forge Triggers
Take Action with Forge TriggersTake Action with Forge Triggers
Take Action with Forge Triggers
 
Observability and Troubleshooting in Forge
Observability and Troubleshooting in ForgeObservability and Troubleshooting in Forge
Observability and Troubleshooting in Forge
 
Trusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy ModelTrusted by Default: The Forge Security & Privacy Model
Trusted by Default: The Forge Security & Privacy Model
 
Designing Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI SystemDesigning Forge UI: A Story of Designing an App UI System
Designing Forge UI: A Story of Designing an App UI System
 
Forge: Under the Hood
Forge: Under the HoodForge: Under the Hood
Forge: Under the Hood
 
Access to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIsAccess to User Activities - Activity Platform APIs
Access to User Activities - Activity Platform APIs
 
Design Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch PluginDesign Your Next App with the Atlassian Vendor Sketch Plugin
Design Your Next App with the Atlassian Vendor Sketch Plugin
 
Tear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the BuildingTear Up Your Roadmap and Get Out of the Building
Tear Up Your Roadmap and Get Out of the Building
 
Nailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that MatterNailing Measurement: a Framework for Measuring Metrics that Matter
Nailing Measurement: a Framework for Measuring Metrics that Matter
 
Building Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in MindBuilding Apps With Color Blind Users in Mind
Building Apps With Color Blind Users in Mind
 
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
 
Beyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced TeamsBeyond Diversity: A Guide to Building Balanced Teams
Beyond Diversity: A Guide to Building Balanced Teams
 
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed TeamThe Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
 
Building Apps With Enterprise in Mind
Building Apps With Enterprise in MindBuilding Apps With Enterprise in Mind
Building Apps With Enterprise in Mind
 

Kürzlich hochgeladen

The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfDaniel Santiago Silva Capera
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum ComputingGDSC PJATK
 
RAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIRAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIUdaiappa Ramachandran
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.YounusS2
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UbiTrack UK
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 

Kürzlich hochgeladen (20)

The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum Computing
 
RAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIRAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AI
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 

AtlasCamp2014: Introducing the Confluence REST API

  • 1. June 3-5, 2014 | Berlin, Germany
  • 2. Steve Lancashire, Senior Developer - Confluence Platform, Atlassian Introducing the Confluence REST API
  • 3. Confluence Platform Tweet any questions using #confluenceREST
  • 4. Confluence Platform Goal Make Confluence a simple, fast, reliable product, and platform supporting content applications, for the next ten years. ” “
  • 6. Who are our “customers”? Other Atlassian Devs Internal Confluence Devs Our Ecosystem (you)
  • 7. Remote APIs - the past SOAP and Xml RPC ! Json RPC Prototype REST (read only) Feature specific REST Resources
  • 8. Many different APIs • Developing a feature could end up using all of them! • RPC and SOAP ignores the architecture of the Web! • Incompatible representations between APIs! • No cross version stability for feature specific resources
  • 9. Confluence REST API Tweet any questions using #confluenceREST
  • 10. • Language agnostic! • Doesn’t ignore the architecture of the web! • cross version stability guarantees Benefits of a REST API
  • 11. Features of our REST API • Default JSON representation! • Hypermedia inside entities! • Embed entities through expansions! • Common Content model
  • 12. • Paginated, filterable list of content! • Content is any page, blogpost, comment or attachment in Confluence! • Initially terse, but accepts nested expansions! • lets have a look at it /rest/api/content GET Tooltip: The most readily available REST client is your browser install a JSON formatting extension, like JSONView for Chrome
  • 13. DEMO - list content https://confluence.atlassian.com/rest/api/content
  • 14. • Retrieve a piece of content by id! • has a default set of expansions! • supports nested, dot separated expansions! • example : confluence.atlassian.com/ rest/api/content/12 /api/content/{id} GET Tooltip: The most readily available REST client is your browser install a JSON formatting extension, like JSONView for Chrome
  • 15. Content Body Representations STORAGE EDITOR (internal) VIEW (read only) WIKI (write only)
  • 16. • Converts content representations from one representation to another! • lets have a look at an example using cURL! • you can find more about storage format on confluence.atlassian.com! ! ! ! …/contentbody/convert/{to} POST Tooltip: cURL is a simple command line tool, there are some cUrl examples using the new REST API on developer.atlassian.com
  • 17. DEMO - Convert content curl -u admin:admin -X POST -H 'Content-Type: application/json' -d'{"value":"<ac:structured-macro ac:name="cheese" / >","representation":"storage"}' "http://localhost:8080/confluence/ rest/api/contentbody/convert/view" | python mjson.tool
  • 18. • Creates a new piece of content! • Similar required fields as creating content in the Confluence Editor! • create from STORAGE, EDITOR or WIKI content representations! • returns the new piece of content with generated id /api/content/ POST Tooltip: The REST API Browser on Atlassian Marketplace provides a useful UI for exploring the REST API
  • 19. DEMO - Creating Content http://localhost:8080/confluence/plugins/servlet/restbrowser#/resource/api-content/POST ! { "title" : "Atlascamp 2014", "type" : "page", "body" : { "storage" : {"value" : "<p>Hi everyone</p>", “representation":"storage"} }, "space" : {"key":"DS"} }
  • 20. • Modify and delete existing content! • Modifying requires an explicit version increment! • DELETE removes the content from the resource and moves it to the trash /api/content/{id} PUT / DELETE
  • 21. DEMO - Updating Content https://stevelan.jira-dev.com/wiki/plugins/servlet/restbrowser#/resource/api-content-id/PUT ! { "id":4685825, "type":"page", “body":{"storage": { "representation":"storage", "value":"<p>Hi to everyone else</p>“} }, "version":{"number":2} }
  • 22. Content Properties A key / value store for the REST API
  • 23. Content Properties • Key / value store of properties on content! • Store up to 32KB of JSON! • Great for Atlassian Connect
  • 24. • Collection of properties on a piece of content! • GET to fetch all properties ! • POST to create a new property! ! /api/content/{id}/property GET / POST /api/content/{id}/property/arbitrary-key
  • 25. • GET a particular property by specifying the key! • PUT the value to update! • DELETE removes the property /api/content/{id}/property/{key} GET / PUT / DELETE {! !! “key” : “arbitrary-key”, ! !! “value” : { “random-json“: “data” } ! !! ...! } /api/content/{id}/property/arbitrary-key
  • 26. DEMO - add a property chrome://apps/
  • 27. • spaces, child content, content history, labels! • API Reference docs can be found via developer.atlassian.com! • or google : confluence rest api docs Plus lots more
  • 28. • More small script examples on developer.atlassian.com More examples
  • 29. • Can extend the API with metadata! • P2 plugins can surface their feature through the API! • Implement ModelMetadataProvider interface Extending the API ADVANCED TOPICS
  • 30. • Capabilities API since Confluence 5.0! • provides api “feature” discovery! • confluence-content-api indicates the presence of the api Migrating to the new API ADVANCED TOPICS “application” : “confluence”, ! “capabilities” : {! !! “confluence-content-api“: “/rest/api/content”,! !! ! … ! } /rest/capabilities
  • 31. So what is next?
  • 32. CQL Confluence Query Language for the REST API
  • 33. • Query language for finding content ! • Similar to JQL / SQL where clause! • API only, not user facing! • i.e.: space in (DEV, DOCS) and title ~ “rest api”! What is CQL?
  • 34. • Flexible! • Fast! • Familiar CQL Benefits
  • 35. Functions! • similar to JQL functions! • i.e. creator = currentUser() Extensibility CQL BENEFITS Fields! • plugins can add indexed fields to the CQL grammar! • i.e. macro = cheese
  • 38. 1.0 - MVP! • Existing fields in the index! • Extensible fields and functions! • Operators : =, !=, ~, !~, <=, >=, IN, NOT IN, EMPTY • 1.1 Expand the index! • Indexing service for plugins! • Additional fields from plugin data stored in AO! • Content properties CQL Roadmap
  • 39. Questions Tweet any questions using #confluenceREST
  • 40. Thank you Go build something awesome!