Alfresco REST API of the future ... is closer than you think

23
-- Alfresco REST API of the future … is closer than you think J Jan Vonka Brussels, April 2016

Transcript of Alfresco REST API of the future ... is closer than you think

Page 1: Alfresco REST API of the future ... is closer than you think

--

AlfrescoRESTAPIofthefuture…iscloserthanyouthinkJ

JanVonkaBrussels,April2016

Page 2: Alfresco REST API of the future ... is closer than you think
Page 3: Alfresco REST API of the future ... is closer than you think

JanVonka

AlfrescoPlatform&Repositorydevelopment

bottom-up, repository,storage&infrastructure

top-down,publicfacingAPIs&services

layers&componentsin-between;-)

Page 4: Alfresco REST API of the future ... is closer than you think

Summary• Introduction

• RESTAPIofthefuture• Present

• Architecture• Alfresco4.2to5.1

• AlfrescoRESTAPI• Movingforward• Future...iscloserthanyouthink!• QuickDemo

• FutureIdeas• Feedback&Questions

Page 5: Alfresco REST API of the future ... is closer than you think

Theinformationandfeaturespresentedaresubjecttochange.

WelookforwardtocollaboratingwithyoutoimproveandextendtheAlfrescoAPIsJ

Page 6: Alfresco REST API of the future ... is closer than you think

Introduction• APIs&Platformsareeverywhere &enable...– platform&developerecosystem– mainentrypointfor“X”aaS– apps(Web&Mobile- iOS,Android&others)– integrations– add-onsintootherapps(UI,extensions,...)– InternetofThings(IoT)– ...

Page 7: Alfresco REST API of the future ... is closer than you think

…/#default#/public/alfresco/versions/1/sites/{id}/members8

8

Scope8 API8Name8 Version8 En@ty8 Rela@onship8Tenant8

Source:8@maGbiehl8

Source:8Adweek8

REST%API%of%the%Future%Usage8is8exploding8and8standardising8

Consistency8via8Guidelines8and8Framework8

Contract8First8Design8

Cloud8Compa@ble8Extension8Model8

TTL8Stats8

Start8with8collabora@[email protected]

No8access8to8in#process8extension8points.8

Ref:GavinCornwell(January2016)

Page 8: Alfresco REST API of the future ... is closer than you think

Ref:GavinCornwell(January2016)

…/#default#/public/alfresco/versions/1/sites/{id}/members8

8

Scope8 API8Name8 Version8 En@ty8 Rela@onship8Tenant8

Source:8@maGbiehl8

Source:8Adweek8

REST%API%of%the%Future%Usage8is8exploding8and8standardising8

Consistency8via8Guidelines8and8Framework8

Contract8First8Design8

Cloud8Compa@ble8Extension8Model8

TTL8Stats8

Start8with8collabora@[email protected]

No8access8to8in#process8extension8points.8

Page 9: Alfresco REST API of the future ... is closer than you think

Present:AlfrescoAPIarchitecture

Page 10: Alfresco REST API of the future ... is closer than you think

Present:4.2to5.1• PublicAPI(4.2,5.0,5.1)

• APIframeworkbuiltontopofWebScript engine• setofinternalRESTful guidelines• consistentURLs,parameters&responses (including HTTPstatuscodes)

• On-PremiseandCloudsupport• /alfresco/api/-default-/public/alfresco/versions/1• api.alfresco.com/{tenant}/public/alfresco/versions/1• usewithCMIS

• Newfor5.1• re-vampeddeveloperdocumentation• introduceAPIexplorer(forexistingRESTAPIs)• V0endpointshavebeendeprecated

Page 11: Alfresco REST API of the future ... is closer than you think

Present:URLstructure&entities

…/-default-/public/alfresco/versions/1/sites/{id}/members

Examplesofentities&relationships…

• Sites->Memberships• People->Activities,(My)Favorites->Nodes,Sites• Nodes->Comments,Ratings• Tags• Workflow• Networks(Cloud)

Scope APIName Version Entity RelationshipTenant

Page 12: Alfresco REST API of the future ... is closer than you think

