SlideShare uma empresa Scribd logo
1 de 40
Baixar para ler offline
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!

Mais conteúdo relacionado

Mais procurados

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トニー 森田
 

Mais procurados (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
 

Semelhante a June 3-5, 2014 | Berlin, Germany - 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
 
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
 
Writing Usable REST APIs. Javier Ramirez
Writing Usable REST APIs. Javier RamirezWriting Usable REST APIs. Javier Ramirez
Writing Usable REST APIs. Javier RamirezFuture Insights
 
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
 
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
 
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
 

Semelhante a June 3-5, 2014 | Berlin, Germany - 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
 
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
 
Writing Usable REST APIs. Javier Ramirez
Writing Usable REST APIs. Javier RamirezWriting Usable REST APIs. Javier Ramirez
Writing Usable REST APIs. Javier Ramirez
 
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
 
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)
 
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
 

Mais de 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
 

Mais de 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
 

Último

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 

June 3-5, 2014 | Berlin, Germany - 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!