Your SlideShare is downloading. ×
0
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Apigee Console & eZ Publish REST

1,293

Published on

Presentation from eZ UnConference #2 about Apigee Console & eZ Publish REST.

Presentation from eZ UnConference #2 about Apigee Console & eZ Publish REST.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,293
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
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

Transcript

  • 1. eZ Publish REST v2 calls made easyApigee Console & eZ Publish REST
  • 2. 06/06/2013Presenter: Łukasz Serwatka Slide 2APIGEE console & eZ Publish RESTPresenterŁukasz SerwatkaProduct Management Technical Leadlukasz.serwatka@ez.no@lserwatka Working with eZ since 1st of March 2005 Over 10 years of experience with eZ Publish Former member of the Engineering team, now in the Product Management eZ Publish & Polish PHP Community Member Expert in the mobile solutions (mobile applications & mobile strategies)
  • 3. 06/06/2013Presenter: Łukasz Serwatka Slide 3APIGEE console & eZ Publish RESTConsole To-Go The Apigee “eZ Publish” API console makes it easy to learn, test, and debugthe eZ Publish REST v2 API with interactive tools and documentation.
  • 4. 06/06/2013Presenter: Łukasz Serwatka Slide 4APIGEE console & eZ Publish RESTAPI Providers
  • 5. 06/06/2013Presenter: Łukasz Serwatka Slide 5APIGEE console & eZ Publish RESTConsole To-Go Apigee Console To-Go describes the API using the Web ApplicationDescription Language (WADL). By uploading API description to Apigee a newcustom Console can be created that allows to customize the look and feel,and then embed API Console on your own developer portal. Console can display all methods available to developers, organized into thegroups. Developers can browse the methods, reading the descriptionsprovided for each method and parameter, and see what information isrequired for each request, what authentication mechanisms are supported,and what parameters are optional or required. More importantly, developerscan use the Console to enter authentication credentials and easily testrequests and see what responses are returned.
  • 6. 06/06/2013Presenter: Łukasz Serwatka Slide 6APIGEE console & eZ Publish RESTConsole To-Go: Name Your Console Visit https://apigee.com/togo to setup a new console
  • 7. 06/06/2013Presenter: Łukasz Serwatka Slide 7APIGEE console & eZ Publish RESTConsole To-Go: Set Credentials
  • 8. 06/06/2013Presenter: Łukasz Serwatka Slide 8APIGEE console & eZ Publish RESTConsole To-Go: Describe Your API
  • 9. 06/06/2013Presenter: Łukasz Serwatka Slide 9APIGEE console & eZ Publish RESTWhat is WADL? The Web Application Description Language (WADL) is an XML-based fileformat that provides a machine-readable description of HTTP-based webAPIs. A WADL file defines the "resources" (that is, URIs) that constitute anAPI. For each resource, WADL defines one or more "methods" that act onthose resources. With RESTful APIs, a method is a combination of aresource (URI) and the HTTP verb (most commonly GET, PUT, POST andDELETE) that acts on the resource. WADL in its simplest form defines create,read, update and delete actions (sometimes referred to as CRUD operations)on resources defined by the API.
  • 10. 06/06/2013Presenter: Łukasz Serwatka Slide 10APIGEE console & eZ Publish RESTResources An example eZ Publish API that defines 3 resources: objects, locations, andsections. http://api.example.com/api/ezp/v2/content/objects http://api.example.com/api/ezp/v2/content/locations http://api.example.com/api/ezp/v2/content/sections
  • 11. 06/06/2013Presenter: Łukasz Serwatka Slide 11APIGEE console & eZ Publish RESTResources Application definition<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:apigee="http://api.apigee.com/wadl/2010/07/"xmlns="http://wadl.dev.java.net/2009/02"xsi:schemaLocation="http://wadl.dev.java.net/2009/02http://apigee.com/schemas/wadl-schema.xsdhttp://api.apigee.com/wadl/2010/07/http://apigee.com/schemas/apigee-wadl-extensions.xsd"><!-- Base defines the domain and base path of the endpoint --><resources base="http://api.demo.ez.no/api/ezp/v2"></resources></application>
  • 12. 06/06/2013Presenter: Łukasz Serwatka Slide 12APIGEE console & eZ Publish RESTResources Resource definition<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:apigee="http://api.apigee.com/wadl/2010/07/"xmlns="http://wadl.dev.java.net/2009/02"xsi:schemaLocation="http://wadl.dev.java.net/2009/02http://apigee.com/schemas/wadl-schema.xsdhttp://api.apigee.com/wadl/2010/07/ http://apigee.com/schemas/apigee-wadl-extensions.xsd"><!-- Base defines the domain and base path of the endpoint --><resources base="http://api.demo.ez.no/api/ezp/v2"><!-- A resource with a GET method that requires a templateparameter and a header --><resource path="/content/objects/{contentId}"></resource></resources></application>
  • 13. 06/06/2013Presenter: Łukasz Serwatka Slide 13APIGEE console & eZ Publish RESTResources For each resource, developers need a way to create, to read, to update, andto delete each resource--in other words, a set of methods is required for eachresource.RESTful APIs usually define a: POST method (for creating an article) PUT method (for modifying an existing article) GET method (for retrieving the article) DELETE method (for removing articles)
  • 14. 06/06/2013Presenter: Łukasz Serwatka Slide 14APIGEE console & eZ Publish RESTResources A single GET method on the /content/objects resource. The method returns alist of content objects.<method id="get-content-objects" name="GET"apigee:displayName="content/objects"><apigee:tags><apigee:tag primary="true">Content Resources</apigee:tag></apigee:tags><apigee:authentication required="true"/><apigee:example url="/content/objects"/><docapigee:url="http://api.mydomain.com/doc/content/objects">A GET method that requires a template parameter.</doc></method>
  • 15. 06/06/2013Presenter: Łukasz Serwatka Slide 15APIGEE console & eZ Publish RESTResources A single method can have a request definition with predefined data<request><representation><!-- Set required to true to indicate the content as mandatory inthe Console --><apigee:payload required="true"><!-- Body content. --><apigee:content><![CDATA[]]></apigee:content></apigee:payload></representation></request>
  • 16. 06/06/2013Presenter: Łukasz Serwatka Slide 16APIGEE console & eZ Publish RESTParameters Methods can in turn have parameters. Parameters provide additionalgranularity over interactions with resources. There are a number of differentways of working with parameters in WADL. One benefit of using the Apigee Console is that it enables developers toquickly understand which parameters are supported by the API, and howdevelopers can use parameters to accomplish specific tasks.
  • 17. 06/06/2013Presenter: Łukasz Serwatka Slide 17APIGEE console & eZ Publish RESTParameters Header parameter example:<param name="Accept" required="true" type="xsd:string"style="header"default="application/vnd.ez.api.Content+json"><doc>Response format.</doc><option value="application/vnd.ez.api.Content+json"mediaType="application/json"/><option value="application/vnd.ez.api.Content+xml"mediaType="application/xml"/></param>
  • 18. 06/06/2013Presenter: Łukasz Serwatka Slide 18APIGEE console & eZ Publish RESTParameters Template parameter example:<resource path="/content/objects/{contentId}"><param name="contentId" required="true" type="xsd:string"style="template" default="57"><doc>eZ Publish Content ID</doc></param></resource>
  • 19. 06/06/2013Presenter: Łukasz Serwatka Slide 19APIGEE console & eZ Publish RESTParameters Query parameter example:<param name="param1" required="true" type="xsd:string"style="query" default="12345"><doc>Parameter description.</doc></param>
  • 20. 06/06/2013Presenter: Łukasz Serwatka Slide 20APIGEE console & eZ Publish RESTConsole To-Go

×