AlfrescoRESTAPI– movingforward

ECM BPM

Aikau Client-sideSDKs &AppDevFrameworks

3rd partyApps& Integrations

CMIS PublicRESTAPIs

Share MobileiOS,Android

WebApps Desktop

Page 13: Alfresco REST API of the future ... is closer than you think

AlfrescoRESTAPI– movingforward• Logical,Consistent, Fully-documented

– extend&improveRESTframework&patterns• Simple+Smart

– easytoconsume&moreadvancedoptions– lessjumpingthroughflaminghoops;-)

• Lighter-weight&moreperformant– minimumdefaultresponse– eg.use“include”toexpand,“fields”torestrict

• APIcontract– viaOpenAPIspecification(~Swagger)

• MajoradditionstoV1– Incremental=>backwardscompatible

Page 14: Alfresco REST API of the future ... is closer than you think

APIExplorer- tryitout!• Quick&easytogetstarted

– https://api-explorer.alfresco.com

• Useyourfavourite REST/HTTPclient

• Comingsoon...possibleoptionstotrylatestAPIs– Nightlybuilds(HEAD)– CommunityEAorviaSDK– Dockerimage?

Page 15: Alfresco REST API of the future ... is closer than you think

Future…iscloserthanyouthink

Page 16: Alfresco REST API of the future ... is closer than you think

Future…iscloserthanyouthinkNodes§ Files,Folders&Custom

RenditionsDeletedNodes§ Trashcan

LiveSearchSharedLinks….

BatchingContentModelingLock/Unlock§ CheckOut/CheckIn

Async /Push§ Polling/Long-Polling ?§ Server-SentEvents?§ WebHooks?§ WebSockets?

....

SiteMgmt§ Create&DeleteSite

Auth (Ticket)NodesAssocs§ Child&PeerAssocs

More(Live)SearchVersioning....

Note:subjecttochange;-)

Page 17: Alfresco REST API of the future ... is closer than you think

QuickDemo

UsingPostmanhere…alsojustassimplewithCurloranyotherHTTP/RESTclient

Page 18: Alfresco REST API of the future ... is closer than you think

FileSharingapp(usingnewAPIs)

Files&FoldersUpload&DownloadPreviewLiveSearchSharedLinksMove&CopyDelete& Undo….

Page 19: Alfresco REST API of the future ... is closer than you think

FuturesIdeas(1)• AgileAPI…– new&improvedAPIs&services• basedondeveloperfeedback

– APIlifecyle• EAmightneedtobetweaked• GAimpliesbackwardscompatible!

– Trust• simple,smart&reliableupgrades• V2onlyifweneedtochangethecorepattern

Page 20: Alfresco REST API of the future ... is closer than you think

FutureIdeas(2)• ExposemorePlatformServices

- existing&new• Batchoperations

- Async bydefault?- OptionallySyncw/timeout?

• EventNotifications- Server-SentEvents/WebHooks/WebSockets- Eventsubscription– eg.Policybehviours?

• Whatelse?- drivenbyAppscenarios&yoursolutionrequirementsJ

Page 21: Alfresco REST API of the future ... is closer than you think

FutureIdeas(3)• Client-sideSDKs– Java/Android• seealsoanEAexampleforActiviti (byJeanMarie)https://github.com/Alfresco/activiti-client-sdk• usesRetrofit(fromSquare)

• AppDevFramework– JavaScript

Page 22: Alfresco REST API of the future ... is closer than you think

ReferenceLinks• AlfrescoRESTAPIDocs(5.1initially…)

– http://docs.alfresco.com/5.1/pra/1/topics/pra-welcome.html

• APIExplorer(5.1initially…)– https://api-explorer.alfresco.com/api-explorer/

• APISpecification– https://github.com/Alfresco/rest-api-explorer– seealso“develop”branchforin-progressapi changes

• TechTalkLive#93– https://plus.google.com/events/c3155sfr64gbnn3us7fvjv8v90s

Page 23: Alfresco REST API of the future ... is closer than you think

Feedback&QuestionsFeedback(noworlater)isverywelcome! ThankYouJ