Download presentation
Presentation is loading. Please wait.
Published byMartha Norton Modified over 9 years ago
1
iCM 10.0.0.0 – API Server Gary Ratcliffe
2
2 Agenda Webinar Programme API Server Overview JSON-RPC iCM API Service API Server and Forms New services under development
3
3 Webinar Programme User –1 st October – What’s New in iCM V10 –2 nd October – Article Editing, Media Upload, etc –3 rd October – Preferences, Help Text, Shortcuts Technical –9 th October – iCM V10 Overview –16 th October – Forms –13 th November – API Server –11 th December – API Server and Forms (tbc)
4
4 Overview Platform for: –Delivery of services to support iCM & sites Forms rendering for all platforms This is the most obvious difference in initial release –Delivery of secure APIs for 3 rd party integration Secure access to iCM API –Delivery of additional services for iCM and sites: 10.0.1.0 Workflow engine - started Low level database access - started Master media image manipulation - started
5
iCM.NET Site Java Site CF Site Duplicated Functionality API/Renderer/Templates Duplicated Functionality API/Renderer/Templates Duplicated Functionality API/Renderer/Templates Duplicated Functionality Overview – Forms Rendering
6
iCM.NET Site Java Site CF Site API/Renderer/Templates API Server Overview – Forms Rendering
7
7 Overview - Architecture Tomcat RailoSolr ‘iCM’ Java Runtime Java Libraries ‘iCM’ Java Libraries Database Search Collections ‘API’ Windows Linux SQL Server PostgreSQL (not.NET) Oracle Cold Fusion Java.NET ‘API Server’ 1.7 4.0.3 4.4.0 NodeJS 0.10.12 Java 1.7.0_25 7.0.14
8
API Server Management Security Configuration API Interface HTTP/HTTPS Requests Browser AJAX Request PHP Server Code.NET Server Code Java Server Code Google Zapier, ? ‘Worker’ Service = FormsiCM Content Patcher??? Overview - Architecture
9
Overview – Why?
10
10 Architectural Changes – API Server Each iCM and delivery server must have a local API Server Each server must be defined in iCM iCM sends the configuration information to the API Server –This includes details of database connections, media folder etc iCM can also send updates to the API Server –Supplied as part of iCM patches or hot fixes.
11
11 API Server Definition in iCM
12
12 API Server Definition in iCM
13
13 Configuration Files Held in icm/custom/apiserverconfigs These contain minimal information to indicate what services and how many instances are available –Some workers use multiple processes Skeleton Processor –Some are multi-threaded iCM API Two configurations supplied at present –default Used for all current v10 deployments –default-DEBUG Used when additional tracing is required
14
14 Configuration Files - Example { "workers" : [ { "name": "gatekeeper", "instances": 1, "threadsPerInstance": 10 }, { "name": "updater", "instances": 1 }, { "name": "skeletonprocessor", "instances": 4 }, { "name": "icmapi", "instances": 1, "threadsPerInstance": 10 }, { "name": "formutils", "instances": 1, "threadsPerInstance": 10 } ], "httpServices": [ ] }
15
15 Configuration Files - workers gatekeeper –Security functions. Must be present. updater –Worker installation and updating. Must be present. skeletonprocessor –Forms rendering. At least 2 instances must be present icmapi –Access to iCM content. Most be present Used by skeletonprocessor for loading form definitions formutils –Database functions for skeleton processor. Must be present
16
16 Other workers tracer –Tracing functions. Internal to API Server configure –Configuration interface. Internal to API Server –Used by iCM manager –Console and Management interface. Internal to API Server –Used by iCM
17
17 Single Server Architecture
18
18 Dual Server Architecture
19
19 Multiple Delivery Server Architecture
20
20 Multiple Delivery and iCM Server Architecture
21
21 Worker Security Defined in iCM API Server Security IP Restrictions for workers –Defaults limited to local network or machine API Keys –Provided for external, 3 rd part access iCM or Site user authentication –HTTP/HTTPS Basic Authentication
22
22 Worker Security
23
23 Worker Security
24
24 Worker Security
25
25 Worker Security
26
26 Console Fairly limited at present –Review complete configuration –View HTTP access logs –View trace logs Limited network access for security –Uses Manager worker for IP restrictions
27
27 Configuration Files - workers
28
28 Console Fairly limited at present –Review complete configuration –View HTTP access logs –View trace logs Limited network access for security –Uses Manager worker for IP restrictions
29
29 API Server in iCM DEMO
30
30 Using API Server Services Based on JSON-RPC/2 –http://www.jsonrpc.org/http://www.jsonrpc.org/ Essentially an HTTP/S POST of JSON Data that represents a function call –Response is also JSON Multi-part Mime format also support for sending files with requests –JSON-RPC request sent in JSONRPC part CORS and JSONP Support for cross-site browser requests –http://www.w3.org/TR/cors/http://www.w3.org/TR/cors/ –http://json-p.org/http://json-p.org/ Google Chrome Postman plugin recommended for trying calls
31
31 JSON-RPC Examples Request: –{ "id":"1", "method":"greeting", "params":{"name": "Gary"}, "jsonrpc":"2.0" } Response: –{ "id": "1", "result": "Hello Gary" "jsonrpc": "2.0", }
32
32 JSON-RPC - Request id –String or number identifying request method –Name of service method to invoke params –Parameters, can be an array or object depending on service jsonrpc –Must be set to “2.0”
33
33 JSON-RPC - Response id –String or number identifying request result –Simple type, array or object depending on service jsonrpc –Will be set to “2.0”
34
34 JSON-RPC – Error Response { "jsonrpc": "2.0", "id": "1", "error": { "message": "Function reeting not found!", "code": -32601 } } Id –String or number identifying request error –Error details jsonrpc –Will be set to “2.0”
35
35 API Server JSON-RPC Calls DEMO
36
36 iCM API Service Provides access to iCM content –In current form a combination of the Java API and Cold Fusion API –Documentation for these is essential –Note that Java and.NET API are virtually identical Example forms that create articles are the best starting point –Technical document is becoming available on help text site Not pretending this is easy or non-technical but it is very powerful
37
37 iCM API Service - Examples Article Get Creating a form data object Getting a form data object Getting multiple form data objects Updating a form data object
38
38 iCM API Service – Article Get
39
39 iCM API Service – Create Form Object
40
40 iCM API Service – Get Form Object
41
41 iCM API Service – Update Form Object
42
42 Invoking iCM API DEMO
43
43 API Server and Forms API Server services can be easily invoked from: –Field ‘default’ function –Scripted Action Handlers JavaScript library available to help –These are server side requests so security no an issue Invoking services from browser –Required jQuery –API Key should be used JavaScript library available to help This will be covered in more detail at the next webinar
44
44 API Server and Forms DEMO
45
45 New Services Under Development Workflow engine – started –Supports BPMN 2.0 –Greater control over form workflow –Site users can trigger processes, view status –Site and iCM users can be assigned to tasks to action Low level database access – started –Almost complete Master media image manipulation – started –Allows site to generate cached images of required size from media image
46
Questions?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.