ICM 10.0.0.0 – API Server & Forms Gary Ratcliffe.

Slides:



Advertisements
Similar presentations
Chapter 6 Server-side Programming: Java Servlets
Advertisements

ASP.NET Best Practices Dawit Wubshet Park University.
The Librarian Web Page Carol Wolf CS396X. Create new controller  To create a new controller that can manage more than just books, type ruby script/generate.
1.  Understanding about How to Working with Server Side Scripting using PHP Framework (CodeIgniter) 2.
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
JavaScript Forms Form Validation Cookies. What JavaScript can do  Control document appearance and content  Control the browser  Interact with user.
Introduction to push technology © 2009 Research In Motion Limited.
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
Server-Side vs. Client-Side Scripting Languages
JavaScript Forms Form Validation Cookies CGI Programs.
1 Configuring Web services (Week 15, Monday 4/17/2006) © Abdou Illia, Spring 2006.
The Application Layer Chapter 7. Electronic Mail Architecture and Services The User Agent Message Formats Message Transfer Final Delivery.
Forms Review. 2 Using Forms tag  Contains the form elements on a web page  Container tag tag  Configures a variety of form elements including text.
Python and Web Programming
ASP.NET 2.0 Chapter 6 Securing the ASP.NET Application.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
CST JavaScript Validating Form Data with JavaScript.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
INTRODUCTION TO WEB DATABASE PROGRAMMING
Submitted by: Madeeha Khalid Sana Nisar Ambreen Tabassum.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
JavaScript & jQuery the missing manual Chapter 11
CS378 - Mobile Computing Web - WebView and Web Services.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Chapter 6: Forms JavaScript - Introductory. Previewing the Product Registration Form.
Server-side Scripting Powering the webs favourite services.
Presented by Robert Zaremba.  Remote messages must be sent to a message queue so that components are decoupled  Both sides of a communication must be.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
November 13, 2008 Ohio Information Security Forum Attack Surface of Web Applications James Walden Northern Kentucky University
CSCI 6962: Server-side Design and Programming Web Services.
CSC 2720 Building Web Applications HTML Forms. Introduction  HTML forms are used to collect user input.  The collected input is typically sent to a.
1 Accelerated Web Development Course JavaScript and Client side programming Day 2 Rich Roth On The Net
Chapter 8 Cookies And Security JavaScript, Third Edition.
Cross Site Integration “mashups” cross site scripting.
School of Computing and Information Systems CS 371 Web Application Programming PHP – Forms, Cookies, Sessions and Database.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
Chapter 6 Server-side Programming: Java Servlets
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Prof Frankl, Spring 2008CS Polytechnic University 1 Overview of Web database applications with PHP.
CSC 2720 Building Web Applications Server-side Scripting with PHP.
BIT 286: Web Applications Lecture 10 : Thursday, February 5, 2015 ASP.Net Form Submission.
1 Building FORMS In When a visitor enters information into a web form displayed in a web browser and clicks the submit button, the information is sent.
The Problem of State. We will look at… Sometimes web development is just plain weird! Internet / World Wide Web Aspects of their operation The role of.
SYST Web Technologies SYST Web Technologies AJAX.
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
GOSS iCM Gary Ratcliffe. 2 Agenda Webinar Programme V10 Overview Version Information Supported Browsers Architectural Changes New Features.
GOSS iCM Forms Gary Ratcliffe. 2 Agenda Webinar Programme Form Groups Publish Multiple Visual Script Editor Scripted Actions Form Examples.
©SoftMooreSlide 1 Introduction to HTML: Forms ©SoftMooreSlide 2 Forms Forms provide a simple mechanism for collecting user data and submitting it to.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
RESTful Web Services What is RESTful?
ICM – API Server Gary Ratcliffe. 2 Agenda Webinar Programme API Server Overview JSON-RPC iCM API Service API Server and Forms New services under.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
1 PHP HTTP After this lecture, you should be able to know: How to create and process web forms with HTML and PHP. How to create and process web forms with.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
Integrating and Extending Workflow 8 AA301 Carl Sykes Ed Heaney.
Using the Kentico CMS API Thom Robbins Bryan Soltis
Web Services Essentials. What is a web service? web service: software functionality that can be invoked through the internet using common protocols like.
PHP: Further Skills 02 By Trevor Adams. Topics covered Persistence What is it? Why do we need it? Basic Persistence Hidden form fields Query strings Cookies.
HTML III (Forms) Robin Burke ECT 270. Outline Where we are in this class Web applications HTML Forms Break Forms lab.
Node.js Express Web Applications
z/Ware 2.0 Technical Overview
Data Virtualization Tutorial… CORS and CIS
Data Virtualization Tutorial… OAuth Example using Google Sheets
Node.js Express Web Services
All about social networking
Configuring Internet-related services
Lecture 5: Functions and Parameters
Presentation transcript:

iCM – API Server & Forms Gary Ratcliffe

2 Agenda Webinar Programme API Server –Refresh –Security: Keys & Tokens –Clients –Invoking from a browser Forms –Invoking API Server –Scripted Actions –Custom form families

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

