alfresco rest api of the future ... is closer than you think
TRANSCRIPT
--
AlfrescoRESTAPIofthefuture…iscloserthanyouthinkJ
JanVonkaBrussels,April2016
JanVonka
AlfrescoPlatform&Repositorydevelopment
bottom-up, repository,storage&infrastructure
top-down,publicfacingAPIs&services
layers&componentsin-between;-)
Summary• Introduction
• RESTAPIofthefuture• Present
• Architecture• Alfresco4.2to5.1
• AlfrescoRESTAPI• Movingforward• Future...iscloserthanyouthink!• QuickDemo
• FutureIdeas• Feedback&Questions
Theinformationandfeaturespresentedaresubjecttochange.
WelookforwardtocollaboratingwithyoutoimproveandextendtheAlfrescoAPIsJ
Introduction• APIs&Platformsareeverywhere &enable...– platform&developerecosystem– mainentrypointfor“X”aaS– apps(Web&Mobile- iOS,Android&others)– integrations– add-onsintootherapps(UI,extensions,...)– InternetofThings(IoT)– ...
…/#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)
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
Present:AlfrescoAPIarchitecture
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
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
AlfrescoRESTAPI– movingforward
ECM BPM
Aikau Client-sideSDKs &AppDevFrameworks
3rd partyApps& Integrations
CMIS PublicRESTAPIs
Share MobileiOS,Android
WebApps Desktop
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
APIExplorer- tryitout!• Quick&easytogetstarted
– https://api-explorer.alfresco.com
• Useyourfavourite REST/HTTPclient
• Comingsoon...possibleoptionstotrylatestAPIs– Nightlybuilds(HEAD)– CommunityEAorviaSDK– Dockerimage?
Future…iscloserthanyouthink
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;-)
QuickDemo
UsingPostmanhere…alsojustassimplewithCurloranyotherHTTP/RESTclient
FileSharingapp(usingnewAPIs)
Files&FoldersUpload&DownloadPreviewLiveSearchSharedLinksMove&CopyDelete& Undo….
FuturesIdeas(1)• AgileAPI…– new&improvedAPIs&services• basedondeveloperfeedback
– APIlifecyle• EAmightneedtobetweaked• GAimpliesbackwardscompatible!
– Trust• simple,smart&reliableupgrades• V2onlyifweneedtochangethecorepattern
FutureIdeas(2)• ExposemorePlatformServices
- existing&new• Batchoperations
- Async bydefault?- OptionallySyncw/timeout?
• EventNotifications- Server-SentEvents/WebHooks/WebSockets- Eventsubscription– eg.Policybehviours?
• Whatelse?- drivenbyAppscenarios&yoursolutionrequirementsJ
FutureIdeas(3)• Client-sideSDKs– Java/Android• seealsoanEAexampleforActiviti (byJeanMarie)https://github.com/Alfresco/activiti-client-sdk• usesRetrofit(fromSquare)
• AppDevFramework– JavaScript
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
Feedback&QuestionsFeedback(noworlater)isverywelcome! ThankYouJ