4 API Server - Refresh 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: Workflow engine - started Low level database access - started Master media image manipulation - started

5 Architectural Changes – Refresh 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.

6 Using API Server Services Based on JSON-RPC/2 – 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 – – Google Chrome Postman plugin recommended for trying calls

7 JSON-RPC Examples Request: –{ "id":"1", "method":"greeting", "params":{"name": "Gary"}, "jsonrpc":"2.0" } Response: –{ "id": "1", "result": "Hello Gary" "jsonrpc": "2.0", }

8 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”

9 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”

10 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

11 Worker Security

12 Worker Security

13 Worker Security

14 Secured API Server Requests API Key is sent with request –x-api-key HTTP request header* API Server checks key and authentication credentials –Encoded using HTTP Basic authentication API Token returned –x-api-token HTTP response header* Token as limited lifetime –Normally one hour –Use for multiple API calls in succession Its quicker for API server to validate a token than a key –Requests sending a token must come from same IP address

15 Secured API Server Requests with JSONP JSONP does not allow access to HTTP headers –Its just an HTTP GET API Key is sent with request –x-api-key url parameter API Server checks key and authentication credentials –Encoded using HTTP Basic authentication API Token returned –x-api-token in _transport property of JSONRPC response

16 Secured API Server Requests ClientAPI Server x-api-key 3C757AC9-0CC0-42FE-B62E-9C38520B582B x-api-token E6068B20-63FC-4CAB-9674-BB0F5E08A169 x-api-token E6068B20-63FC-4CAB-9674-BB0F5E08A169 x-api-token E6068B20-63FC-4CAB-9674-BB0F5E08A169 Subsequent requests just supply the token x-api-key 3C757AC9-0CC0-42FE-B62E-9C38520B582B x-api-token 7536F9F0-BFD2-448F-959D-FB FDA Later request Initial requests

17 API Server Secured Calls DEMO Request with API key Requests with API Key & Authentication JSONP Requests

18 API Server Clients Java C# Coldfusion –Just use cfhttp JavaScript (browser) –Requires jQuery and supports CORS and JSONP Client available in server side forms script: –require("apiclient"); –Search for apiclient in iCM V10 help text for documentation Java, C# and JavaScript (browser) will be added to community svn next week

19 C# Client Example Java is very similar

20 Browser JavaScript Example. var api; APIServer.init(); api = APIServer.createApiService( " "3C757AC9-0CC0-42FE-B62E-9C38520B582B", null, null, false); api( "CSArticle_get", {"set" : {...}, "get": "..." }, function( data ){ // Called when response received }, function( resp, errMsg ){ // Called if there is an error } );

21 API Server Clients DEMO C# Example Browser Sample

22 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 not an issue Use the apiclient library: require('apiclient'); When using the icmapi the complexity comes from the number of attributes of an article rather than the actual API call

23 Simple API Server Request

24 API Server Clients DEMO Form Default Function

25 Form Scripted Actions New field type in V10 to execute server-side JavaScript when a form is submitted The script is a function that is passed: helperForm helper library processorReference to skeleton processor propsForm properties contextContext variables For most applications only the helper is needed Remember this is server-side script and never appears in a site users browser

26 Form Scripted Actions

27 Form Scripted Actions Basic request is the same as the simple example. Except: –iCM user name and password required. Most of the rest of the script is all article attributes –Extra data helper.queryFieldValue –Use to extract field values

28 API Server Clients DEMO Article Creation

29 Generating Additional Actions Helper provides functions for adding and manipulating actions Scripted action can return a new action. For example a message:

30 Custom Form Families Custom form families create in V9 will not be upgraded to V10 –We don't know what they are based on so can't process automatically However there should be a small number of changes needed –Relates to the change from WDDX XML to JSON –Various functions renamed from …WDDX to …JSON Note that if the custom form family only exists to facilitate the development of custom field types we would recommended recreating its by copying DEFAULTV2 Custom field types that have been copied to the DEFAULT or DEFAULTV2 families should work but we do recommend the field types ObjTypeDefSkel is modified as described to reduce the risk of the problems in the future

31 Typical Error Report If you see an error message during form publishing that contains: You need to check to see if you are using a custom form family and make the changes described. Any reference to WDDX means the family or field type needs upgrading Server error: Object # has no method "buildPageTypeWDDX"

32 Custom Form Families – Affected Skeletons Form Skeletons –ObjTypeDefSkel Page Skeletons –ObjTypeDefSkel Field Types –Field Type Skeletons –ObjTypeDefSkel Not all field types have this skeleton

33 Form Skeletons - ObjTypeDefSkel Used to be: buildPageTypeWDDX and generateWDDX

34 Page Skeletons - ObjTypeDefSkel Suggest this skeleton is copied from the V10 DEFAULT or DEFAULTV2 form family. V9 V10

35 Field TypeeSkeletons - ObjTypeDefSkel Container field types Other field types Used to be: buildFieldTypeWDDX and generateWDDX

Questions?