[go: up one dir, main page]

0% found this document useful (0 votes)
120 views401 pages

RP 62 DeveloperGuide en PDF

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
120 views401 pages

RP 62 DeveloperGuide en PDF

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 401

Informatica® RulePoint

6.2

Developer Guide
Informatica RulePoint Developer Guide
6.2
October 2014
© Copyright Informatica LLC 1998, 2018

This software and documentation contain proprietary information of Informatica Corporation and are provided under a license agreement containing restrictions on use
and disclosure and are also protected by copyright law. Reverse engineering of the software is prohibited. No part of this document may be reproduced or transmitted in
any form, by any means (electronic, photocopying, recording or otherwise) without prior consent of Informatica Corporation. This Software may be protected by U.S.
and/or international Patents and other Patents Pending.

Use, duplication, or disclosure of the Software by the U.S. Government is subject to the restrictions set forth in the applicable software license agreement and as
provided in DFARS 227.7202-1(a) and 227.7702-3(a) (1995), DFARS 252.227-7013©(1)(ii) (OCT 1988), FAR 12.212(a) (1995), FAR 52.227-19, or FAR 52.227-14 (ALT III),
as applicable.

The information in this product or documentation is subject to change without notice. If you find any problems in this product or documentation, please report them to
us in writing.

Informatica, Informatica Platform, Informatica Data Services, PowerCenter, PowerCenterRT, PowerCenter Connect, PowerCenter Data Analyzer, PowerExchange,
PowerMart, Metadata Manager, Informatica Data Quality, Informatica Data Explorer, Informatica B2B Data Transformation, Informatica B2B Data Exchange Informatica
On Demand, Informatica Identity Resolution, Informatica Application Information Lifecycle Management, Informatica Complex Event Processing, Ultra Messaging and
Informatica Master Data Management are trademarks or registered trademarks of Informatica Corporation in the United States and in jurisdictions throughout the
world. All other company and product names may be trade names or trademarks of their respective owners.

Portions of this software and/or documentation are subject to copyright held by third parties, including without limitation: Copyright DataDirect Technologies. All rights
reserved. Copyright © Sun Microsystems. All rights reserved. Copyright © RSA Security Inc. All Rights Reserved. Copyright © Ordinal Technology Corp. All rights
reserved.Copyright © Aandacht c.v. All rights reserved. Copyright Genivia, Inc. All rights reserved. Copyright Isomorphic Software. All rights reserved. Copyright © Meta
Integration Technology, Inc. All rights reserved. Copyright © Intalio. All rights reserved. Copyright © Oracle. All rights reserved. Copyright © Adobe Systems Incorporated.
All rights reserved. Copyright © DataArt, Inc. All rights reserved. Copyright © ComponentSource. All rights reserved. Copyright © Microsoft Corporation. All rights
reserved. Copyright © Rogue Wave Software, Inc. All rights reserved. Copyright © Teradata Corporation. All rights reserved. Copyright © Yahoo! Inc. All rights reserved.
Copyright © Glyph & Cog, LLC. All rights reserved. Copyright © Thinkmap, Inc. All rights reserved. Copyright © Clearpace Software Limited. All rights reserved. Copyright
© Information Builders, Inc. All rights reserved. Copyright © OSS Nokalva, Inc. All rights reserved. Copyright Edifecs, Inc. All rights reserved. Copyright Cleo
Communications, Inc. All rights reserved. Copyright © International Organization for Standardization 1986. All rights reserved. Copyright © ej-technologies GmbH. All
rights reserved. Copyright © Jaspersoft Corporation. All rights reserved. Copyright © is International Business Machines Corporation. All rights reserved. Copyright ©
yWorks GmbH. All rights reserved. Copyright © Lucent Technologies. All rights reserved. Copyright (c) University of Toronto. All rights reserved. Copyright © Daniel
Veillard. All rights reserved. Copyright © Unicode, Inc. Copyright IBM Corp. All rights reserved. Copyright © MicroQuill Software Publishing, Inc. All rights reserved.
Copyright © PassMark Software Pty Ltd. All rights reserved. Copyright © LogiXML, Inc. All rights reserved. Copyright © 2003-2010 Lorenzi Davide, All rights reserved.
Copyright © Red Hat, Inc. All rights reserved. Copyright © The Board of Trustees of the Leland Stanford Junior University. All rights reserved. Copyright © EMC
Corporation. All rights reserved. Copyright © Flexera Software. All rights reserved. Copyright © Jinfonet Software. All rights reserved. Copyright © Apple Inc. All rights
reserved. Copyright © Telerik Inc. All rights reserved. Copyright © BEA Systems. All rights reserved. Copyright © PDFlib GmbH. All rights reserved. Copyright ©
Orientation in Objects GmbH. All rights reserved. Copyright © Tanuki Software, Ltd. All rights reserved. Copyright © Ricebridge. All rights reserved. Copyright © Sencha,
Inc. All rights reserved. Copyright © Scalable Systems, Inc. All rights reserved.

This product includes software developed by the Apache Software Foundation (http://www.apache.org/), and/or other software which is licensed under various
versions of the Apache License (the "License"). You may obtain a copy of these Licenses at http://www.apache.org/licenses/. Unless required by applicable law or
agreed to in writing, software distributed under these Licenses is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied. See the Licenses for the specific language governing permissions and limitations under the Licenses.

This product includes software which was developed by Mozilla (http://www.mozilla.org/), software copyright The JBoss Group, LLC, all rights reserved; software
copyright © 1999-2006 by Bruno Lowagie and Paulo Soares and other software which is licensed under various versions of the GNU Lesser General Public License
Agreement, which may be found at http:// www.gnu.org/licenses/lgpl.html. The materials are provided free of charge by Informatica, "as-is", without warranty of any
kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose.

The product includes ACE(TM) and TAO(TM) software copyrighted by Douglas C. Schmidt and his research group at Washington University, University of California,
Irvine, and Vanderbilt University, Copyright (©) 1993-2006, all rights reserved.

This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (copyright The OpenSSL Project. All Rights Reserved) and
redistribution of this software is subject to terms available at http://www.openssl.org and http://www.openssl.org/source/license.html.

This product includes Curl software which is Copyright 1996-2013, Daniel Stenberg, <daniel@haxx.se>. All Rights Reserved. Permissions and limitations regarding this
software are subject to terms available at http://curl.haxx.se/docs/copyright.html. Permission to use, copy, modify, and distribute this software for any purpose with or
without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

The product includes software copyright 2001-2005 (©) MetaStuff, Ltd. All Rights Reserved. Permissions and limitations regarding this software are subject to terms
available at http://www.dom4j.org/ license.html.

The product includes software copyright © 2004-2007, The Dojo Foundation. All Rights Reserved. Permissions and limitations regarding this software are subject to
terms available at http://dojotoolkit.org/license.

This product includes ICU software which is copyright International Business Machines Corporation and others. All rights reserved. Permissions and limitations
regarding this software are subject to terms available at http://source.icu-project.org/repos/icu/icu/trunk/license.html.

This product includes software copyright © 1996-2006 Per Bothner. All rights reserved. Your right to use such materials is set forth in the license which may be found at
http:// www.gnu.org/software/ kawa/Software-License.html.

This product includes OSSP UUID software which is Copyright © 2002 Ralf S. Engelschall, Copyright © 2002 The OSSP Project Copyright © 2002 Cable & Wireless
Deutschland. Permissions and limitations regarding this software are subject to terms available at http://www.opensource.org/licenses/mit-license.php.

This product includes software developed by Boost (http://www.boost.org/) or under the Boost software license. Permissions and limitations regarding this software
are subject to terms available at http:/ /www.boost.org/LICENSE_1_0.txt.

This product includes software copyright © 1997-2007 University of Cambridge. Permissions and limitations regarding this software are subject to terms available at
http:// www.pcre.org/license.txt.

This product includes software copyright © 2007 The Eclipse Foundation. All Rights Reserved. Permissions and limitations regarding this software are subject to terms
available at http:// www.eclipse.org/org/documents/epl-v10.php and at http://www.eclipse.org/org/documents/edl-v10.php.

This product includes software licensed under the terms at http://www.tcl.tk/software/tcltk/license.html, http://www.bosrup.com/web/overlib/?License, http://
www.stlport.org/doc/ license.html, http:// asm.ow2.org/license.html, http://www.cryptix.org/LICENSE.TXT, http://hsqldb.org/web/hsqlLicense.html, http://
httpunit.sourceforge.net/doc/ license.html, http://jung.sourceforge.net/license.txt , http://www.gzip.org/zlib/zlib_license.html, http://www.openldap.org/software/
release/license.html, http://www.libssh2.org, http://slf4j.org/license.html, http://www.sente.ch/software/OpenSourceLicense.html, http://fusesource.com/downloads/
license-agreements/fuse-message-broker-v-5-3- license-agreement; http://antlr.org/license.html; http://aopalliance.sourceforge.net/; http://www.bouncycastle.org/
licence.html; http://www.jgraph.com/jgraphdownload.html; http://www.jcraft.com/jsch/LICENSE.txt; http://jotm.objectweb.org/bsd_license.html; . http://www.w3.org/
Consortium/Legal/2002/copyright-software-20021231; http://www.slf4j.org/license.html; http://nanoxml.sourceforge.net/orig/copyright.html; http://www.json.org/
license.html; http://forge.ow2.org/projects/javaservice/, http://www.postgresql.org/about/licence.html, http://www.sqlite.org/copyright.html, http://www.tcl.tk/
software/tcltk/license.html, http://www.jaxen.org/faq.html, http://www.jdom.org/docs/faq.html, http://www.slf4j.org/license.html; http://www.iodbc.org/dataspace/
iodbc/wiki/iODBC/License; http://www.keplerproject.org/md5/license.html; http://www.toedter.com/en/jcalendar/license.html; http://www.edankert.com/bounce/
index.html; http://www.net-snmp.org/about/license.html; http://www.openmdx.org/#FAQ; http://www.php.net/license/3_01.txt; http://srp.stanford.edu/license.txt;
http://www.schneier.com/blowfish.html; http://www.jmock.org/license.html; http://xsom.java.net; http://benalman.com/about/license/; https://github.com/CreateJS/
EaselJS/blob/master/src/easeljs/display/Bitmap.js; http://www.h2database.com/html/license.html#summary; http://jsoncpp.sourceforge.net/LICENSE; http://
jdbc.postgresql.org/license.html; http://protobuf.googlecode.com/svn/trunk/src/google/protobuf/descriptor.proto; https://github.com/rantav/hector/blob/master/
LICENSE; http://web.mit.edu/Kerberos/krb5-current/doc/mitK5license.html; http://jibx.sourceforge.net/jibx-license.html; https://github.com/lyokato/libgeohash/blob/
master/LICENSE; https://github.com/hjiang/jsonxx/blob/master/LICENSE; and https://code.google.com/p/lz4/.

This product includes software licensed under the Academic Free License (http://www.opensource.org/licenses/afl-3.0.php), the Common Development and
Distribution License (http://www.opensource.org/licenses/cddl1.php) the Common Public License (http://www.opensource.org/licenses/cpl1.0.php), the Sun Binary
Code License Agreement Supplemental License Terms, the BSD License (http:// www.opensource.org/licenses/bsd-license.php), the new BSD License (http://
opensource.org/licenses/BSD-3-Clause), the MIT License (http://www.opensource.org/licenses/mit-license.php), the Artistic License (http://www.opensource.org/
licenses/artistic-license-1.0) and the Initial Developer’s Public License Version 1.0 (http://www.firebirdsql.org/en/initial-developer-s-public-license-version-1-0/).

This product includes software copyright © 2003-2006 Joe WaInes, 2006-2007 XStream Committers. All rights reserved. Permissions and limitations regarding this
software are subject to terms available at http://xstream.codehaus.org/license.html. This product includes software developed by the Indiana University Extreme! Lab.
For further information please visit http://www.extreme.indiana.edu/.

This product includes software Copyright (c) 2013 Frank Balluffi and Markus Moeller. All rights reserved. Permissions and limitations regarding this software are subject
to terms of the MIT license.

This Software is protected by U.S. Patent Numbers 5,794,246; 6,014,670; 6,016,501; 6,029,178; 6,032,158; 6,035,307; 6,044,374; 6,092,086; 6,208,990; 6,339,775;
6,640,226; 6,789,096; 6,823,373; 6,850,947; 6,895,471; 7,117,215; 7,162,643; 7,243,110; 7,254,590; 7,281,001; 7,421,458; 7,496,588; 7,523,121; 7,584,422; 7,676,516;
7,720,842; 7,721,270; 7,774,791; 8,065,266; 8,150,803; 8,166,048; 8,166,071; 8,200,622; 8,224,873; 8,271,477; 8,327,419; 8,386,435; 8,392,460; 8,453,159; 8,458,230; and
RE44,478, International Patents and other Patents Pending.

DISCLAIMER: Informatica Corporation provides this documentation "as is" without warranty of any kind, either express or implied, including, but not limited to, the
implied warranties of noninfringement, merchantability, or use for a particular purpose. Informatica Corporation does not warrant that this software or documentation is
error free. The information provided in this software or documentation may include technical inaccuracies or typographical errors. The information in this software and
documentation is subject to change at any time without notice.

NOTICES

This Informatica product (the "Software") includes certain drivers (the "DataDirect Drivers") from DataDirect Technologies, an operating company of Progress Software
Corporation ("DataDirect") which are subject to the following terms and conditions:

1. THE DATADIRECT DRIVERS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
2. IN NO EVENT WILL DATADIRECT OR ITS THIRD PARTY SUPPLIERS BE LIABLE TO THE END-USER CUSTOMER FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, CONSEQUENTIAL OR OTHER DAMAGES ARISING OUT OF THE USE OF THE ODBC DRIVERS, WHETHER OR NOT INFORMED OF THE POSSIBILITIES
OF DAMAGES IN ADVANCE. THESE LIMITATIONS APPLY TO ALL CAUSES OF ACTION, INCLUDING, WITHOUT LIMITATION, BREACH OF CONTRACT, BREACH
OF WARRANTY, NEGLIGENCE, STRICT LIABILITY, MISREPRESENTATION AND OTHER TORTS.

Publication Date: 2018-07-20


Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Informatica Resources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Informatica My Support Portal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Informatica Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Informatica Web Site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Informatica How-To Library. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Informatica Knowledge Base. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Informatica Support YouTube Channel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Informatica Marketplace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Informatica Velocity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Informatica Global Customer Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Chapter 1: RulePoint Interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10


RulePoint Interfaces Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Custom Service API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Java Adapter for REST API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
REST API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Chapter 2: RulePoint Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12


RulePoint Services Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Pluggable Services in RulePoint. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Creating a Custom Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Before You Begin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Building a Custom Service Jar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Marking the Custom Service Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Setting the Annotation Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Chapter 3: Custom Service API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18


Custom Service API Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Source Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Schedulable Source Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Listener Source Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Connection Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Creating a Custom Connection Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Connection Types and Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Analytic Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Creating a Custom Analytic Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Marshaller Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Creating a Custom Marshaller Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Responder Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

4 Table of Contents
Creating a Custom Responder Service. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Chapter 4: Java Adapter for REST API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28


Java Adapter for REST API Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Using the Java Adapter for REST API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Prerequisite. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
RulePoint Java Adapter Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Creating a RulePoint Application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Setting the Classpath. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Editing the Configuration Property File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Running a Sample File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Sample Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Search API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Object Specific Fields in a Filter Clause. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Filter Clause Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Chapter 5: RulePoint REST API. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35


RulePoint REST API Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Header and Body Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Request Header. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Request Body. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Date and Time Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Object IDs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
REST API Responses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Error Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Error Messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
REST API Guidelines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Chapter 6: Sample XML and JSON Requests and Responses. . . . . . . . . . . . . . . . . 47


Projects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Create Projects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Retrieve Projects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Update Projects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Delete Projects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Topics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Create Topics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Retrieve Topics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Update Topics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Delete Topics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Connections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
SQL Connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Email Connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
JMS Connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

Table of Contents 5
Web Service Connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Sources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
SQL Source. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
JMS Source. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
RSS Reader Source. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
URL Monitoring Source. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Web Page Monitoring Source. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Web Service Source. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Event Generator Source. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
File Input Source. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Schedule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Static Schedule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Dynamic Schedule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Responders. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
SQL Responder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Email Responder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
JMS Responder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Web Service Responder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Event Transformer Responder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
File Output Responder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
RTAM Responder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Responses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
SQL Response. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Email Response. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
JMS Response. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
Web Service Response. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
Event Transformer Response. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
RTAM Response. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
File Output Response. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Marshaller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Create a Marshaller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Update a Marshaller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
Create a Template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
Update a Template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
Delete a Template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
Rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
Create Template Rule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
Update Template Rule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Delete Template Rule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Retrieve Rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Analytics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360

6 Table of Contents
Retrieve Analytics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
Users. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
Create Users. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
Retrieve Users. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
Update Users. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
Delete Users. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
Objects Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
Deploy Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
Undeploy Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
Redeploy Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
Reassign Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
Create Event. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Log In. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378

Chapter 7: RulePoint Pluggable Authentication Module. . . . . . . . . . . . . . . . . . . . . 380


RulePoint Pluggable Authentication Module Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
RulePoint Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Account Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Authorization Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Authentication Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Session Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
Password Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
Defining an Authentication Contract. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
Develop and Enable Oracle Access Manager Authentication Plugin on RulePoint. . . . . . . . . 382
OAMAuthenticationFilter.java. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
PAUserDetailsServiceImpl. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
security_authentication_OAM.xml. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384

Appendix A: HTTP Request and Response Attributes . . . . . . . . . . . . . . . . . . . . . . . 387


Request and Response Attributes Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
Common Request and Response Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
Topic Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
Source Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
Connection Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Analytic Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
Responder Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Response Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Deployment Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398

Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399

Table of Contents 7
Preface
The RulePoint Developer Guide provides information about the Software Development Kit (SDK) and REST
APIs available in RulePoint and how to use them to develop custom applications.

The RulePoint Developer Guide explains how developers can use the custom service API, Java Adapter for
REST API, and REST API. It provides examples you can use when you develop your services, adapters, and
objects. This guide assumes you have a working knowledge of RulePoint and are familiar with application
programming interfaces.

Informatica Resources

Informatica My Support Portal


As an Informatica customer, you can access the Informatica My Support Portal at
http://mysupport.informatica.com.

The site contains product information, user group information, newsletters, access to the Informatica
customer support case management system (ATLAS), the Informatica How-To Library, the Informatica
Knowledge Base, Informatica Product Documentation, and access to the Informatica user community.

Informatica Documentation
The Informatica Documentation team takes every effort to create accurate, usable documentation. If you
have questions, comments, or ideas about this documentation, contact the Informatica Documentation team
through email at infa_documentation@informatica.com. We will use your feedback to improve our
documentation. Let us know if we can contact you regarding your comments.

The Documentation team updates documentation as needed. To get the latest documentation for your
product, navigate to Product Documentation from http://mysupport.informatica.com.

Informatica Web Site


You can access the Informatica corporate web site at http://www.informatica.com. The site contains
information about Informatica, its background, upcoming events, and sales offices. You will also find product
and partner information. The services area of the site includes important information about technical
support, training and education, and implementation services.

8
Informatica How-To Library
As an Informatica customer, you can access the Informatica How-To Library at
http://mysupport.informatica.com. The How-To Library is a collection of resources to help you learn more
about Informatica products and features. It includes articles and interactive demonstrations that provide
solutions to common problems, compare features and behaviors, and guide you through performing specific
real-world tasks.

Informatica Knowledge Base


As an Informatica customer, you can access the Informatica Knowledge Base at
http://mysupport.informatica.com. Use the Knowledge Base to search for documented solutions to known
technical issues about Informatica products. You can also find answers to frequently asked questions,
technical white papers, and technical tips. If you have questions, comments, or ideas about the Knowledge
Base, contact the Informatica Knowledge Base team through email at KB_Feedback@informatica.com.

Informatica Support YouTube Channel


You can access the Informatica Support YouTube channel at http://www.youtube.com/user/INFASupport.
The Informatica Support YouTube channel includes videos about solutions that guide you through performing
specific tasks. If you have questions, comments, or ideas about the Informatica Support YouTube channel,
contact the Support YouTube team through email at supportvideos@informatica.com or send a tweet to
@INFASupport.

Informatica Marketplace
The Informatica Marketplace is a forum where developers and partners can share solutions that augment,
extend, or enhance data integration implementations. By leveraging any of the hundreds of solutions
available on the Marketplace, you can improve your productivity and speed up time to implementation on
your projects. You can access Informatica Marketplace at http://www.informaticamarketplace.com.

Informatica Velocity
You can access Informatica Velocity at http://mysupport.informatica.com. Developed from the real-world
experience of hundreds of data management projects, Informatica Velocity represents the collective
knowledge of our consultants who have worked with organizations from around the world to plan, develop,
deploy, and maintain successful data management solutions. If you have questions, comments, or ideas
about Informatica Velocity, contact Informatica Professional Services at ips@informatica.com.

Informatica Global Customer Support


You can contact a Customer Support Center by telephone or through the Online Support.

Online Support requires a user name and password. You can request a user name and password at
http://mysupport.informatica.com.

The telephone numbers for Informatica Global Customer Support are available from the Informatica web site
at http://www.informatica.com/us/services-and-training/support-services/global-support-centers/.

Preface 9
Chapter 1

RulePoint Interfaces
This chapter includes the following topic:

• RulePoint Interfaces Overview, 10

RulePoint Interfaces Overview


This guide describes the RulePoint interfaces and how you can use them to embed the capabilities of
RulePoint into your enterprise application.

You can use the following interfaces to embed RulePoint capabilities in your application:

• Custom Service API


• Java Adapter for REST API
• REST API

Custom Service API


Use the Custom Service API to create custom services.

The Custom Service API provides a set of classes that you can extend to develop pluggable custom services.
RulePoint uses the OSGi-based framework to load the custom services in the design-time and run-time
environment. The OSGi framework provides you with the flexibility to dynamically load services when the
system is running.

When you use the RulePoint SDK to create a custom service that service appears on the user interface of the
RulePoint application.

Java Adapter for REST API


The Java Adapter simplifies the task of interacting with the RulePoint REST API.

The Java Adapter for REST API offers a suite of Java objects that model entities which exist within RulePoint,
JSON parsers and generators that are compatible with the JSON schema, and a number of API classes to
access the RulePoint functionality.

10
REST API
You can use the REST API to create, retrieve, update, or delete RulePoint resources directly over HTTP. You
can also perform deployment tasks, such as deploy, redeploy, reassign, and undeploy RulePoint objects.

The HTTP request methods supported are GET, POST, PUT, and DELETE. The sample rest calls show you how
to use the REST API with application/json and application/xml MIME types.

RulePoint Interfaces Overview 11


Chapter 2

RulePoint Services
This chapter includes the following topics:

• RulePoint Services Overview, 12


• Creating a Custom Service, 12

RulePoint Services Overview


RulePoint uses services to connect to internal and external sources and applications to produce and respond
to events.

RulePoint services are configurable interfaces that can link to other software systems, such as Instant
Messaging, email, RealTime Alert Manager (RTAM), a web page, a database, or a news feed.

RulePoint provides many useful built-in services, such as JMS, email, URL monitoring, and Web Services.
However, you can also build your own custom pluggable services.

Pluggable Services in RulePoint


You can use the RulePoint SDK to develop the following pluggable services:

• Source services. Get information from a system.


• Analytic services. Analyze data within a system.
• Responder services. Provide a response through a system.
• Connection services. Connect services to the target database.
• Marshaller services. Enrich events or activations.

Creating a Custom Service


Complete the following tasks to create a custom service:

1. Determine the purpose and actions of the services.


2. Complete the prerequisite tasks before you create a custom service.

12
3. Create a custom RulePoint service:
a. Create an activator class that extends from com.informatica.cep.sdk.base.BaseActivator.
b. Mark the custom service classes by using the custom annotations.
c. Set the annotation attributes.
d. Provide implementation for the com.informatica.cep.sdk.base.BaseActivator.getPackageNames()
method for the custom service to function. Add a custom configurable property.
This method must return a string array that contains the list of packages within the bundle where it
looks up the custom service annotations.
e. Edit the bundle manifest file and point to the activator class.
If you need to use an internal class from the parent run-time or design-time JVM, you need to
specify its package in the property org.osgi.framework.bootdelegation in the file RULEPOINT_HOME/
conf/felix.properties.
4. Copy the custom service jar to the custom folder in the RulePoint installation directory.
5. In the RulePoint user interface, verify if the services are available in the corresponding services page.

Before You Begin


Complete the following prerequisites to build a custom RulePoint service:

• You must have a JDK compiler to build the classes. The jar packaging tool comes with the Java
Development Kit (JDK). Ensure that custom services are compatible with JDK 1.7.0_11.
• You must have a basic knowledge of OSGi to write the manifest file.
• You must have installed the sdk-core.jar, which contains the interfaces, abstract classes, and annotations.
• Set the environment variable, RULEPOINT_HOME, to the RulePoint 6.2 installation location.

Building a Custom Service Jar


When you build a custom service jar, follow these steps to package the contents of the jar file:

1. Create a Java-based package structure for the RulePoint SDK class files that you extend.
2. Place the third-party dependent jars that custom service classes require in the lib folder.
The bundle-classpath must point to the third-party jars in the lib folder within the bundle.
3. Place the MANIFEST in the META-INF directory.
4. Use the jar utility available in the JDK to package all the contents into a jar file.

Structure of a Custom Jar File


When you build a jar for a specific service, it must have the following structure:
org
company
ServiceClass
Activator (extending from BaseActivator)
lib
third-party1.jar
third-party2.jar
META-INF
MANIFEST.MF

Creating a Custom Service 13


Place the jars inside a OSGi bundle jar that has a valid manifest. The bundle-classpath must point to the third-
party jars in the lib directory within the bundle.

Marking the Custom Service Classes


Use the annotations to mark the custom service classes and configurable properties, respectively.

Set the following annotations:

• com.informatica.cep.sdk.annotations.Service
• com.informatica.cep.sdk.annotations.ServiceProperty

The following table describes the custom annotations:

Annotation Description

com.informatica.cep.sdk.annotations.Service Set this annotation for all custom service classes along with
the mandatory metadata when you define a service. Set the
attributes for this annotation.

com.informatica.cep.sdk.annotations.ServiceProperty If your service has multiple instance variables, you can either
set the variables internally within the service or externally by
using inputs provided by the user. All the user-exposed and
configurable properties of the service must have public
getters and setters. You must apply the @ServiceProperty
annotation for the getters and set the attributes for this
annotation.

Setting the Annotation Attributes


You must set the attributes of the annotations for the service classes.

com.informatica.cep.sdk.annotations.Service annotation
The following table describes the attributes of the Service annotation:

Attribute Description

name The unique name of the service. Ensure that this property does not conflict with any other
service of this type.

configClassName The fully qualified class name of the custom service.

displayName The display name for the service on the UI.

description Optional. A short description for the service.

14 Chapter 2: RulePoint Services


Attribute Description

connectionTypeName Optional. The unique name of the connection to use for this service. Leave this field blank if
this service does not require a connection.

serviceType The type of service, for example:


- Source
- Responder
- Connection
- Analytic
- Marshaller

@Service Annotation Code


/**
* Annotation used to mark and provide metadata for a service
*
*
*/
@Target(value=ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Service {
// Class Metadata. Used to populate the BeanDescriptor
String name();
String configClassName() default "";
String displayName();
String description();
String connectionTypeName() default "";

// The type of the service: SOURCE/CONNECTION/RESPONDER/ANALYTIC/MARSHALLER


ServiceType serviceType();
}

com.informatica.cep.sdk.annotations.ServiceProperty
The following table describes the attributes of the ServiceProperty annotation:

Attribute Description

name Internal name of the property. Ensure that this property does not conflict with any other configurable
property within the service.

displayName The display name for the service on the user interface.

description Optional. A short description for the property.

propertyEditor The fully qualified property editor class name to use for this property. For more information on
property editors and how to use them in the SDK, refer to “Property Editor Classes” on page 16.

fieldType Indicates the type of field. Default is Text.

order A unique ordinal number for this field for user interface ordering. Ensure that this order number does
not conflict with any other configurable field in the service.

hidden Indicates whether to show this field in the user interface. Default is false.

Creating a Custom Service 15


Attribute Description

optional Indicates if this is an optional field. Provide a value for this field if optional is false. Default is true.

overrides Applies only to responders. Indicates if this field can be overridden in the response or rule. Default is
true.

defaultValue The default value of the property in the string.

Property Editor Classes


The property editor class is a mandatory attribute in @ServiceProperty annotation, and you must provide the
property editor class based on the type of field you set in the ServiceProperty annotation.

The editor class defines how the design time must validate the property and how the configured field type
displays in the user interface. Use a property editor according to the data type of your configurable property.

The following table lists the supported property editor classes for a specific field type:

Field Type Property Editor Class

Plain text com.informatica.cep.shared.beans.propertyeditors.TextEditor

Password text com.informatica.cep.shared.beans.propertyeditors.PasswordEditor

Multiline text com.informatica.cep.shared.beans.propertyeditors.MultiLineTextEditor

Natural number com.informatica.cep.shared.beans.propertyeditors.IntegerEditor

Integer number com.informatica.cep.shared.beans.propertyeditors.AllIntegerEditor

Long number com.informatica.cep.shared.beans.propertyeditors.LongEditor

Float number com.informatica.cep.shared.beans.propertyeditors.FloatEditor

@ServiceProperty Annotation
/**
* Annotation used to mark a configurable service property. This metadata is sent along
with the service configuration.
*
*
*/
@Target(value={ElementType.FIELD, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface ServiceProperty {
/**
* Name of the service property
* @return the name
*/
String name();
/**
* Display name of the service property, used to show in the UI
* @return the display name
*/
String displayName();
/**
* Description of the service property

16 Chapter 2: RulePoint Services


* @return the description text
*/
String description() default "";

/**
* Associated property editor of the property.
* @return the property editor
*/
String propertyEditor();
/**
* Field type of the property, defaults to text.
* @return field type
*/
String fieldType() default "TEXT";
/**
* Returns the order where it needs to be rendered in the UI.
* @return
*/
int order();
/**
* Returns if the service property is hidden in the UI
* @return
*/
boolean hidden() default false;
/**
* Returns if the property is optional.
* @return
*/
boolean optional() default true;
/**
* Returns if the service property will be over-ridden in the response and rule
authoring.
* @return the overrides property
*/
boolean overrides() default true;
/**
* Default value of the service property.
* @return the default value
*/
String defaultValue() default "";
}

Creating a Custom Service 17


Chapter 3

Custom Service API


This chapter includes the following topics:

• Custom Service API Overview, 18


• Source Services, 18
• Connection Services, 21
• Analytic Services, 24
• Marshaller Services, 25
• Responder Services, 26

Custom Service API Overview


This chapter describes the RulePoint services and how you use the SDK to create your own custom services
for sources, connections, analytics, responders, and marshallers for your enterprise application.

RulePoint uses the OSGi-based framework to load custom services in the design-time and run-time
environment. In RulePoint, the design-time and run-time environments have separate instances of the OSGi
container for the custom services. Both the containers read from the same directory.

Source Services
Source services connect to external systems to fetch data.

The source services convert the fetched data into events. The events are published on topics. RulePoint
includes schedulable and listener source services.

Schedulable Source Services


Schedulable services generate events based on a schedule that you set.

A schedulable service contains a configurable topic that you can schedule to run at specific times, for
example, one time every 30 minutes. An example of a schedulable service is an RSS or Atom News Reader
Service that extracts events from an RSS news feed every hour.

18
Creating a Custom Schedulable Source Service
1. Create a service class that extends from the AbstractPluggableSchedulableSource abstract class.
2. Mark the service class with the @Service annotation. Set the serviceType in @Service to
ServiceType.SOURCE.
The following code is an example of a service class that extends the
AbstractPluggableSchedulableSource class:
@Service(name="TemperatureService",
displayName = "Temperature Source",
description = "This is a Sample Source Service",
configClassName = "com.informatica.sdk.samples.sources.SampleListenerSource",
serviceType = ServiceType.SOURCE)
public class TemperatureSourceService extends
AbstractPluggableSchedulableSource {
3. Implement the following lifecycle methods for the schedulable source:
• To set the instance variables and fetch values from the properties object and configuration logic,
implement the com.informatica.cep.sdk.service.AbstractSource.configure(Properties) method. You
implement this method first to add a custom configuration property to the user interface. The
ServiceController framework calls this method during deployment. Properties argument to the
function carries all the user-provided values for the configurable properties that have a valid
@ServiceProperty annotation on their getters.
The connection attributes merged with the attributes of the source, analytic, or responder into a
single Properties object are passed to the configure() method during deployment.
The following example illustrates how to set the custom configurable property:
private String city;

@ServiceProperty(
name="city",
displayName="City",
description="Enter the name of the city and it will return the City
Temperature",

propertyEditor="com.informatica.cep.shared.beans.propertyeditors.TextEditor",
optional=false,
order=1)
public String getCity() {
return city;
}

public void setCity(String city) {


this.city = city;
}
When you configure a source, the configured property appears in the user interface.
• To execute the service and use the MessagePublisher to publish events in the form of Map<String,
Object>, implement the com.informatica.cep.sdk.Schedulable.execute() method. To publish the
message, you must access the MessagePublisher by calling the getPublisher() method.
The following is an example of the execute method implementation:
@Override
public Map<String, Object> execute() {
Map<String, Object> event = new HashMap<String, Object>();
event.put("temperature", "78");
event.put("city", city);
getPublisher().publishMessage(event);
return null;
}

Source Services 19
• To free the resources and undeploy the source service, implement the
com.informatica.cep.sdk.Service.destroy() method. Call this method to undeploy the source. If an
analytic uses a custom connection, you cannot destroy or clean up the connection. The destroy
method for the connection is a part of connection undeployment.
A new entry is created for the source type. The user interface displays the newly added source and the
custom configuration property in the list on the source creation page.

Listener Source Services


Listener services generate events at any time based on particular occurrences, but not on a scheduled basis.
The listener source services push data into RulePoint through an external source.

Examples for listener services are JMS Source and Instant Messaging Source. The listener services publish
events when they receive a message from the external entity in an asynchronous manner.

Creating a Custom Listener Source Service


1. Create a service class that extends from the
com.informatica.cep.sdk.service.api.AbstractPluggableListenerSource abstract class.
2. Mark the service class with the @Service annotation. Set the serviceType in @Service to
ServiceType.SOURCE.
The following code is an example of a source service class that extends the
AbstractPluggableListenerSource class:
@Service(name="sampleListenerSource",
description = "com.informatica.sdk.samples.sources.SampleListenerSource",
configClassName = "com.informatica.sdk.samples.sources.SampleListenerSource",
displayName = "Sample Listener Source",
serviceType = ServiceType.SOURCE)
public class SampleListenerSource extends AbstractPluggableListenerSource {
3. During deployment, pass a MessageListener while configuring the listener source.
4. Implement the following methods for the listener source:
a. To set the instance variables and fetch values from the properties object and configuration logic,
implement the com.informatica.cep.sdk.service.AbstractSource.configure(Properties) method. The
connection attributes merged with the attributes of the source, analytic, or responder into a single
Properties object are passed to the configure() method during deployment.
The ServiceController framework calls this method during deployment. Properties argument to the
function contains all the user-provided values for the configurable properties that have a valid
@ServiceProperty annotation on their getters.
b. To keep the passed MessageListener so that the spawned thread can call it from within, implement
the com.informatica.cep.sdk.Listener.listen(MessageListener) method. The ServiceController
framework calls this method after configuration. The thread calls receive(Map<String, Object>) with
the event map to publish it.
c. To perform cleanup activities, implement the
com.informatica.cep.sdk.service.AbstractSource.destroy() method. The ServiceController
framework calls this method while undeploying the source. If an analytic uses a custom connection,
you cannot destroy or clean up the connection. The destroy method for the connection is a part of
connection undeployment.
5. Add a custom configurable property. Set an instance variable externally from the values provided in the
user interface by using the @ServiceProperty annotation.

20 Chapter 3: Custom Service API


Connection Services
You can create pluggable connection services to connect RulePoint services to the target data source.

Examples for connections are JDBC connection and JMS connection.

Creating a Custom Connection Service


1. Extend the service class from the AbstractPluggableConnection.
2. Set the serviceType attribute ServiceType.CONNECTION in the @Service annotation.
You can give the name that you give a connection for the connectionTypeName attribute in sources,
responders, and analytics. If you set this property, it is assumed that the service requires a connection
and it will be validated against the provided type of the connection and the instance will be passed
through the setter setConnection().
The following code is an example of a connection service class that extends the
AbstractServiceConnection class:
@Service(name="cacheconnection",
displayName="Cache Connection",
description="Connects to a Ehcache provider",
configClassName="com.informatica.sdk.samples.analytics.CacheConnection",
serviceType=ServiceType.CONNECTION)
public class CacheConnection extends AbstractServiceConnection{
The following example illustrates how to link a connection to a source, analytic, or responder by
providing the connectionTypeName:
@Service(name="getanalytic",
displayName="Get Analytic",
description="Custom get analytic",
configClassName="com.informatica.sdk.samples.analytics.GetAnalytic",
connectionTypeName ="cacheconnection",
serviceType=ServiceType.ANALYTIC)
public class GetAnalytic extends AbstractPluggableAnalytic {
3. Override the following methods for a connection service:
• To establish a logical connection and store it within the same service instance, implement the
com.informatica.cep.sdk.service.AbstractServiceConnection.allocateConnection() method. The
ServiceController framework calls this method after calling all the setters on configurable properties.
• To return the saved logical connection instance like jdbcTemplate, c3p0 data source, ehcache-
manager instance, implement the
etc.com.informatica.cep.sdk.service.AbstractServiceConnection.getConnection() method. This
returns a java.jang.Object.
The service using this connection must know how to use this and which class to cast it to.
• To provide all the connection cleanup logic, implement the
here.com.informatica.cep.sdk.Service.destroy() method. The ServiceController framework calls this
method while undeploying a connection.

Connection Services 21
Connection Types and Properties
When you want to add a connection for a custom service, you need to specify the connectionTypeName in
the @Service annotation for that service. RulePoint provides predefined connection services that you can
configure while creating a custom service.

The following table provides the connectionTypeName for the different connection types:

Connection Type connectionTypeName

Email Connection emailConnection

Instant Messaging (Jabber/XMPP) Connection jabberConnection

SQL Connection jdbcConnection

JMS Connection jmsConnection

Web Service Connection wsConnection

Ultra Messaging Connection umConnection

Property and Description for Email Connection


The following table describes the configuration properties for an email connection:

Property Description

server The fully qualified domain name of the SMTP server that is used to send outbound email from RulePoint.

port The port number to connect to the SMTP server.

username The SMTP server user name.

password The password associated with the SMTP server user name.

retryCount The number of connection retry attempts that RulePoint should make.

retryDelay The amount of time, in milliseconds, to wait between connection attempts.

Property and Description for Instant Messaging (Jabber/XMPP) Connection


The following table describes the configuration properties for an Instant Messaging (Jabber/XMPP)
Connection:

Property Description

server The fully-qualified host name or DNS service name of the Jabber or XMPP Server to which
this service connects.

port The port number to connect to the Jabber or XMPP server.

username The user name used by RulePoint to connect to the Jabber or XMPP server.

22 Chapter 3: Custom Service API


Property Description

password The password associated with the user name used by RulePoint to connect to the Jabber
or XMPP server.

publishPresencePackets Option to create an event to a specified topic each time an IM user enters, leaves, or
changes the status on the IM server.

Property and Description for JMS Connection


The following table describes the configuration properties for an SQL Connection:

Property Description

location The location of the naming service and port on which to connect.

userName The authentication user name.

password The password for the authentication user name.

contextFactory The name of the object in the JNDI server that enables the JMS Client to create JMS
connections.

packagePrefixes A colon-delimited list of package prefixes to use when loading URL context factories. These
are the package prefixes for the name of the factory class that will create a URL context
factory. For values, see the documentation of the JMS provider.

jmsConnectionFactory The JMS provider specific initial JNDI context factory implementation for connecting to the
JNDI service. This value is a fully qualified class name of the Initial Context Factory.

Property and Description for SQL Connection


The following table describes the configuration properties for a JMS Connection:

Property Description

initialPoolSize The initial pool size.

acquireIncrement Number of connections to inquire at once when increasing the pool size.

maxPoolSize Maximum number of connections to hold in the connection pool.

minPoolSize Minimum number of connections to hold in the connection pool.

loginTimeOut Log in timeout, in seconds.

driverClass The name of the JDBC driver class used to establish connections to the specified database.

retryCount Number of connection retry attempts that RulePoint should make.

retryDelay The amount of time, in milliseconds, to wait between connection attempts.

jdbcString The JDBC connection string that you can use to connect to the target database.

Connection Services 23
Property Description

username User name to log in to the target database.

password Password to log in to the target database.

Property and Description for Web Services Connection

Property Description

url The URL of the WSDL file that contains the operations that you want to execute.

loginName The Web Service user name for Web Service authentication.

password The password associated with the Web Service user name.

wsdlDuration The amount of time in seconds that the WSDL is retained in a cache.

userNameSpace The user name space.

retryCount The number of connection retry attempts that RulePoint should make.

retryDelay The amount of time, in milliseconds, to wait between connection attempts.

Property and Description for Ultra Messaging Connection


The following table describes the configuration properties for an Ultra Messaging Connection:

Property Description

confFile The LBM configuration file in the UM application.

contextParams The LBM context parameters in the LBM configuration file.

Analytic Services
Analytics are functions that you can use during rule processing to either evaluate a condition, or to enrich a
condition.

When you create an analytic service, configurable analytics appear in the list. Non-configurable analytics
appear directly as suggestions during rule authoring.

Creating a Custom Analytic Service


1. Extend the custom analytic class from the
com.informatica.cep.sdk.service.api.AbstractPluggableAnalytic abstract class.
2. Mark the abstract class with @Service annotation with serviceType as ServiceType.ANALYTIC.

24 Chapter 3: Custom Service API


The following code is an example of an analytic class that extends the AbstractPluggableAnalytic class:
@Service(name="getanalytic",
displayName="Get Analytic",
description="Custom get analytic",
configClassName="com.informatica.sdk.samples.analytics.GetAnalytic",
connectionTypeName ="cacheconnection",
serviceType=ServiceType.ANALYTIC)
public class GetAnalytic extends AbstractPluggableAnalytic {
3. Implement the following methods to write a custom analytic:
• com.informatica.cep.sdk.service.AbstractPluggableAnalytic.configure(Properties): The
ServiceController framework calls the configured property-values of the analytic during deployment.
• com.informatica.sdk.samples.analytics.GetAnalytic.isSystem(): This method must return whether the
analytic is a system analytic. If the method returns true, this analytic is considered as a non-
configurable analytic. If the method returns false, the analytic appears in the analytic creation user
interface and the user can create instances of it.
Overriding isSystem():
@Override
public boolean isSystem() {
return false;
}
• com.informatica.cep.sdk.service.AbstractAnalytic.destroy(): This method must provide cleanup logic
only for the analytic. If this analytic uses a custom connection, you cannot destroy or clean up the
connection. The destroy method for the connection is a part of connection undeployment.
• com.informatica.cep.sdk.Analytic.analyze(List<Object>): This method provides the actual evaluation
logic for the analytic, which optionally uses a connection if needed. The List<Object> passed is the
list of arguments that the analytic takes. The type of elements in this list depends on how it is being
used in the rule. The return value is usually a string or a list of strings if the analytic returns multiple
values. It can also be a list of objects. Hence, the return type is left open.
• com.informatica.cep.sdk.Analytic.isUnary(): This method returns whether the analytic can be used in
a condition. If it returns true, you cannot use the analytic directly in a condition, but you can use it as
a Boolean expression.

The configured analytic appears in the list in the corresponding page of the user interface.

Marshaller Services
When you attach a marshaller to a source, it enriches events that are published by the source before it
reaches the event processor. When you attach a marshaller to a responder, it enriches the activation from the
event processor before sending it out to the responder.

Every source needs a separate copy of the marshaller. Marshallers are stateless and do not support the
destroy logic.

Creating a Custom Marshaller Service


The marshaller is the only custom service type that is not OSGi compliant. You need to place the jar in the
RULEPOINT_HOME/lib directory and not the custom directory. As the marshaller is not OSGi compliant,

Marshaller Services 25
RulePoint does not autodetect the marshaller that you add. You need to restart the run-time if it is running for
the RulePoint run-time to detect the marshaller.

1. Extend the service class that extends from the com.informatica.cep.sdk.base.BaseActivator abstract
class.
The following example shows a service class that extends from the AbstractPluggableMarshaller class:
/**
*
*
*/
public class SampleMarshaller extends AbstractPluggableMarshaller {
2. Implement the following methods:
• com.informatica.cep.sdk.service.AbstractMarshaller.configure(Properties): Implement this method to
set the required instance variables with the values from the user interface. The ServiceController
framework calls the configure method during deployment of the source with the properties provided
in the user interface.
• com.informatica.cep.sdk.Marshaller.transform(Map<String, Object>): Implement this method to use
the original event or activation map and add, remove, or modify the properties with the
transformation logic and return the transformed event or activation. If the transform method throws a
RuntimeException, the exception is delegated to the ServiceController layer. You can view this error
on the dashboard.
3. Package the class into the jar and copy it to the RULEPOINT_HOME/lib directory.
4. Start the design-time and run-time environment.
The marshaller class name and configured properties appear in the list in the corresponding page of the
user interface.

Responder Services
Responder services enable you to define the action to take when a rule triggers.

You can create multiple responses from a single responder service. For example, an email service is a type of
responder service that defines the mail server and account used to send an email in response when a rule
triggers. You then can create multiple email responses from this service in which you define different
recipients and contents of the emails to be sent when a particular rule triggers.

Creating a Custom Responder Service


1. Create a service class that extends from the AbstractPluggableResponder class.
2. Mark the service class with the @Service annotation. Set the serviceType in @Service to
ServiceType.RESPONDER.
The following code is an example of a service class that extends the AbstractPluggableResponderclass:
@Service(name="RecorderResponder",
displayName = "Recorder Responder",
configClassName = "com.informatica.sdk.samples.responses.RecorderResponder",
description = "This responder can be used to record the number of executions
for a chunk size",
serviceType = ServiceType.RESPONDER)
public class RecorderResponder extends AbstractPluggableResponder implements
ThreadSafe {

26 Chapter 3: Custom Service API


3. Implement the following methods to write a custom responder:
• com.informatica.cep.sdk.service.AbstractResponder.configure(Properties): Implement this method
first to add a custom configuration property to the user interface. The ServiceController framework
calls this method during deployment of the responder. Properties argument to the function sets the
required instance variables with the user-provided values for configurable properties that have a valid
@ServiceProperty annotation on their getters.
• com.informatica.cep.sdk.Responder.respond(Response): This method provides the logic for the
response. The Response object passed includes information about the activation, such as the event
data and response parameters. The respond() method calls the responder controller whenever it
receives an activation.
• com.informatica.cep.sdk.service.AbstractResponder.destroy():The ServiceController framework calls
this method while undeploying the responder.

Responder Services 27
Chapter 4

Java Adapter for REST API


This chapter includes the following topics:

• Java Adapter for REST API Overview, 28


• Using the Java Adapter for REST API, 28
• Creating a RulePoint Application, 30
• Search API, 32

Java Adapter for REST API Overview


The Java Adapter for REST API is a Java software module that simplifies the task of interacting with the
RulePoint REST API.

The Java Adapter for REST API offers the following benefits:

• Includes JSON parsers and generators that are compatible with the JSON schema exposed by the
RulePoint REST API.
• Includes an entire suite of Java classes that model the entities which exist within RulePoint. Entities
include RulePoint objects, project context objects, users and roles, and deployment options, such as
deploy, undeploy, and redeploy.
• Includes multiple API classes that provide a simple programmatic interface for accessing RulePoint
functionality.
• Provides simple, structured, and localizable error handling.

Using the Java Adapter for REST API


Before you install the RulePoint Java Adapter for REST API, you must complete the prerequisite.

Prerequisite
The RulePoint Java Adapter requires that you have a running instance of RulePoint 6.2.

28
RulePoint Java Adapter Components
Unzip the contents of RulePoint_Java_Adapter_6.2.zip to your work folder (for example, C:\api). This zip
file includes the following files:

File and Location Description

RulePointJavaAdapterJavaDoc.zip The API reference documentation for the Java Adapter.

bin/config.properties A sample configuration file for the Java API Adapter.

lib/rulepointAdapter.jar The RulePoint Java API Adapter classes.

lib/jackson/jackson-core-2.0.2.jar The Jackson Core streaming parser library required by the RulePoint
Java API Adapter.

lib/jackson/jackson-annotations-2.0.2.jar The Jackson Annotations library for annotation-based configuration


required by the RulePoint Java API Adapter.

lib/jackson/jackson-databind-2.0.2.jar The Jackson databind for data binding and tree model required by
the RulePoint Java API Adapter.

lib/commons-codec-1.4.jar The Apache Commons Codec library required by the RulePoint Java
API Adapter.

lib/ joda-time-2.1.jar A library that ensures a quality replacement for the Java date and
time classes.

lib/ log4j-1.2.16.jar A logging library for Java that enables logging at runtime without
modifying the application binary.

lib/commons-httpclient-3.1.jar The Apache HttpClient library required by the RulePoint Java API
Adapter.

lib/commons-logging-1.1.1.jar The Apache logging library required by the RulePoint Java API
Adapter.

samples/build.properties The build property file to run a sample demo. You use this file to
configure which sample file to run.

samples/build.xml The ant build script to run the sample.

samples/ The sample files that show you how to use the REST Adapter API.
The samples include the following files:
- AdvancedRuleDemo.java
- EmailTemplateDemo.java
- ListResponsesByFilter.java
- DeployRuleDemo.java
- ListRulesByFilter.java
- PublishEventDemo.java
- RtamTemplateDemo.java
- RulePointLoginDemo.java
- TemplateUpgradeDemo.java

Using the Java Adapter for REST API 29


Creating a RulePoint Application
To create your first RulePoint application, you must set the classpath and edit the configuration property file.

Setting the Classpath


When creating the Java project, include the following files in the classpath:

• bin/config.properties
• lib/rulepointAdapter.jar
• lib/jackson/jackson-core-2.0.2.jar
• lib/jackson/jackson-annotations-2.0.2.jar
• lib/jackson/jackson-databind-2.0.2.jar
• lib/commons-codec-1.4.jar
• lib/commons-httpclient-3.1.jar
• lib/commons-logging-1.1.1.jar
• joda-time-2.1.jar
• log4j-1.2.16.jar

Editing the Configuration Property File


Edit the configuration property file bin/config.properties.

Ensure that the following element is configured with the correct URL to communicate with RulePoint. Also,
ensure that the URL includes a trailing slash ‘/’ character:
RulePoint.Base.URL=http://[localhost]:[port]/rulepoint/

Running a Sample File


To run a sample, edit the samples/build.properties file and uncomment the name of one of the sample
classes that you want to run. Then execute ant run target to compile and run the uncommented sample.

Sample Code
The following source code demonstrates how to log in to RulePoint, create a rule, list all rules, and then log
out.

Note: You must create a response named “RTAM Alert” and a topic named "news" in RulePoint before
attempting to execute this code. If you do not create a response, you will receive a RulePointException error
at run time.

import java.util.ArrayList;
import java.util.List;

import com.informatica.cep.wrapper.api.ProjectContext;
import com.informatica.cep.wrapper.api.RulePointAPI;
import com.informatica.cep.wrapper.dao.query.FilterClause;
import com.informatica.cep.wrapper.dao.query.OrderBy;
import com.informatica.cep.wrapper.dao.query.PaginatedQuery;
import com.informatica.cep.wrapper.dao.query.QueryFilter;
import com.informatica.cep.wrapper.error.RulePointException;
import com.informatica.cep.wrapper.vo.AccessControlListVO;

30 Chapter 4: Java Adapter for REST API


import com.informatica.cep.wrapper.vo.AccessControlListVOImpl;
import com.informatica.cep.wrapper.vo.AccessControlVO;
import com.informatica.cep.wrapper.vo.AccessControlVOImpl;
import com.informatica.cep.wrapper.vo.Permission;
import com.informatica.cep.wrapper.vo.RuleVO;
import com.informatica.cep.wrapper.vo.RuleVOImpl;

/**
* A simple application that performs the following steps:
*
* 1) Login to RulePoint 2) Create a rule 3) Load a list of rules 4) Logout of
* RulePoint
*/
public class HelloRulePoint {
private static String projectName = "Default Project";

public static void main(String[] args) {


// Construct a new RulePointAPI that will be initialized with a default
// configuration that can be overridden by the contents of
// config.properties.
RulePointAPI api = new RulePointAPI();
ProjectContext context = null;
try {
// login user=admin, password=admin, locale=en_US
api.login("Administrator", "Administrator1", "en_US");
context = api.getProjectContextByName(projectName);
// build a rule to create in RulePoint
RuleVO rule = new RuleVOImpl();
// generate a unique name for the rule
rule.setName("Hello World rule " + System.currentTimeMillis());
rule.setDescription("This is the first RulePoint rule that I have "
+ "created using Java");
// IMPORTANT NOTE: The following rule references the "RTAM Alert" response.
// Therefore, the RTAM Alert response must exist in RulePoint before we
attempt to create this rule; otherwise, a RulePointException will be thrown.
rule.setDrql("when 1 news then \"RTAM Alert\"");

// This access control grants read permission to the user identified by the
unique name 'demo'.
AccessControlVO demoAccess = new AccessControlVOImpl();
demoAccess.setPermission(Permission.READ);
demoAccess.setGranted(true);
demoAccess.setPrincipal("demo");
// Build the access control list
AccessControlListVO acl = new AccessControlListVOImpl();
List<AccessControlVO> list = new ArrayList<AccessControlVO>();
// list.add(myAccess);
list.add(demoAccess);
acl.setEntries(list);
rule.setACL(acl);
// Create the rule
RuleVO savedRule =context.createAdvancedRule(rule);
// Default ACL will be created for current user. Get the default created ACLs
AccessControlListVO currentUserACL = savedRule.getACL();
AccessControlVO accessControlVO = currentUserACL.getEntries().get(0);
System.out.println("Current User Principal from default ACL
"+accessControlVO.getPrincipal());
System.out.println("Current User Permission from default ACL
"+accessControlVO.getPermission());
System.out.println("Rule is Valid ? "+savedRule.isValid());
System.out.println("Deploy State of the Rule is
"+savedRule.getDeployState());
System.out.println("Created rule with ID " + savedRule.getId());

// list up to the first 10 rules, sorted by ascending name.


int page = 1;
int pageSize = 10;

QueryFilter filter = new QueryFilter();


FilterClause clause = new
FilterClause("name",FilterClause.OPCODE.STARTS_WITH,"Hello");

Creating a RulePoint Application 31


ArrayList<FilterClause> clauses = new ArrayList<FilterClause>();
clauses.add(clause);
filter.setClauses(clauses);
// list all users
PaginatedQuery query = new PaginatedQuery(page,pageSize);
List<OrderBy> orderBy = new ArrayList<OrderBy>();
OrderBy oneO = new OrderBy("name", OrderBy.DIRECTION.ASCENDING);
orderBy.add(oneO);

System.out.println("Loading rules");
RuleVO[] allRules =
api.getProjectContextByName(projectName).getRuleList(query, filter, orderBy);
System.out.println("Loaded " + allRules.length + " rule(s)");
for (RuleVO r : allRules) {
System.out.println("id=" + r.getId() + " name=" + r.getName()
+ " description=" + r.getDescription() + " drql="
+ r.getDrql());
}
} catch (RulePointException ex) {
ex.printStackTrace(System.err);
}
finally{
try {
//destroy project context
context.destroy();
// logout RulePoint
api.logout();
} catch (RulePointException e) {
e.printStackTrace(System.err);
}
}
}
}

Search API
You can use the search API to search for objects with a filter clause. The filter clause accepts the name of
the property, operator, and one or more values of the property you want to search for. You can also specify
the state and validity for each property. Add the additional flags for a property as enumerations in brackets in
the same query.

To search for the deployment state in a query, you must can have an IN query and specify the list of all the
values you want to search. The three values for the deployment states include DRAFT, NEEDS_DEPLOYMENT,
and DEPLOYED.

For example, the following query creates a FilterClause that queries for objects with deployState either
DEPLOYED or NEEDS_DEPLOYMENT:
FilterClause clause = new FilterClause("deployState", OPCODE.IN, "NEEDS_DEPLOYMENT",
"DEPLOYED");
deployState is the name of the property, OPCODE.IN is the operator, and "NEEDS_DEPLOYMENT", and
"DEPLOYED" are values of the property that you want to search.

You can also query date fields, such as lastModifiedDate or createDate. You must specify the date in the
following format:
yyyy-MM-dd'T'HH:mm:ss.SSSZZ
The following list provides the common properties that you can query for all objects, with the enumerations in
brackets. Specify the property in exact same case:

• id

32 Chapter 4: Java Adapter for REST API


• name
• deployState(DRAFT, NEEDS_DEPLOYMENT, DEPLOYED)
• createdBy
• createDate
• artifactType(topics, sources, connections, rules, templates, responders, analytics, watchlists, responses)
• predefined (true/false)
• valid (true/false)
• lastModifiedBy
• lastModifiedDate

Object Specific Fields in a Filter Clause


The following table provides parameters that you can query fora specific object types:

Object Query Parameters

Rule drqlStatement multithreaded (true/false) - IN, EQUALS, NOT ruleType (ADVANCED, TEMPLATE, WIZARD)

Analytic analyticType analyticTypeDisplayName

Connection connectionType connectionTypeDisplayName

Source sourceType sourceTypeDisplayName

Responder responderType responderTypeDisplayName

Response responseType responseTypeDisplayName multithreaded (true/false)

Template multithreaded (true/false)

Topic expiresIn

Filter Clause Example


The following code is an example of a filter clause to query a responder responses:
RulePointAPI api = new RulePointAPI();

// Login to RulePoint and set the locale of server messages to US


English.
api.login("Administrator", "Administrator1", "en_US");

//Get the project context for the project in which the artifacts
has to be created
ProjectVO projectByName = api.getProjectByName("Default Project");

ProjectContext projectContext =
api.getProjectContext(projectByName);

// build a query to retrieve all responses that are in any draft


state
QueryFilter filter = new QueryFilter();
FilterClause clause = new FilterClause(("deployState",
FilterClause.OPCODE.EQUALS, "DRAFT");
ArrayList<FilterClause> clauses = new ArrayList<FilterClause>();

Search API 33
clauses.add(clause);
filter.setClauses(clauses);

// execute the query


ResponseInstanceVO[] responses =
projectContext.getResponseInstanceList(null,filter,null);
// display the responses
System.out.println("Found "+responses.length+" draft responses");

34 Chapter 4: Java Adapter for REST API


Chapter 5

RulePoint REST API


This chapter includes the following topics:

• RulePoint REST API Overview, 35


• Header and Body Configuration, 36
• Date and Time Values, 40
• Object IDs, 41
• REST API Responses, 45
• Error Object, 45
• REST API Guidelines, 46

RulePoint REST API Overview


The RulePoint REST API is a Representational State Transfer (REST) API.

The RulePoint REST API allows you to use API calls to perform the following tasks in RulePoint:

• Create, update, retrieve, and delete projects.


• Create, update, retrieve, and delete objects.
• Perform deployment tasks for objects.
• Create, update, retrieve, and delete users.

You can access the REST APIs through the following base URL:

http://<localhost>:<port>/rulepoint/api

When you use the REST API to configure a request, use the appropriate resource, method, the applicable date
and time values, object ID, along with the applicable headers. Use the applicable format for the request
header and body component. RulePoint supports XML and JSON formats for passing the attributes.
RulePoint performs the requested task and returns the http response, or returns an error object and related
messages.

For more information on the request and response format for specific RulePoint resources, see the sample
XML and JSON requests and responses.

35
Header and Body Configuration
A request has a request header and body component You can use the XML or JSON format to define a
request.

Request Header
When you construct a REST API request header, use the following format:
<METHOD> <Server URL>/rulepoint/api/<URI>
Content-Type: application/<json|xml>
Accept: application/<json|xml>
Cookie: $Version=1; JSESSIONID=<Valid_session_ID>
The following table includes the request components:

Request Required/ Description


Component Optional

METHOD Required Method you want to use, such as GET, POST, PUT, or DELETE.

Server URL Required Base URL for all resources, which include the hostname and port.

URI Required for The resource URI. The format of a resource URI is:
most - <projects/project ID>. Use this URI to refer to a project with this project ID.
resources - projects/project ID/<object_type>. Use this URI to refer to objects of the
specified object type within a project.
- projects/project ID/<object_type>/<object ID>. Use this URI to refer to an
object with a specific ID in the object category.

The following table includes the request headers:

Header Required/ Description


Optional

Content- Required for Format of the request. Use one of the following options:
Type POST requests - application/json. Reads request as JSON.
- application/xml. Reads request as XML.
Default is json.

Accept Optional Request format that you want. Use one of the following options:
- application/json. Sends response as JSON.
- application/xml. Sends response as XML.
Default is json.

Cookie Required Sets the valid session ID as a cookie while a client makes a REST call to any of the
resources of RulePoint. Make the /dtlogin REST call to obtain the session ID. The
RulePoint session ID is set as the JSESSIONID cookie.

Request Body
Use the request body to pass additional attributes for the resource. When you pass attributes in a request
body, you pass the attributes as part of an object. You can use the JSON or XML formats to pass the
attributes.

36 Chapter 5: RulePoint REST API


JSON Format
When you use the JSON format, define a request object with the type attribute, as follows:
{
"name": "<object name>",
"type": "<object type>",
"description": "<object description>",
"config": {
"<attribute1>": "<value1>", "<attribute2>": "<value2>"
}
}

XML Format
When you use the XML format, define a request object as an enclosing set of tags, as follows:
<artifactType>
<name>[NAME OF THE OBJECT]</name>
<description>[DESCRIPTION OF THE OBJECT]</description>
<config>
<entry>
<key>[CONFIG ATTRIBUTE NAME]</key>
<value>[CONFIG ATTRIBUTE VALUE]</value>
</entry>
.
.
<entry>
<key>[CONFIG ATTRIBUTE NAME]</key>
<value>[CONFIG ATTRIBUTE VALUE]</value>
</entry>
</config>
</artifactType>

Return Lists
When the REST API returns a series of objects in JSON, it encloses the list in square brackets.
{
"total": <total number of items>,
"count": <items fetched in this call>,
"items": [
{
"id": "<ID of the object>",
"name": "<name of the object>",
"self": {
"rel": "self",
"href": "URI of the object"
},
"actions": [
{
"rel": "<action>",
"href": "<URI for the action>",
"type": "http method"
}

],

"description": "object DESCRIPTION"


}
]
}
Note: There can be a total of 100 rules but only the first 30 are displayed until the user scrolls down the grid.
Count shows how many are in the grid currently.

Header and Body Configuration 37


When the REST API returns a series of objects in XML format, it encloses the list in the "artifacts" tag.
<artifacts>
<links />
<count>ITEMS FETCHED IN THIS CALL</count>
<total>TOTAL NUMBER OF ITEMS</total>
<artifactType>
<id>ID OF THE ITEM</id>
<name>NAME OF THE OBJECT</name>
<self>
<href>URI of the Object</href>
<id>ID OF THE OBJECT</id>
<rel>self</rel>
<title>NAME OF THE OBJECT</title>
</self>
<config>
<entry>
<key>eventFilePath</key>
<value>test.xml</value>
</entry>
.
.
<entry>
<key>iterations</key>
<value>1</value>
</entry>
</config>
</artifactType>
.
.
<artifactType>
<id>ID OF THE ITEM</id>
<name>NAME OF THE OBJECT</name>
<self>
<href>URI of the Object</href>
<id>ID OF THE OBJECT</id>
<rel>self</rel>
<title>NAME OF THE OBJECT</title>
</self>
<config>
<entry>
<key>eventFilePath</key>
<value>test.xml</value>
</entry>
.
.
<entry>
<key>iterations</key>
<value>1</value>
</entry>
</config>
</artifactType>
</artifacts>
Note: artifactType might be topic, source, responder, or rule depending on what you want to fetch.

Example
To retrieve the current active session of the user using the JSON format, you might use the following request
header and response on wire:
GET http://localhost:8080/rulepoint/api/sessionInfo
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
The server returns the following information:
{
"sessionId": "5F0B092410A9CFFC8049F9EA816E40BD",

38 Chapter 5: RulePoint REST API


"loggedInUserName": "Administrator",
"loggedInUserDisplayName": "Administrator",
"loggedInUserPrivileges": [
"PRIV_CREATE_CONNECTION",
"PRIV_CREATE_SOURCE",
"PRIV_VIEW_RESPONSE",
"PRIV_VIEW_TEMPLATE",
"PRIV_CREATE_TEMPLATE",
"PRIV_SUPER_USER",
"PRIV_VIEW_WATCHLIST",
"PRIV_CREATE_PROJECT",
"PRIV_VIEW_ANALYTIC",
"PRIV_CREATE_RESPONDER",
"PRIV_CREATE_RESPONSE",
"PRIV_CREATE_WATCHLIST",
"PRIV_VIEW_TOPIC",
"PRIV_VIEW_SOURCE",
"PRIV_CREATE_RULE",
"PRIV_VIEW_CONNECTION",
"PRIV_VIEW_RESPONDER",
"PRIV_CREATE_ANALYTIC",
"PRIV_CREATE_TOPIC",
"PRIV_VIEW_RULE"
],
"loggedInUser": {
"rel": "loggedInUser",
"href": "/api/users/Administrator",
"type": "GET",
"title": "Administrator"
},
"self": {
"rel": "self",
"href": "/api/sessionInfo",
"type": "GET"
},
"sessionTimeout": 1800,
"loggedInUserPreference": {
"userName": "Administrator",
"userPrefData": "{}",
"actions": [
{
"rel": "update",
"href": "/api/users/Administrator/userPreference",
"type": "PUT"
}
]
}
}
To retrieve the current active session of the user using the XML format, you might use the following request
header and response on wire:
GET http://localhost:8080/rulepoint/api/sessionInfo
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
The server returns the following information:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<session-info>
<loggedInUser>
<href>/api/users/Administrator</href>
<rel>loggedInUser</rel>
<title>Administrator</title>
<type>GET</type>
</loggedInUser>
<loggedInUserDisplayName>Administrator</loggedInUserDisplayName>
<loggedInUserName>Administrator</loggedInUserName>
<loggedInUserPreference>
<actions>

Header and Body Configuration 39


<href>/api/users/Administrator/
userPreference</href>
<rel>update</rel>
<type>PUT</type>
</actions>
<userName>Administrator</userName>
<userPrefData>{}</userPrefData>
</loggedInUserPreference>
<loggedInUserPrivileges>PRIV_VIEW_RESPONSE</loggedInUserPrivileges>
<loggedInUserPrivileges>PRIV_VIEW_TEMPLATE</loggedInUserPrivileges>
<loggedInUserPrivileges>PRIV_VIEW_ANALYTIC</loggedInUserPrivileges>
<loggedInUserPrivileges>PRIV_SUPER_USER</loggedInUserPrivileges>
<loggedInUserPrivileges>PRIV_CREATE_TOPIC</loggedInUserPrivileges>
<loggedInUserPrivileges>PRIV_VIEW_RESPONDER</loggedInUserPrivileges>
<loggedInUserPrivileges>PRIV_CREATE_ANALYTIC</loggedInUserPrivileges>
<loggedInUserPrivileges>PRIV_CREATE_CONNECTION</loggedInUserPrivileges>
<loggedInUserPrivileges>PRIV_VIEW_SOURCE</loggedInUserPrivileges>
<loggedInUserPrivileges>PRIV_CREATE_WATCHLIST</loggedInUserPrivileges>
<loggedInUserPrivileges>PRIV_CREATE_SOURCE</loggedInUserPrivileges>
<loggedInUserPrivileges>PRIV_VIEW_WATCHLIST</loggedInUserPrivileges>
<loggedInUserPrivileges>PRIV_VIEW_TOPIC</loggedInUserPrivileges>
<loggedInUserPrivileges>PRIV_VIEW_RULE</loggedInUserPrivileges>
<loggedInUserPrivileges>PRIV_CREATE_RESPONDER</loggedInUserPrivileges>
<loggedInUserPrivileges>PRIV_CREATE_PROJECT</loggedInUserPrivileges>
<loggedInUserPrivileges>PRIV_CREATE_TEMPLATE</loggedInUserPrivileges>
<loggedInUserPrivileges>PRIV_CREATE_RESPONSE</loggedInUserPrivileges>
<loggedInUserPrivileges>PRIV_VIEW_CONNECTION</loggedInUserPrivileges>
<loggedInUserPrivileges>PRIV_CREATE_RULE</loggedInUserPrivileges>
<self>
<href>/api/sessionInfo</href>
<rel>self</rel>
<type>GET</type>
</self>
<sessionId>6501FDF0D241CF626FB206BC7D3C487D</sessionId>
<sessionTimeout>1800</sessionTimeout>
</session-info>

Date and Time Values


With the REST API, RulePoint uses the UTC date format to pass all date and time values.

Use the following UTC date format for all date and time values that you pass in requests. The same format is
used for all date and time values returned from RulePoint.
<yyyy>-<MM>-<dd>T<HH>:<mm>:<ss>.<SSS>Z

Date Part Description

yyyy Year expressed in four digits.

MM Month expressed in two digits.

dd Date of the month expressed in two digits.

T Indicates the time portion of the format.

HH Hour in the 24-hour format. For example, 0 for 12:00:00 a.m. and 23 for 11:00:00 p.m.

mm Minutes expressed in two digits.

40 Chapter 5: RulePoint REST API


Date Part Description

ss Seconds expressed in two digits.

SSS Microseconds expressed in three digits.

Z UTC time indicator.

For example, the following date string represents 3:OO PM UTC on August 07, 2013:

2013-08-07T15:00:000Z

Object IDs
All requests require an object ID. To find the object ID that you need, you can use the related GET request.

For example, to get a specific topic ID, do a GET on /topics, which lists all the topics in the project. Iterate
over the list of topics that is returned by the previous rest call to get the ID of the topic by the given name.
GET http://localhost:8080/rulepoint/api/projects/1/topics

Request Headers: Accept: application/json


Cookie: JSESSIONID=FCE43E371AD49777802233A87654A076
Response Headers:
Content-Type: application/json
Date: Wed, 07 Aug 2013 05:37:18 GMT
{
"total": 3,
"count": 3,
"items": [
{
"id": "13dcf0cf-4d29-434a-98ae-99dff34367ab",
"name": "sqltopic",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/topics/13dcf0cf-4d29-434a-98ae-99dff34367ab",
"title": "sqltopic",
"id": "13dcf0cf-4d29-434a-98ae-99dff34367ab"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/topics/13dcf0cf-4d29-434a-98ae-99dff34367ab",
"type": "PUT",
"title": "Edit"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/topics/13dcf0cf-4d29-434a-98ae-99dff34367ab/acl",
"title": "acl"
},
"links": {},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "topics",

Object IDs 41
"lastModifiedDate": "2013-08-06T16:05:01+05:30",
"createDate": "2013-07-30T10:08:21+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DEPLOYED",
"force": false,
"expiresIn": 600000,
"responderAccess": "ALL_PROPERTIES",
"properties": [],
"rules": [
{
"href": "api/projects/1/rules/9e212e7e-96e9-43f6-9725-57b3e3da4e23",
"title": "filrule",
"objectType": "rules",
"id": "9e212e7e-96e9-43f6-9725-57b3e3da4e23"
}
],
"sources": [
{
"href": "api/projects/1/sources/daf6350b-99cb-49e7-b69a-
a1ea801e32a0",
"title": "invalidsrc",
"objectType": "sources",
"id": "daf6350b-99cb-49e7-b69a-a1ea801e32a0"
},
{
"href": "api/projects/1/sources/01eec793-87aa-44fe-a12d-
ee3b98e0e71d",
"title": "sqlsrc1",
"objectType": "sources",
"id": "01eec793-87aa-44fe-a12d-ee3b98e0e71d"
},
{
"href": "api/projects/1/sources/ba80a9f1-
f0a2-4600-986a-40ecc7a1c832",
"title": "invalidsrc2",
"objectType": "sources",
"id": "ba80a9f1-f0a2-4600-986a-40ecc7a1c832"
}
],
"responders": [],
"templates": []
},
{
"id": "8ad3c733-5e7e-4908-b449-951edfbb9e2b",
"name": "rsstopic",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/topics/8ad3c733-5e7e-4908-b449-951edfbb9e2b",
"title": "rsstopic",
"id": "8ad3c733-5e7e-4908-b449-951edfbb9e2b"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/topics/8ad3c733-5e7e-4908-b449-951edfbb9e2b",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/topics/8ad3c733-5e7e-4908-b449-951edfbb9e2b",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/topics/8ad3c733-5e7e-4908-b449-951edfbb9e2b/acl",

42 Chapter 5: RulePoint REST API


"title": "acl"
},
"links": {},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "topics",
"lastModifiedDate": "2013-08-05T10:15:23+05:30",
"createDate": "2013-08-05T10:08:44+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"expiresIn": 600000,
"responderAccess": "ALL_PROPERTIES",
"properties": [],
"rules": [],
"sources": [
{
"href": "api/projects/1/sources/d5114508-ddd1-4d9a-
ba2e-2a338325b9ed",
"title": "rss_src",
"objectType": "sources",
"id": "d5114508-ddd1-4d9a-ba2e-2a338325b9ed"
}
],
"responders": [],
"templates": []
},
{
"id": "5d704d59-e1d4-452c-9663-6eb1890ff159",
"name": "system_markers",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/topics/5d704d59-e1d4-452c-9663-6eb1890ff159",
"title": "system_markers",
"id": "5d704d59-e1d4-452c-9663-6eb1890ff159"
},
"actions": [],
"acl": {
"rel": "acl",
"href": "api/projects/1/topics/5d704d59-e1d4-452c-9663-6eb1890ff159/acl",
"title": "acl"
},
"links": {},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "topics",
"lastModifiedDate": "2013-07-30T06:38:20+05:30",
"createDate": "2013-07-30T06:38:20+05:30",
"createdBy": "Administrator",
"predefined": true,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"expiresIn": 36000,
"responderAccess": "NAMED_PROPERTIES",
"properties": [
{
"name": "begin_time",
"description": "Time (since epoch in milliseconds) when marker begin
is produced by engine",

Object IDs 43
"status": "ACTIVE",
"order": 0
},
{
"name": "end_time",
"description": "Time (since epoch in milliseconds) when marker end
is produced by engine",
"status": "ACTIVE",
"order": 1
},
{
"name": "engine_name",
"description": "Name of the engine that produce the marker begin end
events",
"status": "ACTIVE",
"order": 2
},
{
"name": "event_count",
"description": "Value of event count is string form of integer",
"status": "ACTIVE",
"order": 3
},
{
"name": "hit_ratio",
"description": "Ratio of number of events in marker boundary that
participated in activations and EVENTS_COUNT",
"status": "ACTIVE",
"order": 4
},
{
"name": "marker_name",
"description": "marker_name",
"status": "ACTIVE",
"order": 5
},
{
"name": "marker_type",
"description": "value is either begin or end",
"status": "ACTIVE",
"order": 6
},
{
"name": "rule_activation_count",
"description": "Total number of activations in which event within
marker boundary participated",
"status": "ACTIVE",
"order": 7
},
{
"name": "rules_processed",
"description": "Comma separated list of all rules that processed
events received in the marker boundary",
"status": "ACTIVE",
"order": 8
},
{
"name": "source_list",
"description": "Comma separated list of sources that produced marker
events",
"status": "ACTIVE",
"order": 9
},
{
"name": "total_processing_time",
"description": "Total processing time (in milliseconds) of all
events in the marker boundary",
"status": "ACTIVE",
"order": 10
}
],

44 Chapter 5: RulePoint REST API


"rules": [],
"sources": [],
"responders": [],
"templates": []
}
]
}

REST API Responses


The following table describes the responses to REST API requests:

REST API Successful Response Failure Response


Request

GET Returns the requested object, along with the response HTTP 400, 403, 404, or 409 error.
code 200.

POST Returns the requested object that you created, with a HTTP 400, 403, 404, 409, or 500 error.
response code 201.

PUT Updates the object and returns the updated object, HTTP 400, 403, 404, 409, or 500 error.
with http response code 200.

DELETE No response, with an http response code 204. HTTP 400, 403, 403, 404, 409, or 500
error.

Error Object
When the REST API encounters an error, it returns HTTP 400, 403, 404, 409, or 500 error.

For example, an error object might have the following structure:


<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="errors">
<xs:complexType>
<xs:sequence>
<xs:element name="error">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="code"/>
<xs:element type="xs:string" name="description"/>
<xs:element type="xs:string" name="errorMessage"/>
<xs:element type="xs:string" name="errorType"/>
<xs:element type="xs:string" name="messageId"/>
<xs:element name="params">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="param"
maxOccurs="unbounded" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element type="xs:string" name="stackTrace"/>

REST API Responses 45


</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

Error Messages
For more information on the error codes and their descriptions, see "Error Codes" in the RulePoint
Administrator Guide.

REST API Guidelines


Use the following guidelines when working with RulePoint REST APIs:

• Use the JSON format to construct a request.


• Specify the format of the request and response in the header. Use the Content-Type attribute to specify
the request format and the Accept attribute to specify the response format.
• Use a placeholder for the JSESSIONID in request headers for all resources. Replace the placeholder with
the JSESSIONID data returned when you log in to a session.
• For all resources, use a placeholder for the base URL. Replace the placeholder with the Server URL data
returned by the login resource.
• All resources and attributes are case sensitive.
• Use the type attribute to define an object in JSON.

46 Chapter 5: RulePoint REST API


Chapter 6

Sample XML and JSON Requests


and Responses
This chapter includes the following topics:

• Projects, 48
• Topics, 54
• Connections, 64
• Sources, 106
• Schedule, 190
• Responders, 199
• Responses, 264
• Marshaller, 325
• Template, 334
• Rules, 345
• Analytics, 360
• Users, 365
• Objects Deployment , 373
• Create Event, 377
• Log In, 378

47
Projects
You can use API calls to perform various operations with projects.

Create Projects
Use the POST method to create a project in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates a project:
POST http://localhost:8080/rulepoint/api/projects
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "TestProject1",
"description": "Test Project"
}

POST Response in JSON Format


Returns the project object and response code 201 created. Returns the error object if an error occurs.
{
"id": "2",
"name": "TestProject1",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/2"
},
"actions": [
{
"rel": "update",
"href": "/api/projects/2",
"type": "PUT"
},
{
"rel": "delete",
"href": "/api/projects/2",
"type": "DELETE"
},
{
"rel": "deploy",
"href": "/api/projects/2/deploy",
"type": "POST"
},
{
"rel": "undeploy",
"href": "/api/projects/2/undeploy",
"type": "POST"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/2/acl",
"title": "acl"
},
"description": "Test Project"
}
Response Code : 201 Created

48 Chapter 6: Sample XML and JSON Requests and Responses


POST Request in XML Format
Generate a POST request. For example, the following POST request creates a project:
POST http://localhost:8080/rulepoint/api/projects
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<project>
<name>TestProject1</name>
<description>Test Project</description>
</project>

POST Response in XML Format


Returns the project object and response code 200 OK. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<project>
<acl>
<href>api/projects/144/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>/api/projects/144</href>
<rel>update</rel>
<type>PUT</type>
</action>
<action>
<href>/api/projects/144</href>
<rel>delete</rel>
<type>DELETE</type>
</action>
<action>
<href>/api/projects/144/deploy</href>
<rel>deploy</rel>
<type>POST</type>
</action>
<action>
<href>/api/projects/144/undeploy</href>
<rel>undeploy</rel>
<type>POST</type>
</action>
</actions>
<id>144</id>
<name>TestProject1</name>
<self>
<href>api/projects/144</href>
<rel>self</rel>
</self>
<description>Test Project</description>
</project>
Response Code : 201 Created

Projects 49
Retrieve Projects
Use the GET method to retrieve a project in RulePoint.

GET Request in JSON Format


Generate a GET request. For example, the following GET request retrieves a project in a RulePoint application:
GET http://localhost:8080/rulepoint/api/projects
Accept: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

GET Body in JSON Format


{
"name": "TestProject",
"description": "Test Project"
}

GET Response in JSON Format


Returns the project object and response code 200 OK. Returns the error object if an errors occur.
{
"total": 4,
"count": 4,
"items": [
{
"id": "3",
"name": "AT_PROJECT11375183310634",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/3"
},
"actions": [
{
"rel": "update",
"href": "/api/projects/3",
"type": "PUT"
},
{
"rel": "delete",
"href": "/api/projects/3",
"type": "DELETE"
},
{
"rel": "deploy",
"href": "/api/projects/3/deploy",
"type": "POST"
},
{
"rel": "undeploy",
"href": "/api/projects/3/undeploy",
"type": "POST"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/3/acl",
"title": "acl"
},
"description": "AT_PROJECT11375183310634"
},
{
"id": "1",
"name": "Default Project",
"valid": false,
"self": {
"rel": "self",

50 Chapter 6: Sample XML and JSON Requests and Responses


"href": "api/projects/1"
},
"actions": [
{
"rel": "deploy",
"href": "/api/projects/1/deploy",
"type": "POST"
},
{
"rel": "undeploy",
"href": "/api/projects/1/undeploy",
"type": "POST"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/acl",
"title": "acl"
},
"description": "Default Rulepoint Project"
},
{
"id": "5",
"name": "HA Scenario",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/5"
},
"actions": [
{
"rel": "update",
"href": "/api/projects/5",
"type": "PUT"
},
{
"rel": "delete",
"href": "/api/projects/5",
"type": "DELETE"
},
{
"rel": "deploy",
"href": "/api/projects/5/deploy",
"type": "POST"
},
{
"rel": "undeploy",
"href": "/api/projects/5/undeploy",
"type": "POST"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/5/acl",
"title": "acl"
},
"description": "HA Scenario"
},
{
"id": "2",
"name": "ImportProj1375183310634",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/2"
},
"actions": [
{
"rel": "update",
"href": "/api/projects/2",

Projects 51
"type": "PUT"
},
{
"rel": "delete",
"href": "/api/projects/2",
"type": "DELETE"
},
{
"rel": "deploy",
"href": "/api/projects/2/deploy",
"type": "POST"
},
{
"rel": "undeploy",
"href": "/api/projects/2/undeploy",
"type": "POST"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/2/acl",
"title": "acl"
},
"description": "ImportProj1375183310634"
}
]
}
Response Code : 200 OK

Update Projects
Use the PUT method to update a project in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates a project in a RulePoint application:
PUThttp: //localhost: 8080/rulepoint/api/projects/2
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALIDSESSIONID>

PUT Body in JSON Format


{
"name": "TestProject",
"description": "Test Project"
}

PUT Response in JSON Format


Returns the project object and response code 200 OK. Returns the error object if an error occurs.
{
"id": "2",
"name": "TestProject",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/2"
},
"actions": [
{
"rel": "update",
"href": "/api/projects/2",
"type": "PUT"
},

52 Chapter 6: Sample XML and JSON Requests and Responses


{
"rel": "delete",
"href": "/api/projects/2",
"type": "DELETE"
},
{
"rel": "deploy",
"href": "/api/projects/2/deploy",
"type": "POST"
},
{
"rel": "undeploy",
"href": "/api/projects/2/undeploy",
"type": "POST"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/2/acl",
"title": "acl"
},
"description": "Test Project"
}
Response Code : 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates a project in a RulePoint application:
PUT http://localhost:8080/rulepoint/api/projects/98315
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<project>
<name>TestProject</name>
<description>Test Project</description>
</project>

PUT Response in XML Format


Returns the project object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<project>
<acl>
<href>api/projects/98315/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>/api/projects/98315</href>
<rel>update</rel>
<type>PUT</type>
</action>
<action>
<href>/api/projects/98315</href>
<rel>delete</rel>
<type>DELETE</type>
</action>
<action>
<href>/api/projects/98315/deploy</href>
<rel>deploy</rel>
<type>POST</type>
</action>
<action>

Projects 53
<href>/api/projects/98315/undeploy</href>
<rel>undeploy</rel>
<type>POST</type>
</action>
</actions>
<id>98315</id>
<links/>
<name>TestProject</name>
<self>
<href>api/projects/98315</href>
<rel>self</rel>
</self>
<valid>false</valid>
<description>Test Project</description>
</project>
Response Code : 200 OK

Delete Projects
Use the DELETE method to delete a project in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes a project:
DELETE http://localhost:8080/rulepoint/api/projects/2
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes a project:
DELETE http://localhost:8080/rulepoint/api/projects/98315
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

Topics
Use the examples to retrieve, create, update, or delete a topic.

Create Topics
Use the POST method to create a topic in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates a topic in a RulePoint application:
POST http://localhost:8080/rulepoint/api/projects/3/topics
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

54 Chapter 6: Sample XML and JSON Requests and Responses


POST Body in JSON Format
{
"name": "TestTopic1",
"description": "Test Topic",
"expiresIn": 30000,
"responderAccess": "ALL_PROPERTIES"
}

POST Response in JSON Format


Returns the topic object and response code. Returns the error object if an error occurs.
{
"id": "4ee98dba-9043-4c1a-b088-226bf705146f",
"name": "TestTopic1",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/3/topics/4ee98dba-9043-4c1a-b088-226bf705146f",
"title": "TestTopic1",
"id": "4ee98dba-9043-4c1a-b088-226bf705146f"
},
"actions": [
{
"rel": "update",
"href": "api/projects/3/topics/4ee98dba-9043-4c1a-b088-226bf705146f",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/3/topics/4ee98dba-9043-4c1a-b088-226bf705146f",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/3/topics/4ee98dba-9043-4c1a-b088-226bf705146f/acl",
"title": "acl"
},
"links": {},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/3",
"title": "TestProject1",
"id": "3"
},
"description": "Test Topic",
"type": "topics",
"lastModifiedDate": "2013-07-30T06:39:22+05:30",
"createDate": "2013-07-30T06:39:22+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"expiresIn": 30000,
"responderAccess": "ALL_PROPERTIES",
"properties": [],
"rules": [],
"responders": [],
"templates": []
}
Response Code : 201 Created

Topics 55
POST Request in XML Format
Generate a POST request. For example, the following POST request creates a topic in a RulePoint application:
POST http://localhost:8080/rulepoint/api/projects/98315/topics
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<topic>
<name>SqlTopic1</name>
<description>Sql Test Topic</description>
<expiresIn>30000</expiresIn>
<responderAccess>ALL_PROPERTIES</responderAccess>
</topic>

POST Response in XML Format


Returns the topic object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<topic>
<acl>
<href>api/projects/98315/topics/09024251-d77c-48d1-ba58-eadfda37cfda/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/98315/topics/09024251-d77c-48d1-ba58-eadfda37cfda</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/98315/topics/09024251-d77c-48d1-ba58-eadfda37cfda</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>09024251-d77c-48d1-ba58-eadfda37cfda</id>
<name>StockTopic</name>
<owningProject>
<href>api/projects/98315</href>
<id>98315</id>
<rel>owningProject</rel>
<title>TestProject1</title>
</owningProject>
<self>
<href>api/projects/98315/topics/09024251-d77c-48d1-ba58-eadfda37cfda</href>
<id>09024251-d77c-48d1-ba58-eadfda37cfda</id>
<rel>self</rel>
<title>StockTopic</title>
</self>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<description>Sql Test Topic</description>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>topics</type>
<valid>true</valid>
<expiresIn>30000</expiresIn>
<properties/>
<responderAccess>ALL_PROPERTIES</responderAccess>

56 Chapter 6: Sample XML and JSON Requests and Responses


<responders/>
<rules/>
<templates/>
</topic>
Response Code : 201 Created

Retrieve Topics
Use the GET method to retrieve a topic in RulePoint.

GET Request in JSON Format


Generate a GET request. For example, the following GET request retrieves a topic in a RulePoint application:
GET http://localhost:8080/rulepoint/api/projects/1/topics
Accept: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

GET Response in JSON Format


{
{
"total": 1,
"count": 1,
"items": [
{
"id": "619cca07-4fc1-460a-8b6b-aef2901e8782",
"name": "system_markers",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/topics/619cca07-4fc1-460a-8b6b-aef2901e8782",
"title": "system_markers",
"id": "619cca07-4fc1-460a-8b6b-aef2901e8782"
},
"actions": [

],
"acl": {
"rel": "acl",
"href": "api/projects/1/topics/619cca07-4fc1-460a-8b6b-
aef2901e8782/acl",
"title": "acl"
},
"links": {

},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "topics",
"lastModifiedDate": "2013-07-30T16:34:10+05:30",
"createDate": "2013-07-30T16:34:10+05:30",
"createdBy": "Administrator",
"predefined": true,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"expiresIn": 36000,
"responderAccess": "NAMED_PROPERTIES",
"properties": [
{
"name": "begin_time",
"description": "Time (since epoch in milliseconds) when marker

Topics 57
begin is produced by engine",
"status": "ACTIVE",
"order": 0
},
{
"name": "end_time",
"description": "Time (since epoch in milliseconds) when marker
end is produced by engine",
"status": "ACTIVE",
"order": 1
},
{
"name": "engine_name",
"description": "Name of the engine that produce the marker begin
end events",
"status": "ACTIVE",
"order": 2
},
{
"name": "event_count",
"description": "Value of event count is string form of integer",
"status": "ACTIVE",
"order": 3
},
{
"name": "hit_ratio",
"description": "Ratio of number of events in marker boundary
that participated in activations and EVENTS_COUNT",
"status": "ACTIVE",
"order": 4
},
{
"name": "marker_name",
"description": "marker_name",
"status": "ACTIVE",
"order": 5
},
{
"name": "marker_type",
"description": "value is either begin or end",
"status": "ACTIVE",
"order": 6
},
{
"name": "rule_activation_count",
"description": "Total number of activations in which event
within marker boundary participated",
"status": "ACTIVE",
"order": 7
},
{
"name": "rules_processed",
"description": "Comma separated list of all rules that processed
events received in the marker boundary",
"status": "ACTIVE",
"order": 8
},
{
"name": "source_list",
"description": "Comma separated list of sources that produced
marker events",
"status": "ACTIVE",
"order": 9
},
{
"name": "total_processing_time",
"description": "Total processing time (in milliseconds) of all
events in the marker boundary",
"status": "ACTIVE",
"order": 10

58 Chapter 6: Sample XML and JSON Requests and Responses


}
],
"rules": [

],
"sources": [

],
"responders": [

],
"templates": [

]
}
]
}
Response Code : 200 OK

GET Request in XML Format


Generate a GET request. For example, the following GET request retrieves a topic in a RulePoint application:
GET http://localhost:8080/rulepoint/api/projects/1/topics
Accept: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

GET Response in XML Format


Returns the topic object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<artifacts>
<links/>
<valid>false</valid>
<count>1</count>
<items>
<topic>
<acl>
<href>api/projects/1/topics/619cca07-4fc1-460a-8b6b-aef2901e8782/acl</
href>
<rel>acl</rel>
<title>acl</title>
</acl>
<id>619cca07-4fc1-460a-8b6b-aef2901e8782</id>
<links/>
<name>system_markers</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/topics/619cca07-4fc1-460a-8b6b-aef2901e8782</href>
<id>619cca07-4fc1-460a-8b6b-aef2901e8782</id>
<rel>self</rel>
<title>system_markers</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>true</predefined>
<type>topics</type>
<expiresIn>36000</expiresIn>
<properties>

Topics 59
<description>Time (since epoch in milliseconds) when marker begin is
produced by engine</description>
<name>begin_time</name>
<order>0</order>
<status>ACTIVE</status>
</properties>
<properties>
<description>Time (since epoch in milliseconds) when marker end is
produced by engine</description>
<name>end_time</name>
<order>1</order>
<status>ACTIVE</status>
</properties>
<properties>
<description>Name of the engine that produce the marker begin end
events</description>
<name>engine_name</name>
<order>2</order>
<status>ACTIVE</status>
</properties>
<properties>
<description>Value of event count is string form of integer</description>
<name>event_count</name>
<order>3</order>
<status>ACTIVE</status>
</properties>
<properties>
<description>Ratio of number of events in marker boundary that
participated in activations and EVENTS_COUNT</description>
<name>hit_ratio</name>
<order>4</order>
<status>ACTIVE</status>
</properties>
<properties>
<description>marker_name</description>
<name>marker_name</name>
<order>5</order>
<status>ACTIVE</status>
</properties>
<properties>
<description>value is either begin or end</description>
<name>marker_type</name>
<order>6</order>
<status>ACTIVE</status>
</properties>
<properties>
<description>Total number of activations in which event within marker
boundary participated</description>
<name>rule_activation_count</name>
<order>7</order>
<status>ACTIVE</status>
</properties>
<properties>
<description>Comma separated list of all rules tchat processed events
received in the marker boundary</description>
<name>rules_processed</name>
<order>8</order>
<status>ACTIVE</status>
</properties>
<properties>
<description>Comma separated list of sources that produced marker
events</description>
<name>source_list</name>
<order>9</order>
<status>ACTIVE</status>
</properties>
<properties>
<description>Total processing time (in milliseconds) of all events in
the marker boundary</description>
<name>total_processing_time</name>

60 Chapter 6: Sample XML and JSON Requests and Responses


<order>10</order>
<status>ACTIVE</status>
</properties>
<responderAccess>NAMED_PROPERTIES</responderAccess>
</topic>
</items>
<total>1</total>
<invalidCount>0</invalidCount>
</artifacts>
Response Code : 200 OK

Update Topics
Use the PUT method to update a topic in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates a topic in a RulePoint application:
PUT http://localhost:8080/rulepoint/api/projects/3/topics/4ee98dba-9043-4c1a-
b088-226bf705146f
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "StockTopic",
"description": "Test Topic",
"expiresIn": 30000,
"responderAccess": "ALL_PROPERTIES"
}

PUT Response in JSON Format


Returns the topic object and response code. Returns the error object if an error occurs.
{
"id": "4ee98dba-9043-4c1a-b088-226bf705146f",
"name": "StockTopic",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/3/topics/4ee98dba-9043-4c1a-b088-226bf705146f",
"title": "StockTopic",
"id": "4ee98dba-9043-4c1a-b088-226bf705146f"
},
"actions": [
{
"rel": "update",
"href": "api/projects/3/topics/4ee98dba-9043-4c1a-b088-226bf705146f",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/3/topics/4ee98dba-9043-4c1a-b088-226bf705146f",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/3/topics/4ee98dba-9043-4c1a-b088-226bf705146f/acl",
"title": "acl"
},

Topics 61
"links": {},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/3",
"title": "TestProject1",
"id": "3"
},
"description": "Test Topic",
"type": "topics",
"lastModifiedDate": "2013-07-30T06:39:22+05:30",
"createDate": "2013-07-30T06:39:22+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"expiresIn": 30000,
"responderAccess": "ALL_PROPERTIES",
"properties": [],
"rules": [],
"responders": [],
"templates": []
}
Response Code : 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates a topic in a RulePoint application:
PUT http://localhost:8080/rulepoint/api/projects/98315/topics/4a4d8f29-be34-49eb-af22-
a8cd7fdda085
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<topic>
<name>StockTopic</name>
<description>Sql Test Topic</description>
<expiresIn>30000</expiresIn>
<responderAccess>ALL_PROPERTIES</responderAccess>
</topic>

PUT Response in XML Format


Returns the topic object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<topic>
<acl>
<href>api/projects/98315/topics/4a4d8f29-be34-49eb-af22-a8cd7fdda085/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/98315/topics/4a4d8f29-be34-49eb-af22-a8cd7fdda085</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/98315/topics/4a4d8f29-be34-49eb-af22-a8cd7fdda085</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>

62 Chapter 6: Sample XML and JSON Requests and Responses


<id>4a4d8f29-be34-49eb-af22-a8cd7fdda085</id>
<links/>
<name>StockTopic</name>
<owningProject>
<href>api/projects/98315</href>
<id>98315</id>
<rel>owningProject</rel>
<title>RT_TestProject1</title>
</owningProject>
<self>
<href>api/projects/98315/topics/4a4d8f29-be34-49eb-af22-a8cd7fdda085</href>
<id>4a4d8f29-be34-49eb-af22-a8cd7fdda085</id>
<rel>self</rel>
<title>StockTopic</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<description>Sql Test Topic</description>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>topics</type>
<expiresIn>0</expiresIn>
<responderAccess>ALL_PROPERTIES</responderAccess>
</topic>
Response Code : 200 OK

Delete Topics
Use the DELETE method to delete a topic in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes a topic in a RulePoint
application:
DELETE http://localhost:8080/rulepoint/api/projects/3/topics/4ee98dba-9043-4c1a-
b088-226bf705146f
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes a topic in a RulePoint
application:
DELETE http://localhost:8080/rulepoint/api/projects/98315/topics/4a4d8f29-be34-49eb-
af22-a8cd7fdda085
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

Topics 63
Connections
You can use API calls to perform various operations with SQL, email, JMS, and web service connections.

SQL Connection
Use the examples to retrieve, create, update, or delete an SQL connection.

Create SQL Connection


Use the POST method to create an SQL connection in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates an SQL connection in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/4/connections
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "SqlConnection1",
"type": "connections",
"description": "A SQL Connection",
"connectionType": "jdbcConnection",
"config": {
"driverClass": "oracle.jdbc.OracleDriver",
"jdbcString": "jdbc:oracle:thin:@invr28cep46:1521:ORCL",
"username": "cep_ci_user",
"password": "cep_ci_secret",
"initialPoolSize": "5",
"acquireIncrement": "1",
"maxPoolSize": "10",
"minPoolSize": "2",
"loginTimeOut": "5000",
"retryCount": "3",
"retryDelay": "1000",
"maxIdleTime": "36000",
"acquireRetryAttempts": "0",
"acquireRetryDelay": "5000",
"checkoutTimeout": "2000"
}
}

POST Response in JSON Format


Returns the SQL connection object and response code 201 OK. Returns the error object if an error occurs.
{
"id": "1d559d37-2c6e-48c0-8623-c571339c1e99",
"name": "SqlConnection1",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/4/connections/1d559d37-2c6e-48c0-8623-c571339c1e99",
"title": "SqlConnection1",
"id": "1d559d37-2c6e-48c0-8623-c571339c1e99"
},
"actions": [
{

64 Chapter 6: Sample XML and JSON Requests and Responses


"rel": "update",
"href": "api/projects/4/connections/1d559d37-2c6e-48c0-8623-c571339c1e99",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/4/connections/1d559d37-2c6e-48c0-8623-c571339c1e99",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/4/connections/1d559d37-2c6e-48c0-8623-c571339c1e99/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/4",
"title": "RT_TestProject1",
"id": "4"
},
"description": "A SQL Connection",
"type": "connections",
"lastModifiedDate": "2013-07-30T06:39:49+05:30",
"createDate": "2013-07-30T06:39:49+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"connectionType": "jdbcConnection",
"connectionTypeDisplayName": "SQL Connection",
"config": {
"acquireRetryAttempts": "0",
"acquireRetryDelay": "5000",
"jdbcString": "jdbc:oracle:thin:@invr28cep46:1521:ORCL",
"maxIdleTime": "36000",
"acquireIncrement": "1",
"checkoutTimeout": "2000",
"password": "cep_ci_secret",
"username": "cep_ci_user",
"maxPoolSize": "10",
"retryCount": "3",
"retryDelay": "1000",
"minPoolSize": "2",
"driverClass": "oracle.jdbc.OracleDriver",
"initialPoolSize": "5",
"loginTimeOut": "5000"
}
}
Response Code: 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates an SQL connection in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/98315/connections
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<connection>
<name>SqlConnection1</name>
<type>connections</type>

Connections 65
<description>A SQL Connection</description>
<connectionType>jdbcConnection</connectionType>
<config>
<entry>
<key>driverClass</key>
<value>oracle.jdbc.OracleDriver</value>
</entry>
<entry>
<key>jdbcString</key>
<value>jdbc:oracle:thin:@invr28cep46:1521:ORCL</value>
</entry>
<entry>
<key>username</key>
<value>cep_ci_user</value>
</entry>
<entry>
<key>password</key>
<value>cep_ci_secret</value>
</entry>
<entry>
<key>acquireIncrement</key>
<value>1</value>
</entry>
<entry>
<key>acquireRetryAttempts</key>
<value>0</value>
</entry>
<entry>
<key>acquireRetryDelay</key>
<value>5000</value>
</entry>
<entry>
<key>checkoutTimeout</key>
<value>2000</value>
</entry>
<entry>
<key>initialPoolSize</key>
<value>5</value>
</entry>
<entry>
<key>loginTimeout</key>
<value>5000</value>
</entry>
<entry>
<key>maxIdleTime</key>
<value>36000</value>
</entry>
<entry>
<key>maxPoolSize</key>
<value>10</value>
</entry>
<entry>
<key>minPoolSize</key>
<value>2</value>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>retryDelay</key>
<value>1000</value>
</entry>
</config>
</connection>

66 Chapter 6: Sample XML and JSON Requests and Responses


POST Response in XML Format
Returns the SQL connection object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<connection>
<acl>
<href>api/projects/98315/connections/1e5d5c0e-11ec-4c90-a5d9-25991b38befe/acl</
href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/98315/connections/1e5d5c0e-11ec-4c90-a5d9-25991b38befe</
href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/98315/connections/1e5d5c0e-11ec-4c90-a5d9-25991b38befe</
href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>1e5d5c0e-11ec-4c90-a5d9-25991b38befe</id>
<links/>
<name>SqlConnection1</name>
<owningProject>
<href>api/projects/98315</href>
<id>98315</id>
<rel>owningProject</rel>
<title>RT_TestProject1</title>
</owningProject>
<self>
<href>api/projects/98315/connections/1e5d5c0e-11ec-4c90-a5d9-25991b38befe</href>
<id>1e5d5c0e-11ec-4c90-a5d9-25991b38befe</id>
<rel>self</rel>
<title>SqlConnection1</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<description>A SQL Connection</description>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>connections</type>
<config>
<entry>
<key>acquireRetryAttempts</key>
<value>0</value>
</entry>
<entry>
<key>acquireRetryDelay</key>
<value>5000</value>
</entry>
<entry>
<key>jdbcString</key>
<value>jdbc:oracle:thin:@invr28cep46:1521:ORCL</value>
</entry>
<entry>
<key>maxIdleTime</key>
<value>36000</value>
</entry>

Connections 67
<entry>
<key>acquireIncrement</key>
<value>1</value>
</entry>
<entry>
<key>checkoutTimeout</key>
<value>2000</value>
</entry>
<entry>
<key>password</key>
<value>cep_ci_secret</value>
</entry>
<entry>
<key>username</key>
<value>cep_ci_user</value>
</entry>
<entry>
<key>maxPoolSize</key>
<value>10</value>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>retryDelay</key>
<value>1000</value>
</entry>
<entry>
<key>minPoolSize</key>
<value>2</value>
</entry>
<entry>
<key>driverClass</key>
<value>oracle.jdbc.OracleDriver</value>
</entry>
<entry>
<key>initialPoolSize</key>
<value>5</value>
</entry>
<entry>
<key>loginTimeOut</key>
<value>3</value>
</entry>
</config>
<connectionType>jdbcConnection</connectionType>
<connectionTypeDisplayName>SQL Connection</connectionTypeDisplayName>
</connection>
Response Code : 201 Created

Retrieve SQL Connection


Use the GET method to retrieve an SQL connection in RulePoint.

GET Request in JSON Format


Generate a GET request. For example, the following GET request retrieves an SQL connection in a RulePoint
application:
GET http://localhost:8080/rulepoint/api/projects/1/connections
Accept: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

GET Response in JSON Format


{
"total": 4,

68 Chapter 6: Sample XML and JSON Requests and Responses


"count": 4,
"items": [
{
"id": "2d5c8d79-b732-4fe8-ad69-3243d102ed49",
"name": "sqlconnection",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/connections/2d5c8d79-b732-4fe8-
ad69-3243d102ed49",
"title": "sqlconnection",
"id": "2d5c8d79-b732-4fe8-ad69-3243d102ed49"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/connections/2d5c8d79-b732-4fe8-
ad69-3243d102ed49",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/connections/2d5c8d79-b732-4fe8-
ad69-3243d102ed49",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/connections/2d5c8d79-b732-4fe8-
ad69-3243d102ed49/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "connections",
"lastModifiedDate": "2013-08-19T11:21:03+05:30",
"createDate": "2013-07-30T10:09:20+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"connectionType": "jdbcConnection",
"connectionTypeDisplayName": "SQL Connection",
"config": {
"acquireRetryAttempts": "0",
"acquireRetryDelay": "5000",
"jdbcString": "jdbc:oracle:thin:@invr28cep46:1521:orcl",
"maxIdleTime": "36000",
"acquireIncrement": "1",
"checkoutTimeout": "2000",
"password": "cep_ci_secret",
"username": "cep_ci_user",
"maxPoolSize": "5",
"retryCount": "3",
"retryDelay": "1000",
"minPoolSize": "1",
"driverClass": "oracle.MyDriver",
"initialPoolSize": "1",
"loginTimeOut": "3"
},
"sources": [
{

Connections 69
"href": "api/projects/1/sources/daf6350b-99cb-49e7-b69a-
a1ea801e32a0",
"title": "invalidsrc",
"objectType": "sources",
"id": "daf6350b-99cb-49e7-b69a-a1ea801e32a0"
},
{
"href": "api/projects/1/sources/01eec793-87aa-44fe-a12d-
ee3b98e0e71d",
"title": "sqlsrc1",
"objectType": "sources",
"id": "01eec793-87aa-44fe-a12d-ee3b98e0e71d"
}
],
"responders": [
{
"href": "api/projects/1/responders/8bd61211-404b-4cd4-8a84-
f36a7bcdf151",
"title": "sqlresponder",
"objectType": "responders",
"id": "8bd61211-404b-4cd4-8a84-f36a7bcdf151"
}
]
},
{
"id": "03e9c236-1a01-40e2-9d4a-f13c893abef7",
"name": "wsconn",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/connections/03e9c236-1a01-40e2-9d4a-
f13c893abef7",
"title": "wsconn",
"id": "03e9c236-1a01-40e2-9d4a-f13c893abef7"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/connections/03e9c236-1a01-40e2-9d4a-
f13c893abef7",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/connections/03e9c236-1a01-40e2-9d4a-
f13c893abef7",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/connections/03e9c236-1a01-40e2-9d4a-
f13c893abef7/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "connections",
"lastModifiedDate": "2013-08-19T11:21:03+05:30",
"createDate": "2013-08-19T09:22:55+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",

70 Chapter 6: Sample XML and JSON Requests and Responses


"force": false,
"connectionType": "wsConnection",
"connectionTypeDisplayName": "Web Service Connection",
"config": {
"userNameSpace": "",
"retryCount": "3",
"retryDelay": "1000",
"password": null,
"wsdlDuration": "0",
"url": "http://invr28cep46:8080/CepQeWebServices/HelloWorldService?wsdl",
"loginName": ""
},
"sources": [
{
"href": "api/projects/1/sources/09c059f8-f304-41dd-8e1b-
fa5a538a74c4",
"title": "wssrc",
"objectType": "sources",
"id": "09c059f8-f304-41dd-8e1b-fa5a538a74c4"
}
],
"analytics": [
{
"href": "api/projects/1/analytics/42d49371-55ee-45b4-
bfff-46f35de9e156",
"title": "wsanalytic",
"objectType": "analytics",
"id": "42d49371-55ee-45b4-bfff-46f35de9e156"
}
],
"responders": [
{
"href": "api/projects/1/responders/
08ff3fdc-85f3-4bd2-8cd8-06442d7eae0c",
"title": "wsresponder",
"objectType": "responders",
"id": "08ff3fdc-85f3-4bd2-8cd8-06442d7eae0c"
}
]
},
{
"id": "b53a6fc3-a885-4da9-b30e-a40e96208ee9",
"name": "invalidsqlconn",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/connections/b53a6fc3-a885-4da9-b30e-
a40e96208ee9",
"title": "invalidsqlconn",
"id": "b53a6fc3-a885-4da9-b30e-a40e96208ee9"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/connections/b53a6fc3-a885-4da9-b30e-
a40e96208ee9",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/connections/b53a6fc3-a885-4da9-b30e-
a40e96208ee9",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/connections/b53a6fc3-a885-4da9-b30e-

Connections 71
a40e96208ee9/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "connections",
"lastModifiedDate": "2013-08-13T10:38:12+05:30",
"createDate": "2013-08-06T16:04:07+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"connectionType": "jdbcConnection",
"connectionTypeDisplayName": "SQL Connection",
"config": {
"acquireRetryAttempts": "0",
"acquireRetryDelay": "5000",
"jdbcString": "jdbc:oracle:thin:@invr28cep46:1521:orcl",
"maxIdleTime": "36000",
"acquireIncrement": "1",
"checkoutTimeout": "2000",
"password": "cep_ci_secret",
"username": "cep_ci_user",
"maxPoolSize": "5",
"retryCount": "3",
"retryDelay": "1000",
"minPoolSize": "1",
"driverClass": "oracledriver",
"initialPoolSize": "1",
"loginTimeOut": "3"
},
"sources": [
{
"href": "api/projects/1/sources/ba80a9f1-
f0a2-4600-986a-40ecc7a1c832",
"title": "invalidsrc2",
"objectType": "sources",
"id": "ba80a9f1-f0a2-4600-986a-40ecc7a1c832"
}
]
},
{
"id": "bba20936-201a-4d3c-afad-33c76fb9366b",
"name": "emailcon",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/connections/bba20936-201a-4d3c-
afad-33c76fb9366b",
"title": "emailcon",
"id": "bba20936-201a-4d3c-afad-33c76fb9366b"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/connections/bba20936-201a-4d3c-
afad-33c76fb9366b",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/connections/bba20936-201a-4d3c-
afad-33c76fb9366b",
"type": "DELETE",

72 Chapter 6: Sample XML and JSON Requests and Responses


"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/connections/bba20936-201a-4d3c-
afad-33c76fb9366b/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "connections",
"lastModifiedDate": "2013-08-07T17:49:28+05:30",
"createDate": "2013-08-07T17:49:28+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"connectionType": "emailConnection",
"connectionTypeDisplayName": "Email Connection",
"config": {
"port": "25",
"username": "",
"retryCount": "3",
"retryDelay": "1000",
"server": "ma",
"password": null
},
"responders": [
{
"href": "api/projects/1/responders/51ba1457-5112-4e70-99f1-
fe94af5ddea3",
"title": "emailresponder",
"objectType": "responders",
"id": "51ba1457-5112-4e70-99f1-fe94af5ddea3"
}
]
}
]
}
Response Code : 200 OK

GET Request in XML Format


Generate a GET request. For example, the following GET request retrieves an SQL connection in a RulePoint
application:
GET http://localhost:8080/rulepoint/api/projects/1/connections
Accept: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

GET Response in XML Format


Returns the SQL connection object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<artifacts>
<links/>
<valid>false</valid>
<count>4</count>
<items>
<connection>
<acl>
<href>api/projects/1/connections/2d5c8d79-b732-4fe8-ad69-3243d102ed49/
acl</href>

Connections 73
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/connections/2d5c8d79-b732-4fe8-
ad69-3243d102ed49</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/connections/2d5c8d79-b732-4fe8-
ad69-3243d102ed49</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>2d5c8d79-b732-4fe8-ad69-3243d102ed49</id>
<links/>
<name>sqlconnection</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/connections/2d5c8d79-b732-4fe8-ad69-3243d102ed49</
href>
<id>2d5c8d79-b732-4fe8-ad69-3243d102ed49</id>
<rel>self</rel>
<title>sqlconnection</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>connections</type>
<config>
<entry>
<key>acquireRetryAttempts</key>
<value>0</value>
</entry>
<entry>
<key>acquireRetryDelay</key>
<value>5000</value>
</entry>
<entry>
<key>jdbcString</key>
<value>jdbc:oracle:thin:@invr28cep46:1521:orcl</value>
</entry>
<entry>
<key>maxIdleTime</key>
<value>36000</value>
</entry>
<entry>
<key>acquireIncrement</key>
<value>1</value>
</entry>
<entry>
<key>checkoutTimeout</key>
<value>2000</value>
</entry>
<entry>

74 Chapter 6: Sample XML and JSON Requests and Responses


<key>password</key>
<value>cep_ci_secret</value>
</entry>
<entry>
<key>username</key>
<value>cep_ci_user</value>
</entry>
<entry>
<key>maxPoolSize</key>
<value>5</value>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>retryDelay</key>
<value>1000</value>
</entry>
<entry>
<key>minPoolSize</key>
<value>1</value>
</entry>
<entry>
<key>driverClass</key>
<value>oracle.MyDriver</value>
</entry>
<entry>
<key>initialPoolSize</key>
<value>1</value>
</entry>
<entry>
<key>loginTimeOut</key>
<value>3</value>
</entry>
</config>
<connectionType>jdbcConnection</connectionType>
<connectionTypeDisplayName>SQL Connection</connectionTypeDisplayName>
<responders>
<href>api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151</
href>
<id>8bd61211-404b-4cd4-8a84-f36a7bcdf151</id>
<objectType>responders</objectType>
<title>sqlresponder</title>
</responders>
<sources>
<href>api/projects/1/sources/daf6350b-99cb-49e7-b69a-a1ea801e32a0</href>
<id>daf6350b-99cb-49e7-b69a-a1ea801e32a0</id>
<objectType>sources</objectType>
<title>invalidsrc</title>
</sources>
<sources>
<href>api/projects/1/sources/01eec793-87aa-44fe-a12d-ee3b98e0e71d</href>
<id>01eec793-87aa-44fe-a12d-ee3b98e0e71d</id>
<objectType>sources</objectType>
<title>sqlsrc1</title>
</sources>
</connection>
<connection>
<acl>
<href>api/projects/1/connections/03e9c236-1a01-40e2-9d4a-f13c893abef7/
acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/connections/03e9c236-1a01-40e2-9d4a-
f13c893abef7</href>
<rel>update</rel>

Connections 75
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/connections/03e9c236-1a01-40e2-9d4a-
f13c893abef7</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>03e9c236-1a01-40e2-9d4a-f13c893abef7</id>
<links/>
<name>wsconn</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/connections/03e9c236-1a01-40e2-9d4a-f13c893abef7</
href>
<id>03e9c236-1a01-40e2-9d4a-f13c893abef7</id>
<rel>self</rel>
<title>wsconn</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>connections</type>
<analytics>
<href>api/projects/1/analytics/42d49371-55ee-45b4-bfff-46f35de9e156</
href>
<id>42d49371-55ee-45b4-bfff-46f35de9e156</id>
<objectType>analytics</objectType>
<title>wsanalytic</title>
</analytics>
<config>
<entry>
<key>userNameSpace</key>
<value/>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>retryDelay</key>
<value>1000</value>
</entry>
<entry>
<key>password</key>
</entry>
<entry>
<key>wsdlDuration</key>
<value>0</value>
</entry>
<entry>
<key>url</key>
<value>http://invr28cep46:8080/CepQeWebServices/HelloWorldService?
wsdl</value>
</entry>
<entry>
<key>loginName</key>

76 Chapter 6: Sample XML and JSON Requests and Responses


<value/>
</entry>
</config>
<connectionType>wsConnection</connectionType>
<connectionTypeDisplayName>Web Service Connection</connectionTypeDisplayName>
<responders>
<href>api/projects/1/responders/08ff3fdc-85f3-4bd2-8cd8-06442d7eae0c</
href>
<id>08ff3fdc-85f3-4bd2-8cd8-06442d7eae0c</id>
<objectType>responders</objectType>
<title>wsresponder</title>
</responders>
<sources>
<href>api/projects/1/sources/09c059f8-f304-41dd-8e1b-fa5a538a74c4</href>
<id>09c059f8-f304-41dd-8e1b-fa5a538a74c4</id>
<objectType>sources</objectType>
<title>wssrc</title>
</sources>
</connection>
<connection>
<acl>
<href>api/projects/1/connections/b53a6fc3-a885-4da9-b30e-a40e96208ee9/
acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/connections/b53a6fc3-a885-4da9-b30e-
a40e96208ee9</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/connections/b53a6fc3-a885-4da9-b30e-
a40e96208ee9</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>b53a6fc3-a885-4da9-b30e-a40e96208ee9</id>
<links/>
<name>invalidsqlconn</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/connections/b53a6fc3-a885-4da9-b30e-a40e96208ee9</
href>
<id>b53a6fc3-a885-4da9-b30e-a40e96208ee9</id>
<rel>self</rel>
<title>invalidsqlconn</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>connections</type>
<config>
<entry>
<key>acquireRetryAttempts</key>

Connections 77
<value>0</value>
</entry>
<entry>
<key>acquireRetryDelay</key>
<value>5000</value>
</entry>
<entry>
<key>jdbcString</key>
<value>jdbc:oracle:thin:@invr28cep46:1521:orcl</value>
</entry>
<entry>
<key>maxIdleTime</key>
<value>36000</value>
</entry>
<entry>
<key>acquireIncrement</key>
<value>1</value>
</entry>
<entry>
<key>checkoutTimeout</key>
<value>2000</value>
</entry>
<entry>
<key>password</key>
<value>cep_ci_secret</value>
</entry>
<entry>
<key>username</key>
<value>cep_ci_user</value>
</entry>
<entry>
<key>maxPoolSize</key>
<value>5</value>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>retryDelay</key>
<value>1000</value>
</entry>
<entry>
<key>minPoolSize</key>
<value>1</value>
</entry>
<entry>
<key>driverClass</key>
<value>oracledriver</value>
</entry>
<entry>
<key>initialPoolSize</key>
<value>1</value>
</entry>
<entry>
<key>loginTimeOut</key>
<value>3</value>
</entry>
</config>
<connectionType>jdbcConnection</connectionType>
<connectionTypeDisplayName>SQL Connection</connectionTypeDisplayName>
<sources>
<href>api/projects/1/sources/ba80a9f1-f0a2-4600-986a-40ecc7a1c832</href>
<id>ba80a9f1-f0a2-4600-986a-40ecc7a1c832</id>
<objectType>sources</objectType>
<title>invalidsrc2</title>
</sources>
</connection>
<connection>
<acl>

78 Chapter 6: Sample XML and JSON Requests and Responses


<href>api/projects/1/connections/bba20936-201a-4d3c-afad-33c76fb9366b/
acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/connections/bba20936-201a-4d3c-
afad-33c76fb9366b</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/connections/bba20936-201a-4d3c-
afad-33c76fb9366b</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>bba20936-201a-4d3c-afad-33c76fb9366b</id>
<links/>
<name>emailcon</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/connections/bba20936-201a-4d3c-afad-33c76fb9366b</
href>
<id>bba20936-201a-4d3c-afad-33c76fb9366b</id>
<rel>self</rel>
<title>emailcon</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>connections</type>
<config>
<entry>
<key>port</key>
<value>25</value>
</entry>
<entry>
<key>username</key>
<value/>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>retryDelay</key>
<value>1000</value>
</entry>
<entry>
<key>server</key>
<value>ma</value>
</entry>
<entry>
<key>password</key>
</entry>

Connections 79
</config>
<connectionType>emailConnection</connectionType>
<connectionTypeDisplayName>Email Connection</connectionTypeDisplayName>
<responders>
<href>api/projects/1/responders/51ba1457-5112-4e70-99f1-fe94af5ddea3</
href>
<id>51ba1457-5112-4e70-99f1-fe94af5ddea3</id>
<objectType>responders</objectType>
<title>emailresponder</title>
</responders>
</connection>
</items>
<total>4</total>
<invalidCount>0</invalidCount>
</artifacts>
Response Code : 200 OK

Update SQL Connection


Use the PUT method to update an SQL connection in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates an SQL connection in a RulePoint
application:
PUT http://localhost:8080/rulepoint/api/projects/3/connections/1d559d37-2c6e-48c0-8623-
c571339c1e99
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


Returns the SQL connection object and response code 200 OK. Returns the error object if an error occurs.
{
"name": "DBConnection",
"type": "connections",
"description": "A SQL Connection",
"connectionType": "jdbcConnection",
"config": {
"driverClass": "oracle.jdbc.OracleDriver",
"jdbcString": "jdbc:oracle:thin:@invr28cep46:1521:ORCL",
"username": "cep_ci_user",
"password": "cep_ci_secret",
"initialPoolSize": "5",
"acquireIncrement": "1",
"maxPoolSize": "10",
"minPoolSize": "2",
"loginTimeOut": "5000",
"retryCount": "3",
"retryDelay": "1000",
"maxIdleTime": "36000",
"acquireRetryAttempts": "0",
"acquireRetryDelay": "5000",
"checkoutTimeout": "2000"
}
}

PUT Response in JSON Format


{
"id": "1d559d37-2c6e-48c0-8623-c571339c1e99",
"name": "DBConnection",
"valid": true,
"self": {

80 Chapter 6: Sample XML and JSON Requests and Responses


"rel": "self",
"href": "api/projects/4/connections/1d559d37-2c6e-48c0-8623-c571339c1e99",
"title": "DBConnection",
"id": "1d559d37-2c6e-48c0-8623-c571339c1e99"
},
"actions": [
{
"rel": "update",
"href": "api/projects/4/connections/1d559d37-2c6e-48c0-8623-c571339c1e99",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/4/connections/1d559d37-2c6e-48c0-8623-c571339c1e99",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/4/connections/1d559d37-2c6e-48c0-8623-c571339c1e99/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/4",
"title": "RT_TestProject1",
"id": "4"
},
"description": "A SQL Connection",
"type": "connections",
"lastModifiedDate": "2013-07-30T06:39:49+05:30",
"createDate": "2013-07-30T06:39:49+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"connectionType": "jdbcConnection",
"connectionTypeDisplayName": "SQL Connection",
"config": {
"acquireRetryAttempts": "0",
"acquireRetryDelay": "5000",
"jdbcString": "jdbc:oracle:thin:@invr28cep46:1521:ORCL",
"maxIdleTime": "36000",
"acquireIncrement": "1",
"checkoutTimeout": "2000",
"password": "cep_ci_secret",
"username": "cep_ci_user",
"maxPoolSize": "10",
"retryCount": "3",
"retryDelay": "1000",
"minPoolSize": "2",
"driverClass": "oracle.jdbc.OracleDriver",
"initialPoolSize": "5",
"loginTimeOut": "5000"
}
}
Response Code : 200 OK

PUT Body in XML Format


Generate a PUT request. For example, the following PUT request updates an SQL connection in a RulePoint
application:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<connection>
<name>DBConnection</name>

Connections 81
<type>connections</type>
<description>A SQL Connection</description>
<connectionType>jdbcConnection</connectionType>
<config>
<entry>
<key>driverClass</key>
<value>oracle.jdbc.OracleDriver</value>
</entry>
<entry>
<key>jdbcString</key>
<value>jdbc:oracle:thin:@invr28cep46:1521:ORCL</value>
</entry>
<entry>
<key>username</key>
<value>cep_ci_user</value>
</entry>
<entry>
<key>password</key>
<value>cep_ci_secret</value>
</entry>
<entry>
<key>acquireIncrement</key>
<value>1</value>
</entry>
<entry>
<key>acquireRetryAttempts</key>
<value>0</value>
</entry>
<entry>
<key>acquireRetryDelay</key>
<value>5000</value>
</entry>
<entry>
<key>checkoutTimeout</key>
<value>2000</value>
</entry>
<entry>
<key>initialPoolSize</key>
<value>5</value>
</entry>
<entry>
<key>loginTimeout</key>
<value>5000</value>
</entry>
<entry>
<key>maxIdleTime</key>
<value>36000</value>
</entry>
<entry>
<key>maxPoolSize</key>
<value>10</value>
</entry>
<entry>
<key>minPoolSize</key>
<value>2</value>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>retryDelay</key>
<value>1000</value>
</entry>
</config>
</connection>

82 Chapter 6: Sample XML and JSON Requests and Responses


PUT Response in XML Format
Returns the SQL connection object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<connection>
<acl>
<href>api/projects/98315/connections/1e5d5c0e-11ec-4c90-a5d9-25991b38befe/acl</
href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/98315/connections/1e5d5c0e-11ec-4c90-a5d9-25991b38befe</
href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/98315/connections/1e5d5c0e-11ec-4c90-a5d9-25991b38befe</
href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>1e5d5c0e-11ec-4c90-a5d9-25991b38befe</id>
<links/>
<name>DBConnection</name>
<owningProject>
<href>api/projects/98315</href>
<id>98315</id>
<rel>owningProject</rel>
<title>RT_TestProject1</title>
</owningProject>
<self>
<href>api/projects/98315/connections/1e5d5c0e-11ec-4c90-a5d9-25991b38befe</href>
<id>1e5d5c0e-11ec-4c90-a5d9-25991b38befe</id>
<rel>self</rel>
<title>DBConnection</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<description>A SQL Connection</description>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>connections</type>
<config>
<entry>
<key>acquireRetryAttempts</key>
<value>0</value>
</entry>
<entry>
<key>acquireRetryDelay</key>
<value>5000</value>
</entry>
<entry>
<key>jdbcString</key>
<value>jdbc:oracle:thin:@invr28cep46:1521:ORCL</value>
</entry>
<entry>
<key>maxIdleTime</key>
<value>36000</value>
</entry>

Connections 83
<entry>
<key>acquireIncrement</key>
<value>1</value>
</entry>
<entry>
<key>checkoutTimeout</key>
<value>2000</value>
</entry>
<entry>
<key>password</key>
<value>cep_ci_secret</value>
</entry>
<entry>
<key>username</key>
<value>cep_ci_user</value>
</entry>
<entry>
<key>maxPoolSize</key>
<value>10</value>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>retryDelay</key>
<value>1000</value>
</entry>
<entry>
<key>minPoolSize</key>
<value>2</value>
</entry>
<entry>
<key>driverClass</key>
<value>oracle.jdbc.OracleDriver</value>
</entry>
<entry>
<key>initialPoolSize</key>
<value>5</value>
</entry>
<entry>
<key>loginTimeOut</key>
<value>3</value>
</entry>
</config>
<connectionType>jdbcConnection</connectionType>
<connectionTypeDisplayName>SQL Connection</connectionTypeDisplayName>
</connection>
Response Code : 200 OK

Delete SQL Connection


Use the DELETE method to delete an SQL connection in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes an SQL connection in a
RulePoint application:
DELETE http://localhost:8080/rulepoint/api/projects/3/connections/
1d559d37-2c6e-48c0-8623-c571339c1e99
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

84 Chapter 6: Sample XML and JSON Requests and Responses


DELETE Request in XML Format
Generate a DELETE request. For example, the following DELETE request deletes an SQL connection in a
RulePoint application:
DELETE http://localhost:8080/rulepoint/api/projects/98315/connections/
1e5d5c0e-11ec-4c90-a5d9-25991b38befe
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

Email Connection
Use the examples to create, update, or delete an email connection.

Create Email Connection


Use the POST method to create an email connection in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates an email connection in a
RulePoint application:
POST http://localhost:8080/rulepoint/api/projects/1/connections
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "emailcon",
"connectionType": "emailConnection",
"valid": true,
"config": {
"port": "25",
"username": null,
"retryCount": "3",
"retryDelay": "1000",
"server": "mail.informatica.com",
"password": null
}
}

POST Response in JSON Format


Returns the email connection object and response code 201 OK. Returns the error object if an error occurs.
{
"id": "bba20936-201a-4d3c-afad-33c76fb9366b",
"name": "emailcon",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/connections/bba20936-201a-4d3c-afad-33c76fb9366b",
"title": "emailcon",
"id": "bba20936-201a-4d3c-afad-33c76fb9366b"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/connections/bba20936-201a-4d3c-afad-33c76fb9366b",

Connections 85
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/connections/bba20936-201a-4d3c-afad-33c76fb9366b",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/connections/bba20936-201a-4d3c-afad-33c76fb9366b/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "connections",
"lastModifiedDate": "2013-09-11T17:44:42+05:30",
"createDate": "2013-08-07T17:49:28+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"connectionType": "emailConnection",
"connectionTypeDisplayName": "Email Connection",
"config": {
"port": "25",
"username": "",
"retryCount": "3",
"retryDelay": "1000",
"server": "mail.mycompany.com",
"password": null
},
"responders": [
{
"href": "api/projects/1/responders/51ba1457-5112-4e70-99f1-fe94af5ddea3",
"title": "emailresponder",
"objectType": "responders",
"id": "51ba1457-5112-4e70-99f1-fe94af5ddea3"
}
]
}
Response Code : 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates an email connection in a
RulePoint application:
POST http://localhost:8080/rulepoint/api/projects/1/connections
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<connection>
<name>EmailConnection1</name>
<description>An Email Connection</description>
<type>connections</type>
<config>
<entry>
<key>port</key>

86 Chapter 6: Sample XML and JSON Requests and Responses


<value>25</value>
</entry>
<entry>
<key>username</key>
<value/>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>retryDelay</key>
<value>5000</value>
</entry>
<entry>
<key>server</key>
<value>mail.informatica.com</value>
</entry>
</config>
<connectionType>emailConnection</connectionType>
</connection>

POST Response in XML Format


Returns the email connection object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<connection>
<acl>
<href>api/projects/1/connections/446f972d-d3ea-4d77-98f8-84816ed4abcb/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/connections/446f972d-d3ea-4d77-98f8-84816ed4abcb</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/connections/446f972d-d3ea-4d77-98f8-84816ed4abcb</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>446f972d-d3ea-4d77-98f8-84816ed4abcb</id>
<links/>
<name>EmailConnection1</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/connections/446f972d-d3ea-4d77-98f8-84816ed4abcb</href>
<id>446f972d-d3ea-4d77-98f8-84816ed4abcb</id>
<rel>self</rel>
<title>EmailConnection1</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<description>An Email Connection</description>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>

Connections 87
<type>connections</type>
<config>
<entry>
<key>port</key>
<value>25</value>
</entry>
<entry>
<key>username</key>
<value/>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>retryDelay</key>
<value>5000</value>
</entry>
<entry>
<key>server</key>
<value>mail.informatica.com</value>
</entry>
</config>
<connectionType>emailConnection</connectionType>
<connectionTypeDisplayName>Email Connection</connectionTypeDisplayName>
</connection>
Response Code : 201 Created

Update Email Connection


Use the PUT method to update an email connection in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates an email connection in a RulePoint
application:
PUT http://localhost:8080/rulepoint/api/projects/1/connections/bba20936-201a-4d3c-
afad-33c76fb9366b
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "emailconnection",
"connectionType": "emailConnection",
"valid": true,
"config": {
"port": "25",
"username": null,
"retryCount": "3",
"retryDelay": "1000",
"server": "mail.mycompany.com",
"password": null
}
}

PUT Response in JSON Format


Returns the email connection object and response code 200 OK. Returns the error object if an error occurs.
{
"id": "bba20936-201a-4d3c-afad-33c76fb9366b",
"name": "emailconnection",
"valid": true,

88 Chapter 6: Sample XML and JSON Requests and Responses


"self": {
"rel": "self",
"href": "api/projects/1/connections/bba20936-201a-4d3c-afad-33c76fb9366b",
"title": "emailconnection",
"id": "bba20936-201a-4d3c-afad-33c76fb9366b"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/connections/bba20936-201a-4d3c-afad-33c76fb9366b",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/connections/bba20936-201a-4d3c-afad-33c76fb9366b",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/connections/bba20936-201a-4d3c-afad-33c76fb9366b/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "connections",
"lastModifiedDate": "2013-09-11T17:44:42+05:30",
"createDate": "2013-08-07T17:49:28+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"connectionType": "emailConnection",
"connectionTypeDisplayName": "Email Connection",
"config": {
"port": "25",
"username": "",
"retryCount": "3",
"retryDelay": "1000",
"server": "mail.informatica.com",
"password": null
},
"responders": [
{
"href": "api/projects/1/responders/51ba1457-5112-4e70-99f1-fe94af5ddea3",
"title": "emailresponder",
"objectType": "responders",
"id": "51ba1457-5112-4e70-99f1-fe94af5ddea3"
}
]
}
Response Code : 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates an email connection in a RulePoint
application:
PUT http://localhost:8080/rulepoint/api/projects/1/connections/894b2948-
ce82-4e0a-9302-267d3482ae25
Accept: application/xml

Connections 89
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<connection>
<name>MyEmailConnection</name>
<description>An Email Connection</description>
<type>connections</type>
<config>
<entry>
<key>port</key>
<value>25</value>
</entry>
<entry>
<key>username</key>
<value/>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>retryDelay</key>
<value>5000</value>
</entry>
<entry>
<key>server</key>
<value>mail.informatica.com</value>
</entry>
</config>
<connectionType>emailConnection</connectionType>
</connection>

PUT Response in XML Format


Returns the email connection object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<connection>
<acl>
<href>api/projects/1/connections/446f972d-d3ea-4d77-98f8-84816ed4abcb/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/connections/446f972d-d3ea-4d77-98f8-84816ed4abcb</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/connections/446f972d-d3ea-4d77-98f8-84816ed4abcb</href>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>446f972d-d3ea-4d77-98f8-84816ed4abcb</id>
<links/>
<name>MyEmailConnection</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/connections/446f972d-d3ea-4d77-98f8-84816ed4abcb</href>
<id>446f972d-d3ea-4d77-98f8-84816ed4abcb</id>

90 Chapter 6: Sample XML and JSON Requests and Responses


<rel>self</rel>
<title>MyEmailConnection</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<description>An Email Connection</description>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>connections</type>
<config>
<entry>
<key>port</key>
<value>25</value>
</entry>
<entry>
<key>username</key>
<value/>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>retryDelay</key>
<value>5000</value>
</entry>
<entry>
<key>server</key>
<value>mail.informatica.com</value>
</entry>
</config>
<connectionType>emailConnection</connectionType>
<connectionTypeDisplayName>Email Connection</connectionTypeDisplayName>
</connection>
Response Code : 200 OK

Delete Email Connection


Use the DELETE method to delete an email connection in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes an email connection in a
RulePoint application:
DELETE http://localhost:8080/rulepoint/api/projects/1/connections/bba20936-201a-4d3c-
afad-33c76fb9366b
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes an email connection in a
RulePoint application:
DELETE http://localhost:8080/rulepoint/api/projects/1/connections/446f972d-
d3ea-4d77-98f8-84816ed4abcb
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

Connections 91
Response Code : 204 No Content

JMS Connection
Use the examples to create, update, or delete a JMS connection.

Create JMS Connection


Use the POST method to create a JMS connection in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates a JMS connection in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/connections
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "jmsconnection",
"type": "connections",
"connectionType": "jmsConnection",
"config": {
"packagePrefixes": "",
"jmsConnectionFactory": "ConnectionFactory",
"location": "tcp://invr28cep46:61616",
"contextFactory": "org.apache.activemq.jndi.ActiveMQInitialContextFactory",
"userName": "",
"password": null
}
}

POST Response in JSON Format


Returns the JMS connection object and response code 201 OK. Returns the error object if an errors occur.
{
"id": "894b2948-ce82-4e0a-9302-267d3482ae25",
"name": "jmsconnection",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25",
"title": "jmsconnection",
"id": "894b2948-ce82-4e0a-9302-267d3482ae25"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",

92 Chapter 6: Sample XML and JSON Requests and Responses


"href": "api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "connections",
"lastModifiedDate": "2013-08-23T15:17:58+05:30",
"createDate": "2013-08-23T15:17:58+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"connectionType": "jmsConnection",
"connectionTypeDisplayName": "JMS Connection",
"config": {
"packagePrefixes": "",
"jmsConnectionFactory": "ConnectionFactory",
"location": "tcp://invr28cep46:61616",
"contextFactory": "org.apache.activemq.jndi.ActiveMQInitialContextFactory",
"userName": "",
"password": null
}
}
Response Code : 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates a JMS connection in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/connections
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<connection>
<name>jmsconnection</name>
<type>connections</type>
<config>
<entry>
<key>packagePrefixes</key>
<value/>
</entry>
<entry>
<key>jmsConnectionFactory</key>
<value>ConnectionFactory</value>
</entry>
<entry>
<key>location</key>
<value>tcp://invr28cep46:61616</value>
</entry>
<entry>
<key>contextFactory</key>
<value>org.apache.activemq.jndi.ActiveMQInitialContextFactory</value>
</entry>
<entry>
<key>userName</key>
<value/>
</entry>
<entry>
<key>password</key>
</entry>

Connections 93
</config>
<connectionType>jmsConnection</connectionType>
</connection>

POST Response in XML Format


Returns the JMS connection object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<connection>
<acl>
<href>api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>894b2948-ce82-4e0a-9302-267d3482ae25</id>
<links/>
<name>jmsconnection</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25</href>
<id>894b2948-ce82-4e0a-9302-267d3482ae25</id>
<rel>self</rel>
<title>jmsconnection</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>connections</type>
<config>
<entry>
<key>packagePrefixes</key>
<value/>
</entry>
<entry>
<key>jmsConnectionFactory</key>
<value>ConnectionFactory</value>
</entry>
<entry>
<key>location</key>
<value>tcp://invr28cep46:61616</value>
</entry>
<entry>
<key>contextFactory</key>
<value>org.apache.activemq.jndi.ActiveMQInitialContextFactory</value>
</entry>
<entry>

94 Chapter 6: Sample XML and JSON Requests and Responses


<key>userName</key>
<value/>
</entry>
<entry>
<key>password</key>
</entry>
</config>
<connectionType>jmsConnection</connectionType>
<connectionTypeDisplayName>JMS Connection</connectionTypeDisplayName>
</connection>
Response Code : 201 Created

Update JMS Connection


Use the PUT method to update a JMS connection in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates a JMS connection in a RulePoint
application:
PUT http://localhost:8080/rulepoint/api/projects/1/connections/894b2948-
ce82-4e0a-9302-267d3482ae25
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "ActiveMQConnection",
"type": "connections",
"connectionType": "jmsConnection",
"config": {
"packagePrefixes": "",
"jmsConnectionFactory": "ConnectionFactory",
"location": "tcp://invr28cep46:61616",
"contextFactory": "org.apache.activemq.jndi.ActiveMQInitialContextFactory",
"userName": "",
"password": null
}
}

PUT Response in JSON Format


Returns the JMS connection object and response code 200 OK. Returns the error object if an errors occur.
{
"id": "894b2948-ce82-4e0a-9302-267d3482ae25",
"name": "ActiveMQConnection",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25",
"title": "ActiveMQConnection",
"id": "894b2948-ce82-4e0a-9302-267d3482ae25"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25",

Connections 95
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "connections",
"lastModifiedDate": "2013-08-23T15:17:58+05:30",
"createDate": "2013-08-23T15:17:58+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"connectionType": "jmsConnection",
"connectionTypeDisplayName": "JMS Connection",
"config": {
"packagePrefixes": "",
"jmsConnectionFactory": "ConnectionFactory",
"location": "tcp://invr28cep46:61616",
"contextFactory": "org.apache.activemq.jndi.ActiveMQInitialContextFactory",
"userName": "",
"password": null
}
}
Response Code : 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates a JMS connection in a RulePoint
application:
PUT http://localhost:8080/rulepoint/api/projects/1/connections/894b2948-
ce82-4e0a-9302-267d3482ae25
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<connection>
<name>ActiveMQConnection</name>
<type>connections</type>
<config>
<entry>
<key>packagePrefixes</key>
<value/>
</entry>
<entry>
<key>jmsConnectionFactory</key>
<value>ConnectionFactory</value>
</entry>
<entry>
<key>location</key>
<value>tcp://invr28cep46:61616</value>
</entry>
<entry>
<key>contextFactory</key>
<value>org.apache.activemq.jndi.ActiveMQInitialContextFactory</value>
</entry>

96 Chapter 6: Sample XML and JSON Requests and Responses


<entry>
<key>userName</key>
<value/>
</entry>
<entry>
<key>password</key>
</entry>
</config>
<connectionType>jmsConnection</connectionType>
</connection>

PUT Response in XML Format


Returns the JMS connection object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<connection>
<acl>
<href>api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>894b2948-ce82-4e0a-9302-267d3482ae25</id>
<links/>
<name>ActiveMQConnection</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25</href>
<id>894b2948-ce82-4e0a-9302-267d3482ae25</id>
<rel>self</rel>
<title>ActiveMQConnection</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>connections</type>
<config>
<entry>
<key>packagePrefixes</key>
<value/>
</entry>
<entry>
<key>jmsConnectionFactory</key>
<value>ConnectionFactory</value>
</entry>
<entry>
<key>location</key>

Connections 97
<value>tcp://invr28cep46:61616</value>
</entry>
<entry>
<key>contextFactory</key>
<value>org.apache.activemq.jndi.ActiveMQInitialContextFactory</value>
</entry>
<entry>
<key>userName</key>
<value/>
</entry>
<entry>
<key>password</key>
</entry>
</config>
<connectionType>jmsConnection</connectionType>
<connectionTypeDisplayName>JMS Connection</connectionTypeDisplayName>
</connection>
Response Code : 200 OK

Delete JMS Connection


Use the DELETE method to delete a JMS connection in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes a JMS connection in a
RulePoint application:
DELETE http://localhost:8080/rulepoint/api/projects/1/connections/894b2948-
ce82-4e0a-9302-267d3482ae25
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes a JMS connection in a
RulePoint application:
DELETE http://localhost:8080/rulepoint/api/projects/1/connections/894b2948-
ce82-4e0a-9302-267d3482ae25
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

98 Chapter 6: Sample XML and JSON Requests and Responses


Web Service Connection
Use the examples to create, update, or delete a web service connection.

Create Web Service Connection


Use the POST method to create a web service connection in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates a web service connection in a
RulePoint application:
POST http://localhost:8080/rulepoint/api/projects/1/connections
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "WsConnection1",
"description": "A WebService Connection",
"connectionType": "wsConnection",
"valid": true,
"config": {
"userNameSpace": null,
"retryCount": "3",
"retryDelay": "1000",
"wsdlDuration": "60000",
"url": "http://invr28cep46:8080/CepQeWebServices/HelloWorldService?wsdl",
"loginName": null,
"password": null
}
}

POST Response in JSON Format


Returns the web service connection object and response code 201 OK. Returns the error object if an error
occurs.
{
"id": "e9bcc9ae-8e78-4b2c-a3f4-48352e817052",
"name": "WsConnection1",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052",
"title": "WsConnection1",
"id": "e9bcc9ae-8e78-4b2c-a3f4-48352e817052"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",

Connections 99
"href": "api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"description": "A WebService Connection",
"type": "connections",
"lastModifiedDate": "2013-09-13T16:37:29+05:30",
"createDate": "2013-09-13T16:10:38+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"connectionType": "wsConnection",
"connectionTypeDisplayName": "Web Service Connection",
"config": {
"userNameSpace": "",
"retryCount": "3",
"retryDelay": "1000",
"password": null,
"wsdlDuration": "60000",
"url": "http://invr28cep46:8080/CepQeWebServices/HelloWorldService?wsdl",
"loginName": ""
}
}
Response Code : 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates a web service connection in a
RulePoint application:
POST http://localhost:8080/rulepoint/api/projects/1/connections
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<connection>
<name>WsConnection1</name>
<type>connections</type>
<config>
<entry>
<key>userNameSpace</key>
<value/>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>retryDelay</key>
<value>1000</value>
</entry>
<entry>
<key>password</key>
</entry>
<entry>
<key>wsdlDuration</key>
<value>60000</value>
</entry>
<entry>
<key>url</key>

100 Chapter 6: Sample XML and JSON Requests and Responses


<value>http://invr28cep46:8080/CepQeWebServices/HelloWorldService?wsdl</
value>
</entry>
<entry>
<key>loginName</key>
<value/>
</entry>
</config>
<connectionType>wsConnection</connectionType>
</connection>

POST Response in XML Format


Returns the web service connection object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<connection>
<acl>
<href>api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>e9bcc9ae-8e78-4b2c-a3f4-48352e817052</id>
<links/>
<name>WsConnection1</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052</href>
<id>e9bcc9ae-8e78-4b2c-a3f4-48352e817052</id>
<rel>self</rel>
<title>WsConnection1</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<description>A WebService Connection</description>
<force>false</force>
<predefined>false</predefined>
<type>connections</type>
<config>
<entry>
<key>userNameSpace</key>
<value/>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>retryDelay</key>

Connections 101
<value>1000</value>
</entry>
<entry>
<key>password</key>
</entry>
<entry>
<key>wsdlDuration</key>
<value>60000</value>
</entry>
<entry>
<key>url</key>
<value>http://invr28cep46:8080/CepQeWebServices/HelloWorldService?wsdl</
value>
</entry>
<entry>
<key>loginName</key>
<value/>
</entry>
</config>
<connectionType>wsConnection</connectionType>
</connection>
Response Code : 201 Created

Update Web Service Connection


Use the PUT method to update a web service connection in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates a web service connection in a
RulePoint application:
PUT http://localhost:8080/rulepoint/api/projects/1/connections/e9bcc9ae-8e78-4b2c-
a3f4-48352e817052
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


Returns the web service connection object and response code 200 OK. Returns the error object if an error
occurs.
{
"name": "MyWebServiceConn",
"description": "A WebService Connection",
"connectionType": "wsConnection",
"valid": true,
"config": {
"userNameSpace": null,
"retryCount": "3",
"retryDelay": "1000",
"wsdlDuration": "60000",
"url": "http://invr28cep46:8080/CepQeWebServices/HelloWorldService?wsdl",
"loginName": null,
"password": null
}
}

PUT Response in JSON Format


Returns the web service connection object and response code. Returns the error object if an error occurs.
{
"id": "e9bcc9ae-8e78-4b2c-a3f4-48352e817052",
"name": "MyWebServiceConn",
"valid": true,

102 Chapter 6: Sample XML and JSON Requests and Responses


"self": {
"rel": "self",
"href": "api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052",
"title": "MyWebServiceConn",
"id": "e9bcc9ae-8e78-4b2c-a3f4-48352e817052"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"description": "A WebService Connection",
"type": "connections",
"lastModifiedDate": "2013-09-13T16:37:29+05:30",
"createDate": "2013-09-13T16:10:38+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"connectionType": "wsConnection",
"connectionTypeDisplayName": "Web Service Connection",
"config": {
"userNameSpace": "",
"retryCount": "3",
"retryDelay": "1000",
"password": null,
"wsdlDuration": "60000",
"url": "http://invr28cep46:8080/CepQeWebServices/HelloWorldService?wsdl",
"loginName": ""
}
}
Response Code : 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates a web service connection in a
RulePoint application:
PUT http://localhost:8080/rulepoint/api/projects/1/connections/e9bcc9ae-8e78-4b2c-
a3f4-48352e817052
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<connection>
<name>MyWebServiceConn</name>

Connections 103
<type>connections</type>
<config>
<entry>
<key>userNameSpace</key>
<value/>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>retryDelay</key>
<value>1000</value>
</entry>
<entry>
<key>password</key>
</entry>
<entry>
<key>wsdlDuration</key>
<value>60000</value>
</entry>
<entry>
<key>url</key>
<value>http://invr28cep46:8080/CepQeWebServices/HelloWorldService?wsdl</
value>
</entry>
<entry>
<key>loginName</key>
<value/>
</entry>
</config>
<connectionType>wsConnection</connectionType>
</connection>

PUT Response in XML Format


Returns the web service connection object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<connection>
<acl>
<href>api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>e9bcc9ae-8e78-4b2c-a3f4-48352e817052</id>
<links/>
<name>MyWebServiceConn</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052</href>
<id>e9bcc9ae-8e78-4b2c-a3f4-48352e817052</id>

104 Chapter 6: Sample XML and JSON Requests and Responses


<rel>self</rel>
<title>MyWebServiceConn</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<description>A WebService Connection</description>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>connections</type>
<config>
<entry>
<key>userNameSpace</key>
<value/>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>retryDelay</key>
<value>1000</value>
</entry>
<entry>
<key>password</key>
</entry>
<entry>
<key>wsdlDuration</key>
<value>60000</value>
</entry>
<entry>
<key>url</key>
<value>http://invr28cep46:8080/CepQeWebServices/HelloWorldService?wsdl</
value>
</entry>
<entry>
<key>loginName</key>
<value/>
</entry>
</config>
<connectionType>wsConnection</connectionType>
</connection>
Response Code : 200 OK

Delete Web Service Connection


Use the DELETE method to delete a web service connection in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes a web service connection in
a RulePoint application:
DELETE http://localhost:8080/rulepoint/api/projects/1/connections/e9bcc9ae-8e78-4b2c-
a3f4-48352e817052
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

Connections 105
DELETE Request in XML Format
Generate a DELETE request. For example, the following DELETE request deletes a web service connection in
a RulePoint application:
DELETE http://localhost:8080/rulepoint/api/projects/1/connections/e9bcc9ae-8e78-4b2c-
a3f4-48352e817052
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

Sources
You can use API calls to perform various operations with SQL, JMS, RSS Reader, URL monitoring, web page
monitoring, web service, file input, and event generator sources.

SQL Source
Use the examples to retrieve, create, update, or delete an SQL source.

Create SQL Source


Use the POST method to create an SQL source in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates an SQL source in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/responses/11780430-b441-4a03-9733-
b2c429d15c45
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "SqlSource1",
"valid": true,
"type": "sources",
"topics": [
{
"rel": "topics",
"href": "api/projects/4/topics/e1accb9c-b1a0-431b-b771-bc7662811e95",
"title": "SqlTopic1",
"id": "e1accb9c-b1a0-431b-b771-bc7662811e95"
}
],
"connection": {
"rel": "connection",
"href": "api/projects/4/connections/1d559d37-2c6e-48c0-8623-c571339c1e99",
"title": "SqlConnection1",
"id": "1d559d37-2c6e-48c0-8623-c571339c1e99"
},
"sourceType": "SqlSource",
"config": {

106 Chapter 6: Sample XML and JSON Requests and Responses


"sql": "select * from stock where price < 20",
"propertyMetadataMap": "[\"java.util.HashMap\",{}]",
"parameters": "",
"transactionSize": 0,
"bufferResult": "no"
},
"marshaller": {
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}

POST Response in JSON Format


Returns the SQL source object and response code. Returns the error object if an error occurs.
{
"id": "b40f59c8-01c8-4202-bb0c-8dd0fb3a93f6",
"name": "SqlSource1",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/4/sources/b40f59c8-01c8-4202-bb0c-8dd0fb3a93f6",
"title": "SqlSource1",
"id": "b40f59c8-01c8-4202-bb0c-8dd0fb3a93f6"
},
"actions": [
{
"rel": "update",
"href": "api/projects/4/sources/b40f59c8-01c8-4202-bb0c-8dd0fb3a93f6",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/4/sources/b40f59c8-01c8-4202-bb0c-8dd0fb3a93f6",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "createSchedule",
"href": "api/projects/4/sources/b40f59c8-01c8-4202-bb0c-8dd0fb3a93f6/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/4/sources/b40f59c8-01c8-4202-bb0c-8dd0fb3a93f6/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/4",
"title": "RT_TestProject1",
"id": "4"
},
"type": "sources",
"lastModifiedDate": "2013-07-30T06:39:49+05:30",
"createDate": "2013-07-30T06:39:49+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"dtError": "There are no schedules attached to this Source",
"sourceType": "SqlSource",
"sourceTypeDisplayName": "SQL Source",
"schedulable": true,

Sources 107
"config": {
"fetchSize": "10",
"sql": "select * from stock where price < 20",
"updateSql": null,
"bufferResult": "no",
"markerId": null,
"parameters": null,
"propertyMetadataMap": "*",
"transactionSize": "0"
},
"topics": [
{
"href": "api/projects/4/topics/e1accb9c-b1a0-431b-b771-bc7662811e95",
"title": "SqlTopic1",
"objectType": "topics",
"id": "e1accb9c-b1a0-431b-b771-bc7662811e95"
}
],
"connection": {
"rel": "connection",
"href": "api/projects/4/connections/1d559d37-2c6e-48c0-8623-c571339c1e99",
"title": "SqlConnection1",
"id": "1d559d37-2c6e-48c0-8623-c571339c1e99"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": null,
"marshallerThreadsafe": false
}
}
Response Code: 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates an SQL source in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/sources
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<name>sqlsrc1</name>
<type>sources</type>
<config>
<entry>
<key>fetchSize</key>
<value>10</value>
</entry>
<entry>
<key>sql</key>
<value>select * from stock</value>
</entry>
<entry>
<key>updateSql</key>
<value/>
</entry>
<entry>
<key>bufferResult</key>
<value>no</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>

108 Chapter 6: Sample XML and JSON Requests and Responses


<key>parameters</key>
</entry>
<entry>
<key>propertyMetadataMap</key>
</entry>
<entry>
<key>transactionSize</key>
<value>0</value>
</entry>
</config>
<connection>
<href>api/projects/1/connections/2d5c8d79-b732-4fe8-ad69-3243d102ed49</href>
<id>2d5c8d79-b732-4fe8-ad69-3243d102ed49</id>
<rel>connection</rel>
<title>sqlconnection</title>
</connection>
<sourceType>SqlSource</sourceType>
<topics>
<topic>
<href>api/projects/1/topics/13dcf0cf-4d29-434a-98ae-99dff34367ab</href>
<id>13dcf0cf-4d29-434a-98ae-99dff34367ab</id>
<objectType>topics</objectType>
<title>sqltopic</title>
</topic>
</topics>
</source>

POST Response in XML Format


Returns the SQL response object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<acl>
<href>api/projects/1/sources/01eec793-87aa-44fe-a12d-ee3b98e0e71d/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/sources/01eec793-87aa-44fe-a12d-ee3b98e0e71d</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/sources/01eec793-87aa-44fe-a12d-ee3b98e0e71d</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/sources/01eec793-87aa-44fe-a12d-ee3b98e0e71d/schedules</
href>
<rel>createSchedule</rel>
<title>Create Schedule</title>
<type>POST</type>
</action>
</actions>
<id>01eec793-87aa-44fe-a12d-ee3b98e0e71d</id>
<links/>
<name>sqlsrc1</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/sources/01eec793-87aa-44fe-a12d-ee3b98e0e71d</href>
<id>01eec793-87aa-44fe-a12d-ee3b98e0e71d</id>

Sources 109
<rel>self</rel>
<title>sqlsrc1</title>
</self>
<valid>false</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<dtError>There are no schedules attached to this Source</dtError>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>sources</type>
<config>
<entry>
<key>fetchSize</key>
<value>10</value>
</entry>
<entry>
<key>sql</key>
<value>select * from stock</value>
</entry>
<entry>
<key>updateSql</key>
<value/>
</entry>
<entry>
<key>bufferResult</key>
<value>no</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>parameters</key>
</entry>
<entry>
<key>propertyMetadataMap</key>
</entry>
<entry>
<key>transactionSize</key>
<value>0</value>
</entry>
</config>
<connection>
<href>api/projects/1/connections/2d5c8d79-b732-4fe8-ad69-3243d102ed49</href>
<id>2d5c8d79-b732-4fe8-ad69-3243d102ed49</id>
<rel>connection</rel>
<title>sqlconnection</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<sourceType>SqlSource</sourceType>
<sourceTypeDisplayName>SQL Source</sourceTypeDisplayName>
<topics>
<topic>
<href>api/projects/1/topics/13dcf0cf-4d29-434a-98ae-99dff34367ab</href>
<id>13dcf0cf-4d29-434a-98ae-99dff34367ab</id>
<objectType>topics</objectType>
<title>sqltopic</title>
</topic>
</topics>
</source>
Response Code : 201 Created

110 Chapter 6: Sample XML and JSON Requests and Responses


Retrieve SQL Source
Use the GET method to retrieve an SQL source in RulePoint.

GET Request in JSON Format


Generate a GET request. For example, the following PUT request retrieves an SQL source in a RulePoint
application:
GET http://localhost:8080/rulepoint/api/projects/1/sources
Accept: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

GET Response in JSON Format


{
"total": 5,
"count": 5,
"items": [
{
"id": "01eec793-87aa-44fe-a12d-ee3b98e0e71d",
"name": "sqlsrc1",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/sources/01eec793-87aa-44fe-a12d-ee3b98e0e71d",
"title": "sqlsrc1",
"id": "01eec793-87aa-44fe-a12d-ee3b98e0e71d"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/sources/01eec793-87aa-44fe-a12d-
ee3b98e0e71d",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/sources/01eec793-87aa-44fe-a12d-
ee3b98e0e71d",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createSchedule",
"href": "api/projects/1/sources/01eec793-87aa-44fe-a12d-ee3b98e0e71d/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/sources/01eec793-87aa-44fe-a12d-ee3b98e0e71d/
acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"

Sources 111
},
"type": "sources",
"lastModifiedDate": "2013-08-19T11:21:03+05:30",
"createDate": "2013-07-30T10:09:54+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"sourceType": "SqlSource",
"sourceTypeDisplayName": "SQL Source",
"schedulable": true,
"config": {
"fetchSize": "10",
"sql": "select * from stock",
"updateSql": "",
"bufferResult": "no",
"markerId": "",
"parameters": null,
"propertyMetadataMap": null,
"transactionSize": "0"
},
"topics": [
{
"href": "api/projects/1/topics/13dcf0cf-4d29-434a-98ae-99dff34367ab",
"title": "sqltopic",
"objectType": "topics",
"id": "13dcf0cf-4d29-434a-98ae-99dff34367ab"
}
],
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/2d5c8d79-b732-4fe8-
ad69-3243d102ed49",
"title": "sqlconnection",
"id": "2d5c8d79-b732-4fe8-ad69-3243d102ed49"
},
"schedules": [
{
"rel": "schedules",
"href": "api/projects/1/sources/01eec793-87aa-44fe-a12d-ee3b98e0e71d/
schedules/1687",
"id": "1687"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
},
{
"id": "09c059f8-f304-41dd-8e1b-fa5a538a74c4",
"name": "wssrc",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/sources/09c059f8-f304-41dd-8e1b-fa5a538a74c4",
"title": "wssrc",
"id": "09c059f8-f304-41dd-8e1b-fa5a538a74c4"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/sources/09c059f8-f304-41dd-8e1b-
fa5a538a74c4",
"type": "PUT",
"title": "Edit"
},
{

112 Chapter 6: Sample XML and JSON Requests and Responses


"rel": "delete",
"href": "api/projects/1/sources/09c059f8-f304-41dd-8e1b-
fa5a538a74c4",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createSchedule",
"href": "api/projects/1/sources/09c059f8-f304-41dd-8e1b-fa5a538a74c4/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/sources/09c059f8-f304-41dd-8e1b-fa5a538a74c4/
acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "sources",
"lastModifiedDate": "2013-08-19T09:57:07+05:30",
"createDate": "2013-08-19T09:24:26+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"sourceType": "WebSourceService",
"sourceTypeDisplayName": "Web Service Source",
"schedulable": true,
"config": {
"operation": "hello",
"inputParameters": "hello.name=x; =90",
"markerId": "",
"xpathExpr": "//return",
"propertyMetadataMap": null,
"serviceName": "HelloWorldServices"
},
"topics": [
{
"href": "api/projects/1/topics/4621dbcb-4343-4304-b4fc-6d09920c65e9",
"title": "wstopic",
"objectType": "topics",
"id": "4621dbcb-4343-4304-b4fc-6d09920c65e9"
}
],
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/03e9c236-1a01-40e2-9d4a-
f13c893abef7",
"title": "wsconn",
"id": "03e9c236-1a01-40e2-9d4a-f13c893abef7"
},
"schedules": [
{
"rel": "schedules",
"href": "api/projects/1/sources/09c059f8-f304-41dd-8e1b-fa5a538a74c4/

Sources 113
schedules/3801",
"id": "3801"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
},
{
"id": "ba80a9f1-f0a2-4600-986a-40ecc7a1c832",
"name": "invalidsrc2",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/sources/ba80a9f1-f0a2-4600-986a-40ecc7a1c832",
"title": "invalidsrc2",
"id": "ba80a9f1-f0a2-4600-986a-40ecc7a1c832"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/sources/ba80a9f1-
f0a2-4600-986a-40ecc7a1c832",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/sources/ba80a9f1-
f0a2-4600-986a-40ecc7a1c832",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createSchedule",
"href": "api/projects/1/sources/ba80a9f1-f0a2-4600-986a-40ecc7a1c832/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/sources/ba80a9f1-f0a2-4600-986a-40ecc7a1c832/
acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "sources",
"lastModifiedDate": "2013-08-13T10:38:12+05:30",
"createDate": "2013-08-06T16:04:51+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"sourceType": "SqlSource",

114 Chapter 6: Sample XML and JSON Requests and Responses


"sourceTypeDisplayName": "SQL Source",
"schedulable": true,
"config": {
"fetchSize": "10",
"sql": "select * from stock",
"updateSql": "",
"bufferResult": "no",
"markerId": "",
"parameters": null,
"propertyMetadataMap": null,
"transactionSize": "0"
},
"topics": [
{
"href": "api/projects/1/topics/13dcf0cf-4d29-434a-98ae-99dff34367ab",
"title": "sqltopic",
"objectType": "topics",
"id": "13dcf0cf-4d29-434a-98ae-99dff34367ab"
}
],
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/b53a6fc3-a885-4da9-b30e-
a40e96208ee9",
"title": "invalidsqlconn",
"id": "b53a6fc3-a885-4da9-b30e-a40e96208ee9"
},
"schedules": [
{
"rel": "schedules",
"href": "api/projects/1/sources/ba80a9f1-f0a2-4600-986a-40ecc7a1c832/
schedules/1720",
"id": "1720"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
},
{
"id": "daf6350b-99cb-49e7-b69a-a1ea801e32a0",
"name": "invalidsrc",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/sources/daf6350b-99cb-49e7-b69a-a1ea801e32a0",
"title": "invalidsrc",
"id": "daf6350b-99cb-49e7-b69a-a1ea801e32a0"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/sources/daf6350b-99cb-49e7-b69a-
a1ea801e32a0",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/sources/daf6350b-99cb-49e7-b69a-
a1ea801e32a0",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",

Sources 115
"title": "Deploy"
},
{
"rel": "createSchedule",
"href": "api/projects/1/sources/daf6350b-99cb-49e7-b69a-a1ea801e32a0/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/sources/daf6350b-99cb-49e7-b69a-a1ea801e32a0/
acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "sources",
"lastModifiedDate": "2013-08-06T16:02:53+05:30",
"createDate": "2013-08-06T16:00:15+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"sourceType": "SqlSource",
"sourceTypeDisplayName": "SQL Source",
"schedulable": true,
"config": {
"fetchSize": "10",
"sql": "select * from preferred_stocks",
"updateSql": "",
"bufferResult": "no",
"markerId": "",
"parameters": null,
"propertyMetadataMap": null,
"transactionSize": "0"
},
"topics": [
{
"href": "api/projects/1/topics/13dcf0cf-4d29-434a-98ae-99dff34367ab",
"title": "sqltopic",
"objectType": "topics",
"id": "13dcf0cf-4d29-434a-98ae-99dff34367ab"
}
],
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/2d5c8d79-b732-4fe8-
ad69-3243d102ed49",
"title": "sqlconnection",
"id": "2d5c8d79-b732-4fe8-ad69-3243d102ed49"
},
"schedules": [
{
"rel": "schedules",
"href": "api/projects/1/sources/daf6350b-99cb-49e7-b69a-a1ea801e32a0/
schedules/1719",
"id": "1719"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false

116 Chapter 6: Sample XML and JSON Requests and Responses


}
},
{
"id": "d5114508-ddd1-4d9a-ba2e-2a338325b9ed",
"name": "rss_src",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/sources/d5114508-ddd1-4d9a-ba2e-2a338325b9ed",
"title": "rss_src",
"id": "d5114508-ddd1-4d9a-ba2e-2a338325b9ed"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/sources/d5114508-ddd1-4d9a-
ba2e-2a338325b9ed",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/sources/d5114508-ddd1-4d9a-
ba2e-2a338325b9ed",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createSchedule",
"href": "api/projects/1/sources/d5114508-ddd1-4d9a-ba2e-2a338325b9ed/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/sources/d5114508-ddd1-4d9a-ba2e-2a338325b9ed/
acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "sources",
"lastModifiedDate": "2013-08-05T10:15:23+05:30",
"createDate": "2013-08-05T10:11:18+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"sourceType": "rss",
"sourceTypeDisplayName": "RSS/Atom Source",
"schedulable": true,
"config": {
"username": "",
"mostRecentEventDate": "2013-08-03 05:30:00 +0530",
"markerId": "",
"password": null,
"propertyMetadataMap": null,

Sources 117
"url": "http://invr28cep46:8080/CepQeRssServices/qe_feeds?
feed_title=YosemiteRssSourceTestTitle&feed_desc=YosemetiRssSourceTestFeedDescription&entr
y_title=FeedEntry&entry_desc=FeedEntryDesc&num_entries=10"
},
"topics": [
{
"href": "api/projects/1/topics/8ad3c733-5e7e-4908-b449-951edfbb9e2b",
"title": "rsstopic",
"objectType": "topics",
"id": "8ad3c733-5e7e-4908-b449-951edfbb9e2b"
}
],
"schedules": [
{
"rel": "schedules",
"href": "api/projects/1/sources/d5114508-ddd1-4d9a-ba2e-2a338325b9ed/
schedules/1689",
"id": "1689"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
]
}
Response Code: 200 OK

GET Request in XML Format


Generate a GET request. For example, the following PUT request retrieves an SQL source in a RulePoint
application:
GET http://localhost:8080/rulepoint/api/projects/1/sources
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

GET Response in XML Format


Returns the SQL source object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<artifacts>
<count>1</count>
<items>
<source>
<acl>
<href>api/projects/1/sources/71ab3fe4-b89d-45d9-af28-b6c40e31ec37/acl</
href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/sources/71ab3fe4-b89d-45d9-af28-b6c40e31ec37</
href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/sources/71ab3fe4-b89d-45d9-af28-b6c40e31ec37</
href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>

118 Chapter 6: Sample XML and JSON Requests and Responses


<action>
<href>api/projects/1/deploy</href>
<rel>deploy</rel>
<title>Deploy</title>
<type>POST</type>
</action>
<action>
<href>api/projects/1/sources/71ab3fe4-b89d-45d9-af28-b6c40e31ec37/
schedules</href>
<rel>createSchedule</rel>
<title>Create Schedule</title>
<type>POST</type>
</action>
</actions>
<id>71ab3fe4-b89d-45d9-af28-b6c40e31ec37</id>
<name>SqlSrc1</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/sources/71ab3fe4-b89d-45d9-af28-b6c40e31ec37</href>
<id>71ab3fe4-b89d-45d9-af28-b6c40e31ec37</id>
<rel>self</rel>
<title>SqlSrc1</title>
</self>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<description/>
<dtError>There are no schedules attached to this Source</dtError>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>sources</type>
<valid>true</valid>
<config>
<entry>
<key>fetchSize</key>
<value>10</value>
</entry>
<entry>
<key>sql</key>
<value>select * from stock</value>
</entry>
<entry>
<key>updateSql</key>
<value/>
</entry>
<entry>
<key>bufferResult</key>
<value>no</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>parameters</key>
</entry>
<entry>
<key>propertyMetadataMap</key>
</entry>
<entry>
<key>transactionSize</key>
<value>1</value>
</entry>

Sources 119
</config>
<connection>
<href>api/projects/1/connections/1d3cae17-2017-4046-ba9c-a5481aa0f027</
href>
<id>1d3cae17-2017-4046-ba9c-a5481aa0f027</id>
<rel>connection</rel>
<title>testConnection11392963966630</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<schedules>
<schedule>
<href>api/projects/1/sources/71ab3fe4-b89d-45d9-af28-b6c40e31ec37/
schedules/129</href>
<id>129</id>
<rel>schedules</rel>
</schedule>
</schedules>
<sourceType>SqlSource</sourceType>
<sourceTypeDisplayName>SQL Source</sourceTypeDisplayName>
<topics>
<topic>
<href>api/projects/1/topics/b897aa28-f7a4-48fd-8df7-ce071fe9004e</
href>
<id>b897aa28-f7a4-48fd-8df7-ce071fe9004e</id>
<objectSubType>topics</objectSubType>
<objectType>topics</objectType>
<rel>topics</rel>
<title>Stock_Quote</title>
</topic>
</topics>
</source>
</items>
<total>1</total>
<invalidCount>0</invalidCount>
</artifacts>
Response Code : 200 OK

Update SQL Source


Use the PUT method to update an SQL source in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates an SQL source in a RulePoint
application:
PUT http://localhost:8080/rulepoint/api/projects/4/sources/b40f59c8-01c8-4202-
bb0c-8dd0fb3a93f6
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "StockSource",
"valid": true,
"type": "sources",
"topics": [
{
"rel": "topics",
"href": "api/projects/4/topics/e1accb9c-b1a0-431b-b771-bc7662811e95",
"title": "SqlTopic1",

120 Chapter 6: Sample XML and JSON Requests and Responses


"id": "e1accb9c-b1a0-431b-b771-bc7662811e95"
}
],
"connection": {
"rel": "connection",
"href": "api/projects/4/connections/1d559d37-2c6e-48c0-8623-c571339c1e99",
"title": "SqlConnection1",
"id": "1d559d37-2c6e-48c0-8623-c571339c1e99"
},
"sourceType": "SqlSource",
"config": {
"sql": "select * from stock where price < 20",
"propertyMetadataMap": "[\"java.util.HashMap\",{}]",
"parameters": "",
"transactionSize": 0,
"bufferResult": "no"
},
"marshaller": {
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}

PUT Response in JSON Format


Returns the SQL source object and source code. Returns the error object if an error occurs.
{
"id": "b40f59c8-01c8-4202-bb0c-8dd0fb3a93f6",
"name": "StockSource",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/4/sources/b40f59c8-01c8-4202-bb0c-8dd0fb3a93f6",
"title": "StockSource",
"id": "b40f59c8-01c8-4202-bb0c-8dd0fb3a93f6"
},
"actions": [
{
"rel": "update",
"href": "api/projects/4/sources/b40f59c8-01c8-4202-bb0c-8dd0fb3a93f6",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/4/sources/b40f59c8-01c8-4202-bb0c-8dd0fb3a93f6",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "createSchedule",
"href": "api/projects/4/sources/b40f59c8-01c8-4202-bb0c-8dd0fb3a93f6/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/4/sources/b40f59c8-01c8-4202-bb0c-8dd0fb3a93f6/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/4",
"title": "RT_TestProject1",
"id": "4"
},
"type": "sources",

Sources 121
"lastModifiedDate": "2013-07-30T06:39:49+05:30",
"createDate": "2013-07-30T06:39:49+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"dtError": "There are no schedules attached to this Source",
"sourceType": "SqlSource",
"sourceTypeDisplayName": "SQL Source",
"schedulable": true,
"config": {
"fetchSize": "10",
"sql": "select * from stock where price < 20",
"updateSql": null,
"bufferResult": "no",
"markerId": null,
"parameters": null,
"propertyMetadataMap": "*",
"transactionSize": "0"
},
"topics": [
{
"href": "api/projects/4/topics/e1accb9c-b1a0-431b-b771-bc7662811e95",
"title": "SqlTopic1",
"objectType": "topics",
"id": "e1accb9c-b1a0-431b-b771-bc7662811e95"
}
],
"connection": {
"rel": "connection",
"href": "api/projects/4/connections/1d559d37-2c6e-48c0-8623-c571339c1e99",
"title": "SqlConnection1",
"id": "1d559d37-2c6e-48c0-8623-c571339c1e99"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": null,
"marshallerThreadsafe": false
}
}
Response Code: 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates an SQL source in a RulePoint
application:
PUT http://localhost:8080/rulepoint/api/projects/1/sources/01eec793-87aa-44fe-a12d-
ee3b98e0e71d
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<name>sqlsrc1</name>
<type>sources</type>
<config>
<entry>
<key>fetchSize</key>
<value>10</value>
</entry>
<entry>
<key>sql</key>
<value>select * from stock</value>
</entry>
<entry>

122 Chapter 6: Sample XML and JSON Requests and Responses


<key>updateSql</key>
<value/>
</entry>
<entry>
<key>bufferResult</key>
<value>no</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>parameters</key>
</entry>
<entry>
<key>propertyMetadataMap</key>
</entry>
<entry>
<key>transactionSize</key>
<value>0</value>
</entry>
</config>
<connection>
<href>api/projects/1/connections/2d5c8d79-b732-4fe8-ad69-3243d102ed49</href>
<id>2d5c8d79-b732-4fe8-ad69-3243d102ed49</id>
<rel>connection</rel>
<title>sqlconnection</title>
</connection>
<sourceType>SqlSource</sourceType>
<topics>
<topic>
<href>api/projects/1/topics/13dcf0cf-4d29-434a-98ae-99dff34367ab</href>
<id>13dcf0cf-4d29-434a-98ae-99dff34367ab</id>
<objectType>topics</objectType>
<title>sqltopic</title>
</topic>
</topics>
</source>

PUT Response in XML Format


Returns the SQL source object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<acl>
<href>api/projects/1/sources/01eec793-87aa-44fe-a12d-ee3b98e0e71d/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/sources/01eec793-87aa-44fe-a12d-ee3b98e0e71d</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/sources/01eec793-87aa-44fe-a12d-ee3b98e0e71d</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/sources/01eec793-87aa-44fe-a12d-ee3b98e0e71d/schedules</
href>
<rel>createSchedule</rel>
<title>Create Schedule</title>
<type>POST</type>
</action>
</actions>

Sources 123
<id>01eec793-87aa-44fe-a12d-ee3b98e0e71d</id>
<links/>
<name>sqlsrc1</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/sources/01eec793-87aa-44fe-a12d-ee3b98e0e71d</href>
<id>01eec793-87aa-44fe-a12d-ee3b98e0e71d</id>
<rel>self</rel>
<title>sqlsrc1</title>
</self>
<valid>false</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<dtError>There are no schedules attached to this Source</dtError>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>sources</type>
<config>
<entry>
<key>fetchSize</key>
<value>10</value>
</entry>
<entry>
<key>sql</key>
<value>select * from stock</value>
</entry>
<entry>
<key>updateSql</key>
<value/>
</entry>
<entry>
<key>bufferResult</key>
<value>no</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>parameters</key>
</entry>
<entry>
<key>propertyMetadataMap</key>
</entry>
<entry>
<key>transactionSize</key>
<value>0</value>
</entry>
</config>
<connection>
<href>api/projects/1/connections/2d5c8d79-b732-4fe8-ad69-3243d102ed49</href>
<id>2d5c8d79-b732-4fe8-ad69-3243d102ed49</id>
<rel>connection</rel>
<title>sqlconnection</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<sourceType>SqlSource</sourceType>
<sourceTypeDisplayName>SQL Source</sourceTypeDisplayName>

124 Chapter 6: Sample XML and JSON Requests and Responses


<topics>
<topic>
<href>api/projects/1/topics/13dcf0cf-4d29-434a-98ae-99dff34367ab</href>
<id>13dcf0cf-4d29-434a-98ae-99dff34367ab</id>
<objectType>topics</objectType>
<title>sqltopic</title>
</topic>
</topics>
</source>
Response Code : 200 OK

Delete SQL Source


Use the DELETE method to delete an SQL source in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes an SQL source in a RulePoint
application:
DELETE http://localhost:8080/rulepoint/api/projects/4/sources/b40f59c8-01c8-4202-
bb0c-8dd0fb3a93f6

Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes an SQL source in a RulePoint
application:
DELETE http://localhost:8080/rulepoint/api/projects/1/sources/01eec793-87aa-44fe-a12d-
ee3b98e0e71d
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

JMS Source
Use the examples to create, update, or delete a JMS source.

Create JMS Source


Use the POST method to create a JMS source in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates a JMS source in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/sources
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

Sources 125
POST Body in JSON Format
{
"name": "jmssource",
"sourceType": "JMSSource",
"schedulable": false,
"config": {
"clientAcknowledgeMode": "AUTO_ACKNOWLEDGE",
"clientId": "",
"destination": "jmsQueue",
"messageSelector": "",
"subscriptionName": ""
},
"topics": [
{
"href": "api/projects/1/topics/6e9c0ae9-fce0-4219-9e58-639af4e79daa",
"title": "jmstopic",
"objectType": "topics",
"id": "6e9c0ae9-fce0-4219-9e58-639af4e79daa"
}
],
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25",
"title": "jmsconnection",
"id": "894b2948-ce82-4e0a-9302-267d3482ae25"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}

POST Response in JSON Format


Returns the JMS source object and response code. Returns the error object if an error occurs.
{
"id": "f9a382cd-fb73-4165-bbaa-f05f40303b5d",
"name": "jmssource",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/sources/f9a382cd-fb73-4165-bbaa-f05f40303b5d",
"title": "jmssource",
"id": "f9a382cd-fb73-4165-bbaa-f05f40303b5d"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/sources/f9a382cd-fb73-4165-bbaa-f05f40303b5d",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/sources/f9a382cd-fb73-4165-bbaa-f05f40303b5d",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
}
],
"acl": {
"rel": "acl",

126 Chapter 6: Sample XML and JSON Requests and Responses


"href": "api/projects/1/sources/f9a382cd-fb73-4165-bbaa-f05f40303b5d/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "sources",
"lastModifiedDate": "2013-08-23T15:19:28+05:30",
"createDate": "2013-08-23T15:19:28+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"sourceType": "JMSSource",
"sourceTypeDisplayName": "JMS Source",
"schedulable": false,
"config": {
"clientAcknowledgeMode": "AUTO_ACKNOWLEDGE",
"clientId": "",
"destination": "jmsQueue",
"messageSelector": "",
"subscriptionName": ""
},
"topics": [
{
"href": "api/projects/1/topics/6e9c0ae9-fce0-4219-9e58-639af4e79daa",
"title": "jmstopic",
"objectType": "topics",
"id": "6e9c0ae9-fce0-4219-9e58-639af4e79daa"
}
],
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25",
"title": "jmsconnection",
"id": "894b2948-ce82-4e0a-9302-267d3482ae25"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code: 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates a JMS source in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/sources
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<name>jmssource</name>
<type>sources</type>
<config>
<entry>
<key>clientAcknowledgeMode</key>
<value>AUTO_ACKNOWLEDGE</value>
</entry>

Sources 127
<entry>
<key>clientId</key>
<value/>
</entry>
<entry>
<key>destination</key>
<value>jmsQueue</value>
</entry>
<entry>
<key>messageSelector</key>
<value/>
</entry>
<entry>
<key>subscriptionName</key>
<value/>
</entry>
</config>
<connection>
<href>api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25</href>
<id>894b2948-ce82-4e0a-9302-267d3482ae25</id>
<rel>connection</rel>
<title>jmsconnection</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>false</schedulable>
<sourceType>JMSSource</sourceType>
<sourceTypeDisplayName>JMS Source</sourceTypeDisplayName>
<topics>
<topic>
<href>api/projects/1/topics/6e9c0ae9-fce0-4219-9e58-639af4e79daa</href>
<id>6e9c0ae9-fce0-4219-9e58-639af4e79daa</id>
<objectType>topics</objectType>
<title>jmstopic</title>
</topic>
</topics>
</source>

POST Response in XML Format


Returns the JMS source object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<acl>
<href>api/projects/1/sources/f9a382cd-fb73-4165-bbaa-f05f40303b5d/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/sources/f9a382cd-fb73-4165-bbaa-f05f40303b5d</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/sources/f9a382cd-fb73-4165-bbaa-f05f40303b5d</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/deploy</href>
<rel>deploy</rel>
<title>Deploy</title>
<type>POST</type>
</action>
</actions>

128 Chapter 6: Sample XML and JSON Requests and Responses


<id>f9a382cd-fb73-4165-bbaa-f05f40303b5d</id>
<links/>
<name>jmssource</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/sources/f9a382cd-fb73-4165-bbaa-f05f40303b5d</href>
<id>f9a382cd-fb73-4165-bbaa-f05f40303b5d</id>
<rel>self</rel>
<title>jmssource</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>sources</type>
<config>
<entry>
<key>clientAcknowledgeMode</key>
<value>AUTO_ACKNOWLEDGE</value>
</entry>
<entry>
<key>clientId</key>
<value/>
</entry>
<entry>
<key>destination</key>
<value>jmsQueue</value>
</entry>
<entry>
<key>messageSelector</key>
<value/>
</entry>
<entry>
<key>subscriptionName</key>
<value/>
</entry>
</config>
<connection>
<href>api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25</href>
<id>894b2948-ce82-4e0a-9302-267d3482ae25</id>
<rel>connection</rel>
<title>jmsconnection</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>false</schedulable>
<sourceType>JMSSource</sourceType>
<sourceTypeDisplayName>JMS Source</sourceTypeDisplayName>
<topics>
<topic>
<href>api/projects/1/topics/6e9c0ae9-fce0-4219-9e58-639af4e79daa</href>
<id>6e9c0ae9-fce0-4219-9e58-639af4e79daa</id>
<objectType>topics</objectType>
<title>jmstopic</title>
</topic>
</topics>
</source>
Response Code : 201 Created

Sources 129
Update JMS Source
Use the PUT method to update a JMS source in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates a JMS source in a RulePoint
application:
PUT http://localhost:8080/rulepoint/api/projects/1/sources/f9a382cd-fb73-4165-bbaa-
f05f40303b5d
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "ActiveMQSource",
"sourceType": "JMSSource",
"schedulable": false,
"config": {
"clientAcknowledgeMode": "AUTO_ACKNOWLEDGE",
"clientId": "",
"destination": "jmsQueue",
"messageSelector": "",
"subscriptionName": ""
},
"topics": [
{
"href": "api/projects/1/topics/6e9c0ae9-fce0-4219-9e58-639af4e79daa",
"title": "jmstopic",
"objectType": "topics",
"id": "6e9c0ae9-fce0-4219-9e58-639af4e79daa"
}
],
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25",
"title": "jmsconnection",
"id": "894b2948-ce82-4e0a-9302-267d3482ae25"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {

},
"marshallerThreadsafe": false
}

PUT Response in JSON Format


Returns the JMS source object and source code. Returns the error object if an error occurs.
{
"id": "f9a382cd-fb73-4165-bbaa-f05f40303b5d",
"name": "ActiveMQSource",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/sources/f9a382cd-fb73-4165-bbaa-f05f40303b5d",
"title": "ActiveMQSource",
"id": "f9a382cd-fb73-4165-bbaa-f05f40303b5d"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/sources/f9a382cd-fb73-4165-bbaa-f05f40303b5d",
"type": "PUT",
"title": "Edit"

130 Chapter 6: Sample XML and JSON Requests and Responses


},
{
"rel": "delete",
"href": "api/projects/1/sources/f9a382cd-fb73-4165-bbaa-f05f40303b5d",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/sources/f9a382cd-fb73-4165-bbaa-f05f40303b5d/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "sources",
"lastModifiedDate": "2013-08-23T15:19:28+05:30",
"createDate": "2013-08-23T15:19:28+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"sourceType": "JMSSource",
"sourceTypeDisplayName": "JMS Source",
"schedulable": false,
"config": {
"clientAcknowledgeMode": "AUTO_ACKNOWLEDGE",
"clientId": "",
"destination": "jmsQueue",
"messageSelector": "",
"subscriptionName": ""
},
"topics": [
{
"href": "api/projects/1/topics/6e9c0ae9-fce0-4219-9e58-639af4e79daa",
"title": "jmstopic",
"objectType": "topics",
"id": "6e9c0ae9-fce0-4219-9e58-639af4e79daa"
}
],
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25",
"title": "jmsconnection",
"id": "894b2948-ce82-4e0a-9302-267d3482ae25"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code: 200 OK

Sources 131
PUT Request in XML Format
Generate a PUT request. For example, the following PUT request updates a JMS source in a RulePoint
application:
PUT http://localhost:8080/rulepoint/api/projects/1/sources/f9a382cd-fb73-4165-bbaa-
f05f40303b5d
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<name>jmssource</name>
<type>sources</type>
<config>
<entry>
<key>clientAcknowledgeMode</key>
<value>AUTO_ACKNOWLEDGE</value>
</entry>
<entry>
<key>clientId</key>
<value/>
</entry>
<entry>
<key>destination</key>
<value>jmsQueue</value>
</entry>
<entry>
<key>messageSelector</key>
<value/>
</entry>
<entry>
<key>subscriptionName</key>
<value/>
</entry>
</config>
<connection>
<href>api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25</href>
<id>894b2948-ce82-4e0a-9302-267d3482ae25</id>
<rel>connection</rel>
<title>jmsconnection</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>false</schedulable>
<sourceType>JMSSource</sourceType>
<sourceTypeDisplayName>JMS Source</sourceTypeDisplayName>
<topics>
<topic>
<href>api/projects/1/topics/6e9c0ae9-fce0-4219-9e58-639af4e79daa</href>
<id>6e9c0ae9-fce0-4219-9e58-639af4e79daa</id>
<objectType>topics</objectType>
<title>jmstopic</title>
</topic>
</topics>
</source>

PUT Response in XML Format


Returns the JMS source object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<acl>
<href>api/projects/1/sources/f9a382cd-fb73-4165-bbaa-f05f40303b5d/acl</href>
<rel>acl</rel>

132 Chapter 6: Sample XML and JSON Requests and Responses


<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/sources/f9a382cd-fb73-4165-bbaa-f05f40303b5d</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/sources/f9a382cd-fb73-4165-bbaa-f05f40303b5d</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/deploy</href>
<rel>deploy</rel>
<title>Deploy</title>
<type>POST</type>
</action>
</actions>
<id>f9a382cd-fb73-4165-bbaa-f05f40303b5d</id>
<links/>
<name>jmssource</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/sources/f9a382cd-fb73-4165-bbaa-f05f40303b5d</href>
<id>f9a382cd-fb73-4165-bbaa-f05f40303b5d</id>
<rel>self</rel>
<title>jmssource</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>sources</type>
<config>
<entry>
<key>clientAcknowledgeMode</key>
<value>AUTO_ACKNOWLEDGE</value>
</entry>
<entry>
<key>clientId</key>
<value/>
</entry>
<entry>
<key>destination</key>
<value>jmsQueue</value>
</entry>
<entry>
<key>messageSelector</key>
<value/>
</entry>
<entry>
<key>subscriptionName</key>
<value/>
</entry>
</config>
<connection>
<href>api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25</href>

Sources 133
<id>894b2948-ce82-4e0a-9302-267d3482ae25</id>
<rel>connection</rel>
<title>jmsconnection</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>false</schedulable>
<sourceType>JMSSource</sourceType>
<sourceTypeDisplayName>JMS Source</sourceTypeDisplayName>
<topics>
<topic>
<href>api/projects/1/topics/6e9c0ae9-fce0-4219-9e58-639af4e79daa</href>
<id>6e9c0ae9-fce0-4219-9e58-639af4e79daa</id>
<objectType>topics</objectType>
<title>jmstopic</title>
</topic>
</topics>
</source>
Response Code : 200 OK

Delete JMS Source


Use the DELETE method to delete a JMS source in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes a JMS source in a RulePoint
application:
DELETE http://localhost:8080/rulepoint/api/projects/1/sources/f9a382cd-fb73-4165-bbaa-
f05f40303b5d
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes a JMS source in a RulePoint
application:
DELETE http://localhost:8080/rulepoint/api/projects/1/sources/f9a382cd-fb73-4165-bbaa-
f05f40303b5d
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

134 Chapter 6: Sample XML and JSON Requests and Responses


RSS Reader Source
Use the examples to create, update, or delete an RSS Reader source.

Create RSS Reader Source


Use the POST method to create an RSS Reader source in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following PUT request creates an RSS Reader source in a
RulePoint application:
POST http://localhost:8080/rulepoint/api/projects/1/sources
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "RssReaderSource2",
"valid": true,
"sourceType": "rss",
"connection": null,
"topics": [
{
"href": "api/projects/1/topics/906b6070-43ba-4735-99e4-e9a0e4c5fbb5",
"title": "RssReaderTopic1",
"objectType": "topics",
"id": "906b6070-43ba-4735-99e4-e9a0e4c5fbb5"
}
],
"config": {
"username": null,
"mostRecentEventDate": "1979-11-24 11:00:00 +0530",
"markerId": null,
"propertyMetadataMap": null,
"url": "http://invr28cep46:8080/CepQeRssServices/hello_dynfeed",
"password": null
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}

POST Response in JSON Format


Returns the RSS Reader source object and response code. Returns the error object if an error occurs.
{
"id": "b2448a99-92d3-46b4-9c91-b2055449e801",
"name": "RssReaderSource2",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801",
"title": "RssReaderSource2",
"id": "b2448a99-92d3-46b4-9c91-b2055449e801"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801",
"type": "PUT",

Sources 135
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createSchedule",
"href": "api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "sources",
"lastModifiedDate": "2013-09-13T20:52:52+05:30",
"createDate": "2013-09-13T16:10:38+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"sourceType": "rss",
"sourceTypeDisplayName": "RSS/Atom Source",
"schedulable": true,
"config": {
"username": "",
"mostRecentEventDate": "1979-11-24 11:00:00 +0530",
"markerId": "",
"password": null,
"propertyMetadataMap": null,
"url": "http://invr28cep46:8080/CepQeRssServices/hello_dynfeed"
},
"topics": [
{
"href": "api/projects/1/topics/906b6070-43ba-4735-99e4-e9a0e4c5fbb5",
"title": "RssReaderTopic1",
"objectType": "topics",
"id": "906b6070-43ba-4735-99e4-e9a0e4c5fbb5"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code: 201 Created

136 Chapter 6: Sample XML and JSON Requests and Responses


POST Request in XML Format
Generate a POST request. For example, the following POST request creates an RSS Reader source in a
RulePoint application:
POST http:/localhost:8080/rulepoint/api/projects/1/sources
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<name>RssReaderSource2</name>
<type>sources</type>
<config>
<entry>
<key>username</key>
<value/>
</entry>
<entry>
<key>mostRecentEventDate</key>
<value>1979-11-24 11:00:00 +0530</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>password</key>
</entry>
<entry>
<key>propertyMetadataMap</key>
</entry>
<entry>
<key>url</key>
<value>http://invr28cep46:8080/CepQeRssServices/hello_dynfeed</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<schedules>
<href>api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801/schedules/
4166</href>
<id>4166</id>
<rel>schedules</rel>
</schedules>
<sourceType>rss</sourceType>
<topics>
<topic>
<href>api/projects/1/topics/906b6070-43ba-4735-99e4-e9a0e4c5fbb5</href>
<id>906b6070-43ba-4735-99e4-e9a0e4c5fbb5</id>
<objectType>topics</objectType>
<title>RssReaderTopic1</title>
</topic>
</topics>
</source>

POST Response in XML Format


Returns the RSS Reader source object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<acl>
<href>api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801/acl</href>
<rel>acl</rel>

Sources 137
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/deploy</href>
<rel>deploy</rel>
<title>Deploy</title>
<type>POST</type>
</action>
<action>
<href>api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801/schedules</
href>
<rel>createSchedule</rel>
<title>Create Schedule</title>
<type>POST</type>
</action>
</actions>
<id>b2448a99-92d3-46b4-9c91-b2055449e801</id>
<links/>
<name>RssReaderSource2</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801</href>
<id>b2448a99-92d3-46b4-9c91-b2055449e801</id>
<rel>self</rel>
<title>RssReaderSource2</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>sources</type>
<config>
<entry>
<key>username</key>
<value/>
</entry>
<entry>
<key>mostRecentEventDate</key>
<value>1979-11-24 11:00:00 +0530</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>password</key>
</entry>
<entry>

138 Chapter 6: Sample XML and JSON Requests and Responses


<key>propertyMetadataMap</key>
</entry>
<entry>
<key>url</key>
<value>http://invr28cep46:8080/CepQeRssServices/hello_dynfeed</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<sourceType>rss</sourceType>
<sourceTypeDisplayName>RSS/Atom Source</sourceTypeDisplayName>
<topics>
<topic>
<href>api/projects/1/topics/906b6070-43ba-4735-99e4-e9a0e4c5fbb5</href>
<id>906b6070-43ba-4735-99e4-e9a0e4c5fbb5</id>
<objectType>topics</objectType>
<title>RssReaderTopic1</title>
</topic>
</topics>
</source>
Response Code : 201 Created

Update RSS Reader Source


Use the PUT method to update an RSS Reader source in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates an RSS Reader source in a
RulePoint application:
PUT http://localhost:8080/rulepoint/api/projects/1/sources/b2448a99-92d3-46b4-9c91-
b2055449e801
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "MyRssReaderSource",
"valid": true,
"sourceType": "rss",
"connection": null,
"topics": [
{
"href": "api/projects/1/topics/906b6070-43ba-4735-99e4-e9a0e4c5fbb5",
"title": "RssReaderTopic1",
"objectType": "topics",
"id": "906b6070-43ba-4735-99e4-e9a0e4c5fbb5"
}
],
"config": {
"username": null,
"mostRecentEventDate": "1979-11-24 11:00:00 +0530",
"markerId": null,
"propertyMetadataMap": null,
"url": "http://invr28cep46:8080/CepQeRssServices/hello_dynfeed",
"password": null
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false

Sources 139
}
}

PUT Response in JSON Format


Returns the RSS Reader source object and source code 200 OK. Returns the error object if an error occurs.
{
"id": "b2448a99-92d3-46b4-9c91-b2055449e801",
"name": "MyRssReaderSource",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801",
"title": "MyRssReaderSource",
"id": "b2448a99-92d3-46b4-9c91-b2055449e801"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createSchedule",
"href": "api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "sources",
"lastModifiedDate": "2013-09-13T20:52:52+05:30",
"createDate": "2013-09-13T16:10:38+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"sourceType": "rss",
"sourceTypeDisplayName": "RSS/Atom Source",
"schedulable": true,
"config": {
"username": "",
"mostRecentEventDate": "1979-11-24 11:00:00 +0530",
"markerId": "",

140 Chapter 6: Sample XML and JSON Requests and Responses


"password": null,
"propertyMetadataMap": null,
"url": "http://invr28cep46:8080/CepQeRssServices/hello_dynfeed"
},
"topics": [
{
"href": "api/projects/1/topics/906b6070-43ba-4735-99e4-e9a0e4c5fbb5",
"title": "RssReaderTopic1",
"objectType": "topics",
"id": "906b6070-43ba-4735-99e4-e9a0e4c5fbb5"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code: 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates an RSS Reader source in a
RulePoint application:
PUT http://localhost:8080/rulepoint/api/projects/1/sources/b2448a99-92d3-46b4-9c91-
b2055449e801
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<name>RssReaderSource2</name>
<type>sources</type>
<config>
<entry>
<key>username</key>
<value/>
</entry>
<entry>
<key>mostRecentEventDate</key>
<value>1979-11-24 11:00:00 +0530</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>password</key>
</entry>
<entry>
<key>propertyMetadataMap</key>
</entry>
<entry>
<key>url</key>
<value>http://invr28cep46:8080/CepQeRssServices/hello_dynfeed</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<schedules>
<href>api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801/schedules/
4166</href>
<id>4166</id>

Sources 141
<rel>schedules</rel>
</schedules>
<sourceType>rss</sourceType>
<topics>
<topic>
<href>api/projects/1/topics/906b6070-43ba-4735-99e4-e9a0e4c5fbb5</href>
<id>906b6070-43ba-4735-99e4-e9a0e4c5fbb5</id>
<objectType>topics</objectType>
<title>RssReaderTopic1</title>
</topic>
</topics>
</source>

PUT Response in XML Format


Returns the RSS Reader source object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<acl>
<href>api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/deploy</href>
<rel>deploy</rel>
<title>Deploy</title>
<type>POST</type>
</action>
<action>
<href>api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801/schedules</
href>
<rel>createSchedule</rel>
<title>Create Schedule</title>
<type>POST</type>
</action>
</actions>
<id>b2448a99-92d3-46b4-9c91-b2055449e801</id>
<links/>
<name>RssReaderSource2</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/sources/b2448a99-92d3-46b4-9c91-b2055449e801</href>
<id>b2448a99-92d3-46b4-9c91-b2055449e801</id>
<rel>self</rel>
<title>RssReaderSource2</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>

142 Chapter 6: Sample XML and JSON Requests and Responses


<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>sources</type>
<config>
<entry>
<key>username</key>
<value/>
</entry>
<entry>
<key>mostRecentEventDate</key>
<value>1979-11-24 11:00:00 +0530</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>password</key>
</entry>
<entry>
<key>propertyMetadataMap</key>
</entry>
<entry>
<key>url</key>
<value>http://invr28cep46:8080/CepQeRssServices/hello_dynfeed</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<sourceType>rss</sourceType>
<sourceTypeDisplayName>RSS/Atom Source</sourceTypeDisplayName>
<topics>
<topic>
<href>api/projects/1/topics/906b6070-43ba-4735-99e4-e9a0e4c5fbb5</href>
<id>906b6070-43ba-4735-99e4-e9a0e4c5fbb5</id>
<objectType>topics</objectType>
<title>RssReaderTopic1</title>
</topic>
</topics>
</source>
Response Code : 200 OK

Delete RSS Reader Source


Use the DELETE method to delete an RSS Reader source in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes an RSS Reader source in a
RulePoint application:
DELETE http://localhost:8080/rulepoint/api/projects/1/sources/b2448a99-92d3-46b4-9c91-
b2055449e801
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

Sources 143
DELETE Request in XML Format
Generate a DELETE request. For example, the following DELETE request deletes an RSS Reader source in a
RulePoint application:
DELETE http://localhost:8080/rulepoint/api/projects/1/sources/b2448a99-92d3-46b4-9c91-
b2055449e801
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

URL Monitoring Source


Use the examples to create, update, or delete a URL monitoring source.

Create URL Monitoring Source


Use the POST method to update a URL Monitoring source in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates a URL Monitoring source in a
RulePoint application:
POST http://localhost:8080/rulepoint/api/projects/1/sources
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "UrlSource1",
"valid": true,
"sourceType": "http",
"connection": null,
"topics": [
{
"href": "api/projects/1/topics/b520f860-dd9f-4d46-bb69-72247e4c7ded",
"title": "UrlTopic1",
"objectType": "topics",
"id": "b520f860-dd9f-4d46-bb69-72247e4c7ded"
}
],
"config": {
"markerId": null,
"propertyMetadataMap": "*",
"url": "http://invr28cep46:8080/CepQeRestServices/current_time"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}

POST Response in JSON Format


Returns the URL Monitoring source object and response code. Returns the error object if an error occurs.
{
"id": "273b895c-c967-4f6b-ac86-f84b201bdaff",
"name": "UrlSource1",

144 Chapter 6: Sample XML and JSON Requests and Responses


"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/sources/273b895c-c967-4f6b-ac86-f84b201bdaff",
"title": "UrlSource1",
"id": "273b895c-c967-4f6b-ac86-f84b201bdaff"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/sources/273b895c-c967-4f6b-ac86-f84b201bdaff",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/sources/273b895c-c967-4f6b-ac86-f84b201bdaff",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createSchedule",
"href": "api/projects/1/sources/273b895c-c967-4f6b-ac86-f84b201bdaff/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/sources/273b895c-c967-4f6b-ac86-f84b201bdaff/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "sources",
"lastModifiedDate": "2013-09-13T21:53:34+05:30",
"createDate": "2013-09-13T16:10:38+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"sourceType": "http",
"sourceTypeDisplayName": "URL Monitoring Source",
"schedulable": true,
"config": {
"markerId": "",
"propertyMetadataMap": "*",
"url": "http://invr28cep46:8080/CepQeRestServices/current_time"
},
"topics": [
{
"href": "api/projects/1/topics/b520f860-dd9f-4d46-bb69-72247e4c7ded",
"title": "UrlTopic1",
"objectType": "topics",
"id": "b520f860-dd9f-4d46-bb69-72247e4c7ded"
}
],
"marshaller": {

Sources 145
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code: 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates a URL Monitoring source in a
RulePoint application:
POST http://localhost:8080/rulepoint/api/projects/1/sources
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<name>UrlSource1</name>
<type>sources</type>
<config>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>propertyMetadataMap</key>
<value>*</value>
</entry>
<entry>
<key>url</key>
<value>http://invr28cep46:8080/CepQeRestServices/current_time</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<sourceType>http</sourceType>
<topics>
<topic>
<href>api/projects/1/topics/b520f860-dd9f-4d46-bb69-72247e4c7ded</href>
<id>b520f860-dd9f-4d46-bb69-72247e4c7ded</id>
<objectType>topics</objectType>
<title>UrlTopic1</title>
</topic>
</topics>
</source>

POST Response in XML Format


Returns the URL Monitoring source object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<acl>
<href>api/projects/1/sources/273b895c-c967-4f6b-ac86-f84b201bdaff/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/sources/273b895c-c967-4f6b-ac86-f84b201bdaff</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>

146 Chapter 6: Sample XML and JSON Requests and Responses


</action>
<action>
<href>api/projects/1/sources/273b895c-c967-4f6b-ac86-f84b201bdaff</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/deploy</href>
<rel>deploy</rel>
<title>Deploy</title>
<type>POST</type>
</action>
<action>
<href>api/projects/1/sources/273b895c-c967-4f6b-ac86-f84b201bdaff/schedules</
href>
<rel>createSchedule</rel>
<title>Create Schedule</title>
<type>POST</type>
</action>
</actions>
<id>273b895c-c967-4f6b-ac86-f84b201bdaff</id>
<links/>
<name>UrlSource1</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/sources/273b895c-c967-4f6b-ac86-f84b201bdaff</href>
<id>273b895c-c967-4f6b-ac86-f84b201bdaff</id>
<rel>self</rel>
<title>UrlSource1</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>sources</type>
<config>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>propertyMetadataMap</key>
<value>*</value>
</entry>
<entry>
<key>url</key>
<value>http://invr28cep46:8080/CepQeRestServices/current_time</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<sourceType>http</sourceType>
<sourceTypeDisplayName>URL Monitoring Source</sourceTypeDisplayName>
<topics>
<topic>
<href>api/projects/1/topics/b520f860-dd9f-4d46-bb69-72247e4c7ded</href>
<id>b520f860-dd9f-4d46-bb69-72247e4c7ded</id>

Sources 147
<objectType>topics</objectType>
<title>UrlTopic1</title>
</topic>
</topics>
</source>
Response Code : 201 Created

Update URL Monitoring Source


Use the PUT method to update a URL Monitoring source in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates a URL monitoring source in a
RulePoint application:
PUT http://localhost:8080/rulepoint/api/projects/1/sources/273b895c-c967-4f6b-ac86-
f84b201bdaff
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "MyUrlMonitoringSource",
"valid": true,
"sourceType": "http",
"connection": null,
"topics": [
{
"href": "api/projects/1/topics/b520f860-dd9f-4d46-bb69-72247e4c7ded",
"title": "UrlTopic1",
"objectType": "topics",
"id": "b520f860-dd9f-4d46-bb69-72247e4c7ded"
}
],
"config": {
"markerId": null,
"propertyMetadataMap": "*",
"url": "http://invr28cep46:8080/CepQeRestServices/current_time"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}

PUT Response in JSON Format


Returns the URL Monitoring source object and source code 200 OK. Returns the error object if an error
occurs.
{
"id": "273b895c-c967-4f6b-ac86-f84b201bdaff",
"name": "MyUrlMonitoringSource",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/sources/273b895c-c967-4f6b-ac86-f84b201bdaff",
"title": "MyUrlMonitoringSource",
"id": "273b895c-c967-4f6b-ac86-f84b201bdaff"
},
"actions": [
{
"rel": "update",

148 Chapter 6: Sample XML and JSON Requests and Responses


"href": "api/projects/1/sources/273b895c-c967-4f6b-ac86-f84b201bdaff",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/sources/273b895c-c967-4f6b-ac86-f84b201bdaff",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createSchedule",
"href": "api/projects/1/sources/273b895c-c967-4f6b-ac86-f84b201bdaff/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/sources/273b895c-c967-4f6b-ac86-f84b201bdaff/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "sources",
"lastModifiedDate": "2013-09-13T21:53:34+05:30",
"createDate": "2013-09-13T16:10:38+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"sourceType": "http",
"sourceTypeDisplayName": "URL Monitoring Source",
"schedulable": true,
"config": {
"markerId": "",
"propertyMetadataMap": "*",
"url": "http://invr28cep46:8080/CepQeRestServices/current_time"
},
"topics": [
{
"href": "api/projects/1/topics/b520f860-dd9f-4d46-bb69-72247e4c7ded",
"title": "UrlTopic1",
"objectType": "topics",
"id": "b520f860-dd9f-4d46-bb69-72247e4c7ded"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code: 200 OK

Sources 149
PUT Request in XML Format
Generate a PUT request. For example, the following PUT request updates a URL monitoring source in a
RulePoint application:
PUT http://localhost:8080/rulepoint/api/projects/1/sources/273b895c-c967-4f6b-ac86-
f84b201bdaff
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<name>UrlSource1</name>
<type>sources</type>
<config>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>propertyMetadataMap</key>
<value>*</value>
</entry>
<entry>
<key>url</key>
<value>http://invr28cep46:8080/CepQeRestServices/current_time</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<sourceType>http</sourceType>
<topics>
<topic>
<href>api/projects/1/topics/b520f860-dd9f-4d46-bb69-72247e4c7ded</href>
<id>b520f860-dd9f-4d46-bb69-72247e4c7ded</id>
<objectType>topics</objectType>
<title>UrlTopic1</title>
</topic>
</topics>
</source>

PUT Response in XML Format


Returns the URL Monitoring source object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<acl>
<href>api/projects/1/sources/273b895c-c967-4f6b-ac86-f84b201bdaff/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/sources/273b895c-c967-4f6b-ac86-f84b201bdaff</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/sources/273b895c-c967-4f6b-ac86-f84b201bdaff</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>

150 Chapter 6: Sample XML and JSON Requests and Responses


<action>
<href>api/projects/1/deploy</href>
<rel>deploy</rel>
<title>Deploy</title>
<type>POST</type>
</action>
<action>
<href>api/projects/1/sources/273b895c-c967-4f6b-ac86-f84b201bdaff/schedules</
href>
<rel>createSchedule</rel>
<title>Create Schedule</title>
<type>POST</type>
</action>
</actions>
<id>273b895c-c967-4f6b-ac86-f84b201bdaff</id>
<links/>
<name>UrlSource1</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/sources/273b895c-c967-4f6b-ac86-f84b201bdaff</href>
<id>273b895c-c967-4f6b-ac86-f84b201bdaff</id>
<rel>self</rel>
<title>UrlSource1</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>sources</type>
<config>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>propertyMetadataMap</key>
<value>*</value>
</entry>
<entry>
<key>url</key>
<value>http://invr28cep46:8080/CepQeRestServices/current_time</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<sourceType>http</sourceType>
<sourceTypeDisplayName>URL Monitoring Source</sourceTypeDisplayName>
<topics>
<topic>
<href>api/projects/1/topics/b520f860-dd9f-4d46-bb69-72247e4c7ded</href>
<id>b520f860-dd9f-4d46-bb69-72247e4c7ded</id>
<objectType>topics</objectType>
<title>UrlTopic1</title>
</topic>
</topics>
</source>
Response Code : 200 OK

Sources 151
Delete URL Monitoring Source
Use the DELETE method to delete a URL Monitoring source in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes a URL monitoring source in a
RulePoint application:
DELETE http://localhost:8080/rulepoint/api/projects/1/sources/273b895c-c967-4f6b-ac86-
f84b201bdaff
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes a URL monitoring source in a
RulePoint application:
DELETE http://localhost:8080/rulepoint/api/projects/1/sources/273b895c-c967-4f6b-ac86-
f84b201bdaff
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

Web Page Monitoring Source


Use the examples to create, update, or delete a web page monitoring source.

Create Web Page Monitoring Source


Use the POST method to update a Web Page Monitoring source in RulePoint.

POST Request in JSON Format


To create a Web Page Monitoring source in a RulePoint application, generate the following POST request:
POST http://localhost:8080/rulepoint/api/projects/1/sources
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "WebMonitorSource1",
"valid": true,
"sourceType": "http_monitor",
"connection": null,
"topics": [
{
"href": "api/projects/1/topics/708cb0ee-c8c3-4265-93a3-bb282258acc1",
"title": "WebMonitorTopic1",
"objectType": "topics",
"id": "708cb0ee-c8c3-4265-93a3-bb282258acc1"
}
],
"config": {
"markerId": null,
"propertyMetadataMap": "*",
"url": "http://invr28cep46:8080/CepQeRestServices/current_time"

152 Chapter 6: Sample XML and JSON Requests and Responses


},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}

POST Response in JSON Format


Returns the Web Page Monitoring source object and response code 201 OK. Returns the error object if an
error occurs.
{
"id": "307e9a44-9768-4922-b29b-ae09053cd7e9",
"name": "WebMonitorSource1",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9",
"title": "WebMonitorSource1",
"id": "307e9a44-9768-4922-b29b-ae09053cd7e9"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createSchedule",
"href": "api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "sources",
"lastModifiedDate": "2013-09-13T21:20:22+05:30",
"createDate": "2013-09-13T16:10:38+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"sourceType": "http_monitor",

Sources 153
"sourceTypeDisplayName": "Web Page Monitor",
"schedulable": true,
"config": {
"markerId": "",
"propertyMetadataMap": "*",
"url": "http://invr28cep46:8080/CepQeRestServices/current_time"
},
"topics": [
{
"href": "api/projects/1/topics/708cb0ee-c8c3-4265-93a3-bb282258acc1",
"title": "WebMonitorTopic1",
"objectType": "topics",
"id": "708cb0ee-c8c3-4265-93a3-bb282258acc1"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code: 201 Created

POST Request in XML Format


POST http://localhost:8080/rulepoint/api/projects/1/sources
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<name>WebMonitorSource1</name>
<type>sources</type>
<config>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>propertyMetadataMap</key>
<value>*</value>
</entry>
<entry>
<key>url</key>
<value>http://invr28cep46:8080/CepQeRestServices/current_time</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<schedules>
<href>api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9/schedules/
4167</href>
<id>4167</id>
<rel>schedules</rel>
</schedules>
<sourceType>http_monitor</sourceType>
<topics>
<topic>
<href>api/projects/1/topics/708cb0ee-c8c3-4265-93a3-bb282258acc1</href>
<id>708cb0ee-c8c3-4265-93a3-bb282258acc1</id>
<objectType>topics</objectType>
<title>WebMonitorTopic1</title>
</topic>

154 Chapter 6: Sample XML and JSON Requests and Responses


</topics>
</source>

POST Response in XML Format


Returns the Web Page Monitoring source object and response code. Returns the error object if an error
occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<acl>
<href>api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/deploy</href>
<rel>deploy</rel>
<title>Deploy</title>
<type>POST</type>
</action>
<action>
<href>api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9/schedules</
href>
<rel>createSchedule</rel>
<title>Create Schedule</title>
<type>POST</type>
</action>
</actions>
<id>307e9a44-9768-4922-b29b-ae09053cd7e9</id>
<links/>
<name>WebMonitorSource1</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9</href>
<id>307e9a44-9768-4922-b29b-ae09053cd7e9</id>
<rel>self</rel>
<title>WebMonitorSource1</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>sources</type>
<config>
<entry>
<key>markerId</key>
<value/>

Sources 155
</entry>
<entry>
<key>propertyMetadataMap</key>
<value>*</value>
</entry>
<entry>
<key>url</key>
<value>http://invr28cep46:8080/CepQeRestServices/current_time</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<sourceType>http_monitor</sourceType>
<sourceTypeDisplayName>Web Page Monitor</sourceTypeDisplayName>
<topics>
<topic>
<href>api/projects/1/topics/708cb0ee-c8c3-4265-93a3-bb282258acc1</href>
<id>708cb0ee-c8c3-4265-93a3-bb282258acc1</id>
<objectType>topics</objectType>
<title>WebMonitorTopic1</title>
</topic>
</topics>
</source>
Response Code : 201 Created

Update Web Page Monitoring Source


Use the PUT method to update a Web Page Monitoring source in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates a Web Page Monitoring source in a
RulePoint application:
PUT http://localhost:8080/rulepoint/api/projects/1/sources/307e9a44-9768-4922-b29b-
ae09053cd7e9
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "MyWebPageMonitorSource",
"valid": true,
"sourceType": "http_monitor",
"connection": null,
"topics": [
{
"href": "api/projects/1/topics/708cb0ee-c8c3-4265-93a3-bb282258acc1",
"title": "WebMonitorTopic1",
"objectType": "topics",
"id": "708cb0ee-c8c3-4265-93a3-bb282258acc1"
}
],
"config": {
"markerId": null,
"propertyMetadataMap": "*",
"url": "http://invr28cep46:8080/CepQeRestServices/current_time"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false

156 Chapter 6: Sample XML and JSON Requests and Responses


}
}

PUT Response in JSON Format


Returns the Web Page Monitoring source object and source code. Returns the error object if an error occurs.
{
"id": "307e9a44-9768-4922-b29b-ae09053cd7e9",
"name": "MyWebPageMonitorSource",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9",
"title": "MyWebPageMonitorSource",
"id": "307e9a44-9768-4922-b29b-ae09053cd7e9"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createSchedule",
"href": "api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "sources",
"lastModifiedDate": "2013-09-13T21:20:22+05:30",
"createDate": "2013-09-13T16:10:38+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"sourceType": "http_monitor",
"sourceTypeDisplayName": "Web Page Monitor",
"schedulable": true,
"config": {
"markerId": "",
"propertyMetadataMap": "*",
"url": "http://invr28cep46:8080/CepQeRestServices/current_time"

Sources 157
},
"topics": [
{
"href": "api/projects/1/topics/708cb0ee-c8c3-4265-93a3-bb282258acc1",
"title": "WebMonitorTopic1",
"objectType": "topics",
"id": "708cb0ee-c8c3-4265-93a3-bb282258acc1"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code: 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates a Web Page Monitoring source in a
RulePoint application:
PUT http://localhost:8080/rulepoint/api/projects/1/sources/307e9a44-9768-4922-b29b-
ae09053cd7e9
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<name>WebMonitorSource1</name>
<type>sources</type>
<config>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>propertyMetadataMap</key>
<value>*</value>
</entry>
<entry>
<key>url</key>
<value>http://invr28cep46:8080/CepQeRestServices/current_time</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<schedules>
<href>api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9/schedules/
4167</href>
<id>4167</id>
<rel>schedules</rel>
</schedules>
<sourceType>http_monitor</sourceType>
<topics>
<topic>
<href>api/projects/1/topics/708cb0ee-c8c3-4265-93a3-bb282258acc1</href>
<id>708cb0ee-c8c3-4265-93a3-bb282258acc1</id>
<objectType>topics</objectType>
<title>WebMonitorTopic1</title>
</topic>
</topics>
</source>

158 Chapter 6: Sample XML and JSON Requests and Responses


PUT Response in XML Format
Returns the Web Page Monitoring source object and response code. Returns the error object if an error
occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<acl>
<href>api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/deploy</href>
<rel>deploy</rel>
<title>Deploy</title>
<type>POST</type>
</action>
<action>
<href>api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9/schedules</
href>
<rel>createSchedule</rel>
<title>Create Schedule</title>
<type>POST</type>
</action>
</actions>
<id>307e9a44-9768-4922-b29b-ae09053cd7e9</id>
<links/>
<name>WebMonitorSource1</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/sources/307e9a44-9768-4922-b29b-ae09053cd7e9</href>
<id>307e9a44-9768-4922-b29b-ae09053cd7e9</id>
<rel>self</rel>
<title>WebMonitorSource1</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>sources</type>
<config>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>propertyMetadataMap</key>

Sources 159
<value>*</value>
</entry>
<entry>
<key>url</key>
<value>http://invr28cep46:8080/CepQeRestServices/current_time</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<sourceType>http_monitor</sourceType>
<sourceTypeDisplayName>Web Page Monitor</sourceTypeDisplayName>
<topics>
<topic>
<href>api/projects/1/topics/708cb0ee-c8c3-4265-93a3-bb282258acc1</href>
<id>708cb0ee-c8c3-4265-93a3-bb282258acc1</id>
<objectType>topics</objectType>
<title>WebMonitorTopic1</title>
</topic>
</topics>
</source>
Response Code : 200 OK

Delete Web Page Monitoring Source


Use the DELETE method to delete a Web Page Monitoring source in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes a Web Page Monitoring
source in a RulePoint application:
DELETE http://localhost:8080/rulepoint/api/projects/1/sources/307e9a44-9768-4922-b29b-
ae09053cd7e9
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes a Web Page Monitoring
source in a RulePoint application:
DELETE http://localhost:8080/rulepoint/api/projects/1/sources/307e9a44-9768-4922-b29b-
ae09053cd7e9
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

160 Chapter 6: Sample XML and JSON Requests and Responses


Web Service Source
Use the examples to create, update, or delete a web service source.

Create Web Service Source


Use the POST method to create a Web Service source in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates a web service source in a
RulePoint application:
POST http://localhost:8080/rulepoint/api/projects/1/sources
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "WSSource2",
"valid": true,
"sourceType": "WebSourceService",
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052",
"title": "WsConnection1",
"id": "e9bcc9ae-8e78-4b2c-a3f4-48352e817052"
},
"topics": [
{
"href": "api/projects/1/topics/8cf9d31e-abd8-4045-89a9-f6d2206ce7a1",
"title": "WSTopic1",
"objectType": "topics",
"id": "8cf9d31e-abd8-4045-89a9-f6d2206ce7a1"
}
],
"config": {
"serviceName": "HelloWorldServices",
"operation": "hello",
"inputParameters": "hello.name=Rama",
"xpathExpr": "//return",
"markerId": "",
"propertyMetadataMap": "*"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}

POST Response in JSON Format


Returns the Web Service source object and response code. Returns the error object if an error occurs.
{
"id": "c00cb582-cdba-4fc6-98a0-af2e066d4dc1",
"name": "WSSource2",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1",
"title": "WSSource2",
"id": "c00cb582-cdba-4fc6-98a0-af2e066d4dc1"
},

Sources 161
"actions": [
{
"rel": "update",
"href": "api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createSchedule",
"href": "api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "sources",
"lastModifiedDate": "2013-09-13T16:45:12+05:30",
"createDate": "2013-09-13T16:10:38+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"sourceType": "WebSourceService",
"sourceTypeDisplayName": "Web Service Source",
"schedulable": true,
"config": {
"operation": "hello",
"inputParameters": "hello.name=Rama",
"markerId": "",
"xpathExpr": "//return",
"propertyMetadataMap": "*",
"serviceName": "HelloWorldServices"
},
"topics": [
{
"href": "api/projects/1/topics/8cf9d31e-abd8-4045-89a9-f6d2206ce7a1",
"title": "WSTopic1",
"objectType": "topics",
"id": "8cf9d31e-abd8-4045-89a9-f6d2206ce7a1"
}
],
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052",
"title": "WsConnection1",
"id": "e9bcc9ae-8e78-4b2c-a3f4-48352e817052"

162 Chapter 6: Sample XML and JSON Requests and Responses


},
"schedules": [
{
"rel": "schedules",
"href": "api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/
schedules/4163",
"id": "4163"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code: 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates a web service source in a
RulePoint application:
POST http://localhost:8080/rulepoint/api/projects/1/sources
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<name>WSSource2</name>
<type>sources</type>
<config>
<entry>
<key>operation</key>
<value>hello</value>
</entry>
<entry>
<key>inputParameters</key>
<value>hello.name=Rama</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>xpathExpr</key>
<value>//return</value>
</entry>
<entry>
<key>propertyMetadataMap</key>
<value>*</value>
</entry>
<entry>
<key>serviceName</key>
<value>HelloWorldServices</value>
</entry>
</config>
<connection>
<href>api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052</href>
<id>e9bcc9ae-8e78-4b2c-a3f4-48352e817052</id>
<rel>connection</rel>
<title>WsConnection1</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>

Sources 163
<schedules>
<href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/schedules/
4163</href>
<id>4163</id>
<rel>schedules</rel>
</schedules>
<sourceType>WebSourceService</sourceType>
<topics>
<topic>
<href>api/projects/1/topics/8cf9d31e-abd8-4045-89a9-f6d2206ce7a1</href>
<id>8cf9d31e-abd8-4045-89a9-f6d2206ce7a1</id>
<objectType>topics</objectType>
<title>WSTopic1</title>
</topic>
</topics>
</source>

POST Response in XML Format


Returns the Web Service source object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<acl>
<href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/deploy</href>
<rel>deploy</rel>
<title>Deploy</title>
<type>POST</type>
</action>
<action>
<href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/schedules</
href>
<rel>createSchedule</rel>
<title>Create Schedule</title>
<type>POST</type>
</action>
</actions>
<id>c00cb582-cdba-4fc6-98a0-af2e066d4dc1</id>
<links/>
<name>WSSource2</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1</href>
<id>c00cb582-cdba-4fc6-98a0-af2e066d4dc1</id>
<rel>self</rel>
<title>WSSource2</title>
</self>
<valid>true</valid>

164 Chapter 6: Sample XML and JSON Requests and Responses


<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>sources</type>
<config>
<entry>
<key>operation</key>
<value>hello</value>
</entry>
<entry>
<key>inputParameters</key>
<value>hello.name=Rama</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>xpathExpr</key>
<value>//return</value>
</entry>
<entry>
<key>propertyMetadataMap</key>
<value>*</value>
</entry>
<entry>
<key>serviceName</key>
<value>HelloWorldServices</value>
</entry>
</config>
<connection>
<href>api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052</href>
<id>e9bcc9ae-8e78-4b2c-a3f4-48352e817052</id>
<rel>connection</rel>
<title>WsConnection1</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<schedules>
<href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/schedules/
4163</href>
<id>4163</id>
<rel>schedules</rel>
</schedules>
<sourceType>WebSourceService</sourceType>
<sourceTypeDisplayName>Web Service Source</sourceTypeDisplayName>
<topics>
<topic>
<href>api/projects/1/topics/8cf9d31e-abd8-4045-89a9-f6d2206ce7a1</href>
<id>8cf9d31e-abd8-4045-89a9-f6d2206ce7a1</id>
<objectType>topics</objectType>
<title>WSTopic1</title>
</topic>
</topics>
</source>
Response Code: 201 Created

Sources 165
Update Web Service Source
Use the PUT method to update a Web Service source in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates a web service source in a RulePoint
application:
PUT http://localhost:8080/rulepoint/api/projects/1/sources/c00cb582-cdba-4fc6-98a0-
af2e066d4dc1
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "MyWebServiceSource",
"valid": true,
"sourceType": "WebSourceService",
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052",
"title": "WsConnection1",
"id": "e9bcc9ae-8e78-4b2c-a3f4-48352e817052"
},
"topics": [
{
"href": "api/projects/1/topics/8cf9d31e-abd8-4045-89a9-f6d2206ce7a1",
"title": "WSTopic1",
"objectType": "topics",
"id": "8cf9d31e-abd8-4045-89a9-f6d2206ce7a1"
}
],
"config": {
"serviceName": "HelloWorldServices",
"operation": "hello",
"inputParameters": "hello.name=Rama",
"xpathExpr": "//return",
"markerId": "",
"propertyMetadataMap": "*"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}

PUT Response in JSON Format


Returns the Web Service source object and source code 200 OK. Returns the error object if an error occurs.
{
"id": "c00cb582-cdba-4fc6-98a0-af2e066d4dc1",
"name": "MyWebServiceSource",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1",
"title": "MyWebServiceSource",
"id": "c00cb582-cdba-4fc6-98a0-af2e066d4dc1"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1",
"type": "PUT",
"title": "Edit"

166 Chapter 6: Sample XML and JSON Requests and Responses


},
{
"rel": "delete",
"href": "api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createSchedule",
"href": "api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "sources",
"lastModifiedDate": "2013-09-13T16:45:12+05:30",
"createDate": "2013-09-13T16:10:38+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"sourceType": "WebSourceService",
"sourceTypeDisplayName": "Web Service Source",
"schedulable": true,
"config": {
"operation": "hello",
"inputParameters": "hello.name=Rama",
"markerId": "",
"xpathExpr": "//return",
"propertyMetadataMap": "*",
"serviceName": "HelloWorldServices"
},
"topics": [
{
"href": "api/projects/1/topics/8cf9d31e-abd8-4045-89a9-f6d2206ce7a1",
"title": "WSTopic1",
"objectType": "topics",
"id": "8cf9d31e-abd8-4045-89a9-f6d2206ce7a1"
}
],
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052",
"title": "WsConnection1",
"id": "e9bcc9ae-8e78-4b2c-a3f4-48352e817052"
},
"schedules": [
{
"rel": "schedules",
"href": "api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/
schedules/4163",

Sources 167
"id": "4163"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code: 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates a web service source in a RulePoint
application:
PUT http:/localhost:8080/rulepoint/api/projects/1/sources/c00cb582-cdba-4fc6-98a0-
af2e066d4dc1
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<name>WSSource2</name>
<type>sources</type>
<config>
<entry>
<key>operation</key>
<value>hello</value>
</entry>
<entry>
<key>inputParameters</key>
<value>hello.name=Rama</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>xpathExpr</key>
<value>//return</value>
</entry>
<entry>
<key>propertyMetadataMap</key>
<value>*</value>
</entry>
<entry>
<key>serviceName</key>
<value>HelloWorldServices</value>
</entry>
</config>
<connection>
<href>api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052</href>
<id>e9bcc9ae-8e78-4b2c-a3f4-48352e817052</id>
<rel>connection</rel>
<title>WsConnection1</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<schedules>
<href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/schedules/
4163</href>
<id>4163</id>
<rel>schedules</rel>

168 Chapter 6: Sample XML and JSON Requests and Responses


</schedules>
<sourceType>WebSourceService</sourceType>
<topics>
<topic>
<href>api/projects/1/topics/8cf9d31e-abd8-4045-89a9-f6d2206ce7a1</href>
<id>8cf9d31e-abd8-4045-89a9-f6d2206ce7a1</id>
<objectType>topics</objectType>
<title>WSTopic1</title>
</topic>
</topics>
</source>

PUT Response in XML Format


Returns the Web Service source object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<acl>
<href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/deploy</href>
<rel>deploy</rel>
<title>Deploy</title>
<type>POST</type>
</action>
<action>
<href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/schedules</
href>
<rel>createSchedule</rel>
<title>Create Schedule</title>
<type>POST</type>
</action>
</actions>
<id>c00cb582-cdba-4fc6-98a0-af2e066d4dc1</id>
<links/>
<name>WSSource2</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1</href>
<id>c00cb582-cdba-4fc6-98a0-af2e066d4dc1</id>
<rel>self</rel>
<title>WSSource2</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>

Sources 169
<lastModifiedDate/>
<predefined>false</predefined>
<type>sources</type>
<config>
<entry>
<key>operation</key>
<value>hello</value>
</entry>
<entry>
<key>inputParameters</key>
<value>hello.name=Rama</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>xpathExpr</key>
<value>//return</value>
</entry>
<entry>
<key>propertyMetadataMap</key>
<value>*</value>
</entry>
<entry>
<key>serviceName</key>
<value>HelloWorldServices</value>
</entry>
</config>
<connection>
<href>api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052</href>
<id>e9bcc9ae-8e78-4b2c-a3f4-48352e817052</id>
<rel>connection</rel>
<title>WsConnection1</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<schedules>
<href>api/projects/1/sources/c00cb582-cdba-4fc6-98a0-af2e066d4dc1/schedules/
4163</href>
<id>4163</id>
<rel>schedules</rel>
</schedules>
<sourceType>WebSourceService</sourceType>
<sourceTypeDisplayName>Web Service Source</sourceTypeDisplayName>
<topics>
<topic>
<href>api/projects/1/topics/8cf9d31e-abd8-4045-89a9-f6d2206ce7a1</href>
<id>8cf9d31e-abd8-4045-89a9-f6d2206ce7a1</id>
<objectType>topics</objectType>
<title>WSTopic1</title>
</topic>
</topics>
</source>
Response Code: 200 OK

170 Chapter 6: Sample XML and JSON Requests and Responses


Delete Web Service Source
Use the DELETE method to delete a Web Service source in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes a web service source in a
RulePoint application:
DELETE http://localhost:8080/rulepoint/api/projects/1/sources/c00cb582-cdba-4fc6-98a0-
af2e066d4dc1
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes a web service source in a
RulePoint application:
DELETE http://localhost:8080/rulepoint/api/projects/1/sources/c00cb582-cdba-4fc6-98a0-
af2e066d4dc1
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

Event Generator Source


Use the examples to create, update, or delete an event generator source.

Create Event Generator Source


Use the POST method to create an event generator source in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates an event generator source in a
RulePoint application:
POST http://localhost:8080/rulepoint/api/projects/65536/sources
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "EventGenerator1",
"valid": true,
"sourceType": "EventGeneratorSource",
"connection": null,
"topics": [
{
"href": "api/projects/65536/topics/5aeb5a2d-99dd-412b-be50-954e2e290b29",
"title": "event_gen_topic1",
"objectType": "topics",
"id": "5aeb5a2d-99dd-412b-be50-954e2e290b29"
},
{
"href": "api/projects/65536/topics/c7f1ffe2-3cd6-469a-bb4e-97d63287a1af",
"title": "event_gen_topic2",

Sources 171
"objectType": "topics",
"id": "c7f1ffe2-3cd6-469a-bb4e-97d63287a1af"
}
],
"config": {
"rate": "1",
"eventFilePath": "notest.xml",
"iterations": "1",
"dateFormat": "EEE, d MMM yyyy HH:mm:ss Z",
"markerId": null,
"delay": "-1",
"propertyMetadataMap": null,
"postAction": "do nothing"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}

POST Response in JSON Format


Returns the event generator source object and response code. Returns the error object if an error occurs.
{
"id": "36c660c6-4abf-493f-a268-81f7890d0ae4",
"name": "EventGenerator1",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4",
"title": "EventGenerator1",
"id": "36c660c6-4abf-493f-a268-81f7890d0ae4"
},
"actions": [
{
"rel": "update",
"href": "api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/65536/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createSchedule",
"href": "api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/65536",

172 Chapter 6: Sample XML and JSON Requests and Responses


"title": "docproj",
"id": "65536"
},
"type": "sources",
"lastModifiedDate": "2013-09-19T12:26:42+05:30",
"createDate": "2013-09-19T12:17:10+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"sourceType": "EventGeneratorSource",
"sourceTypeDisplayName": "Event Generator Source",
"schedulable": true,
"config": {
"rate": "1",
"eventFilePath": "notest.xml",
"iterations": "1",
"dateFormat": "EEE, d MMM yyyy HH:mm:ss Z",
"markerId": "",
"delay": "-1",
"propertyMetadataMap": null,
"postAction": "do nothing"
},
"topics": [
{
"href": "api/projects/65536/topics/5aeb5a2d-99dd-412b-be50-954e2e290b29",
"title": "event_gen_topic1",
"objectType": "topics",
"id": "5aeb5a2d-99dd-412b-be50-954e2e290b29"
},
{
"href": "api/projects/65536/topics/c7f1ffe2-3cd6-469a-bb4e-97d63287a1af",
"title": "event_gen_topic2",
"objectType": "topics",
"id": "c7f1ffe2-3cd6-469a-bb4e-97d63287a1af"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code: 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates an event generator source in a
RulePoint application:
POST http://localhost:8080/rulepoint/api/projects/65536/sources
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<name>EventGenerator1</name>
<type>sources</type>
<config>
<entry>
<key>rate</key>
<value>1</value>
</entry>
<entry>
<key>eventFilePath</key>
<value>notest.xml</value>

Sources 173
</entry>
<entry>
<key>iterations</key>
<value>1</value>
</entry>
<entry>
<key>dateFormat</key>
<value>EEE, d MMM yyyy HH:mm:ss Z</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>delay</key>
<value>-1</value>
</entry>
<entry>
<key>propertyMetadataMap</key>
</entry>
<entry>
<key>postAction</key>
<value>do nothing</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<sourceType>EventGeneratorSource</sourceType>
<topics>
<topic>
<href>api/projects/65536/topics/5aeb5a2d-99dd-412b-be50-954e2e290b29</href>
<id>5aeb5a2d-99dd-412b-be50-954e2e290b29</id>
<objectType>topics</objectType>
<title>event_gen_topic1</title>
</topic>
<topic>
<href>api/projects/65536/topics/c7f1ffe2-3cd6-469a-bb4e-97d63287a1af</href>
<id>c7f1ffe2-3cd6-469a-bb4e-97d63287a1af</id>
<objectType>topics</objectType>
<title>event_gen_topic2</title>
</topic>
</topics>
</source>

POST Response in XML Format


Returns the event generator source object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<acl>
<href>api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>

174 Chapter 6: Sample XML and JSON Requests and Responses


<href>api/projects/65536/deploy</href>
<rel>deploy</rel>
<title>Deploy</title>
<type>POST</type>
</action>
<action>
<href>api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4/
schedules</href>
<rel>createSchedule</rel>
<title>Create Schedule</title>
<type>POST</type>
</action>
</actions>
<id>36c660c6-4abf-493f-a268-81f7890d0ae4</id>
<links/>
<name>EventGenerator1</name>
<owningProject>
<href>api/projects/65536</href>
<id>65536</id>
<rel>owningProject</rel>
<title>docproj</title>
</owningProject>
<self>
<href>api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4</href>
<id>36c660c6-4abf-493f-a268-81f7890d0ae4</id>
<rel>self</rel>
<title>EventGenerator1</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>sources</type>
<config>
<entry>
<key>rate</key>
<value>1</value>
</entry>
<entry>
<key>eventFilePath</key>
<value>notest.xml</value>
</entry>
<entry>
<key>iterations</key>
<value>1</value>
</entry>
<entry>
<key>dateFormat</key>
<value>EEE, d MMM yyyy HH:mm:ss Z</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>delay</key>
<value>-1</value>
</entry>
<entry>
<key>propertyMetadataMap</key>
</entry>
<entry>
<key>postAction</key>
<value>do nothing</value>
</entry>
</config>

Sources 175
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<schedules>
<href>api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4/
schedules/102</href>
<id>102</id>
<rel>schedules</rel>
</schedules>
<sourceType>EventGeneratorSource</sourceType>
<sourceTypeDisplayName>Event Generator Source</sourceTypeDisplayName>
<topics>
<topic>
<href>api/projects/65536/topics/5aeb5a2d-99dd-412b-be50-954e2e290b29</href>
<id>5aeb5a2d-99dd-412b-be50-954e2e290b29</id>
<objectType>topics</objectType>
<title>event_gen_topic1</title>
</topic>
<topic>
<href>api/projects/65536/topics/c7f1ffe2-3cd6-469a-bb4e-97d63287a1af</href>
<id>c7f1ffe2-3cd6-469a-bb4e-97d63287a1af</id>
<objectType>topics</objectType>
<title>event_gen_topic2</title>
</topic>
</topics>
</source>
Response Code : 201 Created

Update Event Generator Source


Use the PUT method to update an event generator source in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates an event generator source in a
RulePoint application:
PUT http://localhost:8080/rulepoint/api/projects/65536/sources/36c660c6-4abf-493f-
a268-81f7890d0ae4
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "MyEventGeneratorSrc",
"valid": true,
"sourceType": "EventGeneratorSource",
"connection": null,
"topics": [
{
"href": "api/projects/65536/topics/5aeb5a2d-99dd-412b-be50-954e2e290b29",
"title": "event_gen_topic1",
"objectType": "topics",
"id": "5aeb5a2d-99dd-412b-be50-954e2e290b29"
},
{
"href": "api/projects/65536/topics/c7f1ffe2-3cd6-469a-bb4e-97d63287a1af",
"title": "event_gen_topic2",
"objectType": "topics",
"id": "c7f1ffe2-3cd6-469a-bb4e-97d63287a1af"
}
],
"config": {
"rate": "1",

176 Chapter 6: Sample XML and JSON Requests and Responses


"eventFilePath": "notest.xml",
"iterations": "1",
"dateFormat": "EEE, d MMM yyyy HH:mm:ss Z",
"markerId": null,
"delay": "-1",
"propertyMetadataMap": null,
"postAction": "do nothing"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}

PUT Response in JSON Format


Returns the event generator source object and source code. Returns the error object if an error occurs.
{
"id": "36c660c6-4abf-493f-a268-81f7890d0ae4",
"name": "MyEventGeneratorSrc",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4",
"title": "MyEventGeneratorSrc",
"id": "36c660c6-4abf-493f-a268-81f7890d0ae4"
},
"actions": [
{
"rel": "update",
"href": "api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/65536/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createSchedule",
"href": "api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/65536",
"title": "docproj",
"id": "65536"
},
"type": "sources",
"lastModifiedDate": "2013-09-19T14:09:47+05:30",
"createDate": "2013-09-19T12:17:10+05:30",

Sources 177
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"sourceType": "EventGeneratorSource",
"sourceTypeDisplayName": "Event Generator Source",
"schedulable": true,
"config": {
"rate": "1",
"eventFilePath": "notest.xml",
"iterations": "1",
"dateFormat": "EEE, d MMM yyyy HH:mm:ss Z",
"markerId": "",
"delay": "-1",
"propertyMetadataMap": null,
"postAction": "do nothing"
},
"topics": [
{
"href": "api/projects/65536/topics/5aeb5a2d-99dd-412b-be50-954e2e290b29",
"title": "event_gen_topic1",
"objectType": "topics",
"id": "5aeb5a2d-99dd-412b-be50-954e2e290b29"
},
{
"href": "api/projects/65536/topics/c7f1ffe2-3cd6-469a-bb4e-97d63287a1af",
"title": "event_gen_topic2",
"objectType": "topics",
"id": "c7f1ffe2-3cd6-469a-bb4e-97d63287a1af"
}
],
"schedules": [
{
"rel": "schedules",
"href": "api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4/
schedules/102",
"id": "102"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code: 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates an event generator source in a
RulePoint application:
PUT http://localhost:8080/rulepoint/api/projects/65536/sources/36c660c6-4abf-493f-
a268-81f7890d0ae4
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<name>EventGenerator1</name>
<type>sources</type>
<config>
<entry>
<key>rate</key>
<value>1</value>
</entry>

178 Chapter 6: Sample XML and JSON Requests and Responses


<entry>
<key>eventFilePath</key>
<value>notest.xml</value>
</entry>
<entry>
<key>iterations</key>
<value>1</value>
</entry>
<entry>
<key>dateFormat</key>
<value>EEE, d MMM yyyy HH:mm:ss Z</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>delay</key>
<value>-1</value>
</entry>
<entry>
<key>propertyMetadataMap</key>
</entry>
<entry>
<key>postAction</key>
<value>do nothing</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<sourceType>EventGeneratorSource</sourceType>
<topics>
<topic>
<href>api/projects/65536/topics/5aeb5a2d-99dd-412b-be50-954e2e290b29</href>
<id>5aeb5a2d-99dd-412b-be50-954e2e290b29</id>
<objectType>topics</objectType>
<title>event_gen_topic1</title>
</topic>
<topic>
<href>api/projects/65536/topics/c7f1ffe2-3cd6-469a-bb4e-97d63287a1af</href>
<id>c7f1ffe2-3cd6-469a-bb4e-97d63287a1af</id>
<objectType>topics</objectType>
<title>event_gen_topic2</title>
</topic>
</topics>
</source>

PUT Response in XML Format


Returns the event generator source object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<acl>
<href>api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4</href>
<rel>delete</rel>
<title>Delete</title>

Sources 179
<type>DELETE</type>
</action>
<action>
<href>api/projects/65536/deploy</href>
<rel>deploy</rel>
<title>Deploy</title>
<type>POST</type>
</action>
<action>
<href>api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4/
schedules</href>
<rel>createSchedule</rel>
<title>Create Schedule</title>
<type>POST</type>
</action>
</actions>
<id>36c660c6-4abf-493f-a268-81f7890d0ae4</id>
<links/>
<name>EventGenerator1</name>
<owningProject>
<href>api/projects/65536</href>
<id>65536</id>
<rel>owningProject</rel>
<title>docproj</title>
</owningProject>
<self>
<href>api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4</href>
<id>36c660c6-4abf-493f-a268-81f7890d0ae4</id>
<rel>self</rel>
<title>EventGenerator1</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>sources</type>
<config>
<entry>
<key>rate</key>
<value>1</value>
</entry>
<entry>
<key>eventFilePath</key>
<value>notest.xml</value>
</entry>
<entry>
<key>iterations</key>
<value>1</value>
</entry>
<entry>
<key>dateFormat</key>
<value>EEE, d MMM yyyy HH:mm:ss Z</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>delay</key>
<value>-1</value>
</entry>
<entry>
<key>propertyMetadataMap</key>
</entry>
<entry>
<key>postAction</key>

180 Chapter 6: Sample XML and JSON Requests and Responses


<value>do nothing</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<schedules>
<href>api/projects/65536/sources/36c660c6-4abf-493f-a268-81f7890d0ae4/
schedules/102</href>
<id>102</id>
<rel>schedules</rel>
</schedules>
<sourceType>EventGeneratorSource</sourceType>
<sourceTypeDisplayName>Event Generator Source</sourceTypeDisplayName>
<topics>
<topic>
<href>api/projects/65536/topics/5aeb5a2d-99dd-412b-be50-954e2e290b29</href>
<id>5aeb5a2d-99dd-412b-be50-954e2e290b29</id>
<objectType>topics</objectType>
<title>event_gen_topic1</title>
</topic>
<topic>
<href>api/projects/65536/topics/c7f1ffe2-3cd6-469a-bb4e-97d63287a1af</href>
<id>c7f1ffe2-3cd6-469a-bb4e-97d63287a1af</id>
<objectType>topics</objectType>
<title>event_gen_topic2</title>
</topic>
</topics>
</source>
Response Code : 200 OK

Delete Event Generator Source


Use the DELETE method to delete an event generator source in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes an event generator source in
a RulePoint application:
DELETE http://localhost:8080/rulepoint/api/projects/65536/sources/36c660c6-4abf-493f-
a268-81f7890d0ae4
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes an event generator source in
a RulePoint application:
DELETE http://localhost:8080/rulepoint/api/projects/65536/sources/36c660c6-4abf-493f-
a268-81f7890d0ae4
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

Sources 181
File Input Source
Use the examples to create, update, or delete a file input source.

Create File Input Source


Use the POST method to create a file input source in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates a file input source in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/4/sources
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "fileInputSource",
"description": "",
"valid": true,
"sourceType": "FileSource",
"connection": null,
"topics": [
{
"rel": "self",
"href": "api/projects/1/topics/9dfc93ff-52dd-4cd0-893c-33bd8640351e",
"title": "topic1",
"id": "9dfc93ff-52dd-4cd0-893c-33bd8640351e"
}
],
"config": {
"file": "C:\\workspace\\stock_records.txt",
"mode": "new",
"markerId": null,
"propertyMetadataMap": null
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {}
}
}

POST Response in JSON Format


Returns the file input source object and response code. Returns the error object if an error occurs.
{
"id": "cab9669c-c1ac-4ab0-9c75-3a82351f45f0",
"name": "fileInputSource",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/1/sources/cab9669c-c1ac-4ab0-9c75-3a82351f45f0",
"title": "fileInputSource",
"id": "cab9669c-c1ac-4ab0-9c75-3a82351f45f0"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/sources/cab9669c-c1ac-4ab0-9c75-3a82351f45f0",
"type": "PUT",
"title": "Edit"
},

182 Chapter 6: Sample XML and JSON Requests and Responses


{
"rel": "delete",
"href": "api/projects/1/sources/cab9669c-c1ac-4ab0-9c75-3a82351f45f0",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "createSchedule",
"href": "api/projects/1/sources/cab9669c-c1ac-4ab0-9c75-3a82351f45f0/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/sources/cab9669c-c1ac-4ab0-9c75-3a82351f45f0/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "sources",
"lastModifiedDate": "2013-09-19T17:29:23+05:30",
"createDate": "2013-09-19T17:29:23+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"dtError": "There are no schedules attached to this Source",
"sourceType": "FileSource",
"sourceTypeDisplayName": "File Source",
"schedulable": true,
"config": {
"file": "C:\\workspace\\stock_records.txt",
"markerId": "",
"propertyMetadataMap": null,
"mode": "new"
},
"topics": [
{
"href": "api/projects/1/topics/9dfc93ff-52dd-4cd0-893c-33bd8640351e",
"title": "topic1",
"objectType": "topics",
"id": "9dfc93ff-52dd-4cd0-893c-33bd8640351e"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": null,
"marshallerThreadsafe": false
}
}
Response Code: 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates a file input source in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/sources
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

Sources 183
POST Body in XML Format
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<name>fileInputSource</name>
<type>sources</type>
<config>
<entry>
<key>file</key>
<value>C:\workspace\stock_records.txt</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>propertyMetadataMap</key>
</entry>
<entry>
<key>mode</key>
<value>new</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<sourceType>FileSource</sourceType>
<topics>
<topic>
<href>api/projects/1/topics/9dfc93ff-52dd-4cd0-893c-33bd8640351e</href>
<id>9dfc93ff-52dd-4cd0-893c-33bd8640351e</id>
<objectType>topics</objectType>
<title>topic1</title>
</topic>
</topics>
</source>

POST Response in XML Format


Returns the file input source object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<acl>
<href>api/projects/1/sources/cab9669c-c1ac-4ab0-9c75-3a82351f45f0/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/sources/cab9669c-c1ac-4ab0-9c75-3a82351f45f0</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/sources/cab9669c-c1ac-4ab0-9c75-3a82351f45f0</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/sources/cab9669c-c1ac-4ab0-9c75-3a82351f45f0/schedules</
href>
<rel>createSchedule</rel>
<title>Create Schedule</title>
<type>POST</type>
</action>
</actions>
<id>cab9669c-c1ac-4ab0-9c75-3a82351f45f0</id>

184 Chapter 6: Sample XML and JSON Requests and Responses


<links/>
<name>fileInputSource</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/sources/cab9669c-c1ac-4ab0-9c75-3a82351f45f0</href>
<id>cab9669c-c1ac-4ab0-9c75-3a82351f45f0</id>
<rel>self</rel>
<title>fileInputSource</title>
</self>
<valid>false</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<dtError>There are no schedules attached to this Source</dtError>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>sources</type>
<config>
<entry>
<key>file</key>
<value>C:\workspace\stock_records.txt</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>propertyMetadataMap</key>
</entry>
<entry>
<key>mode</key>
<value>new</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<sourceType>FileSource</sourceType>
<sourceTypeDisplayName>File Source</sourceTypeDisplayName>
<topics>
<topic>
<href>api/projects/1/topics/9dfc93ff-52dd-4cd0-893c-33bd8640351e</href>
<id>9dfc93ff-52dd-4cd0-893c-33bd8640351e</id>
<objectType>topics</objectType>
<title>topic1</title>
</topic>
</topics>
</source>
Response Code : 201 Created

Sources 185
Update File Input Source
Use the PUT method to update a file input source in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates a file input source in a RulePoint
application:
PUT http://invrw28cep14:8080/rulepoint/api/projects/1/sources/cab9669c-
c1ac-4ab0-9c75-3a82351f45f0
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "MyFileInputSource",
"valid": true,
"sourceType": "FileSource",
"connection": null,
"topics": [
{
"href": "api/projects/1/topics/9dfc93ff-52dd-4cd0-893c-33bd8640351e",
"title": "topic1",
"objectType": "topics",
"id": "9dfc93ff-52dd-4cd0-893c-33bd8640351e"
}
],
"config": {
"file": "C:\\workspace\\stock_records.txt",
"markerId": null,
"propertyMetadataMap": null,
"mode": "new"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}

PUT Response in JSON Format


Returns the file input source object and source code. Returns the error object if an error occurs.
{
"id": "cab9669c-c1ac-4ab0-9c75-3a82351f45f0",
"name": "MyFileInputSource",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/1/sources/cab9669c-c1ac-4ab0-9c75-3a82351f45f0",
"title": "MyFileInputSource",
"id": "cab9669c-c1ac-4ab0-9c75-3a82351f45f0"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/sources/cab9669c-c1ac-4ab0-9c75-3a82351f45f0",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/sources/cab9669c-c1ac-4ab0-9c75-3a82351f45f0",
"type": "DELETE",
"title": "Delete"
},

186 Chapter 6: Sample XML and JSON Requests and Responses


{
"rel": "createSchedule",
"href": "api/projects/1/sources/cab9669c-c1ac-4ab0-9c75-3a82351f45f0/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/sources/cab9669c-c1ac-4ab0-9c75-3a82351f45f0/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "sources",
"lastModifiedDate": "2013-09-19T17:36:18+05:30",
"createDate": "2013-09-19T17:29:23+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"dtError": "There are no schedules attached to this Source",
"sourceType": "FileSource",
"sourceTypeDisplayName": "File Source",
"schedulable": true,
"config": {
"file": "C:\\workspace\\stock_records.txt",
"markerId": "",
"propertyMetadataMap": null,
"mode": "new"
},
"topics": [
{
"href": "api/projects/1/topics/9dfc93ff-52dd-4cd0-893c-33bd8640351e",
"title": "topic1",
"objectType": "topics",
"id": "9dfc93ff-52dd-4cd0-893c-33bd8640351e"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code: 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates a file input source in a RulePoint
application:
PUT http://invrw28cep14:8080/rulepoint/api/projects/1/sources/cab9669c-
c1ac-4ab0-9c75-3a82351f45f0
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<name>fileInputSource</name>
<type>sources</type>

Sources 187
<config>
<entry>
<key>file</key>
<value>C:\workspace\stock_records.txt</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>propertyMetadataMap</key>
</entry>
<entry>
<key>mode</key>
<value>new</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<sourceType>FileSource</sourceType>
<topics>
<topic>
<href>api/projects/1/topics/9dfc93ff-52dd-4cd0-893c-33bd8640351e</href>
<id>9dfc93ff-52dd-4cd0-893c-33bd8640351e</id>
<objectType>topics</objectType>
<title>topic1</title>
</topic>
</topics>
</source>

PUT Response in XML Format


Returns the file input source object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<acl>
<href>api/projects/1/sources/cab9669c-c1ac-4ab0-9c75-3a82351f45f0/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/sources/cab9669c-c1ac-4ab0-9c75-3a82351f45f0</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/sources/cab9669c-c1ac-4ab0-9c75-3a82351f45f0</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/sources/cab9669c-c1ac-4ab0-9c75-3a82351f45f0/schedules</
href>
<rel>createSchedule</rel>
<title>Create Schedule</title>
<type>POST</type>
</action>
</actions>
<id>cab9669c-c1ac-4ab0-9c75-3a82351f45f0</id>
<links/>
<name>fileInputSource</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>

188 Chapter 6: Sample XML and JSON Requests and Responses


<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/sources/cab9669c-c1ac-4ab0-9c75-3a82351f45f0</href>
<id>cab9669c-c1ac-4ab0-9c75-3a82351f45f0</id>
<rel>self</rel>
<title>fileInputSource</title>
</self>
<valid>false</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<dtError>There are no schedules attached to this Source</dtError>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>sources</type>
<config>
<entry>
<key>file</key>
<value>C:\workspace\stock_records.txt</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>propertyMetadataMap</key>
</entry>
<entry>
<key>mode</key>
<value>new</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<sourceType>FileSource</sourceType>
<sourceTypeDisplayName>File Source</sourceTypeDisplayName>
<topics>
<topic>
<href>api/projects/1/topics/9dfc93ff-52dd-4cd0-893c-33bd8640351e</href>
<id>9dfc93ff-52dd-4cd0-893c-33bd8640351e</id>
<objectType>topics</objectType>
<title>topic1</title>
</topic>
</topics>
</source>
Response Code : 200 OK

Delete File Input Source


Use the DELETE method to delete a file input source in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes a file input source in a
RulePoint application:
DELETE http://invrw28cep14:8080/rulepoint/api/projects/1/sources/cab9669c-
c1ac-4ab0-9c75-3a82351f45f0
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

Sources 189
Response Code: 204 No Content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes a file input source in a
RulePoint application:
DELETE http://invrw28cep14:8080/rulepoint/api/projects/1/sources/cab9669c-
c1ac-4ab0-9c75-3a82351f45f0
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

Schedule
You can create a dynamic or static schedule for a source.

Static Schedule
You can create, update, or delete a static schedule for a source.

You can create a static schedule by using one of the following combinations:

• Run every 120000 ms from a start date.


{scheduleType":"STATIC","startDate":"2013-09-26T12:14:59+0530","isScheduledForSpecific
DaysOfWe
ek":false,"repeatInterval":"120000"}
• Run 10 times from a start date, every 120000 ms.
{"scheduleType":"STATIC","startDate":"2013-09-26T12:16:25+0530","isScheduledForSpecifi
cDaysOfW
eek":false,"repeatInterval":"120000","numRuns":"10"}
• Run every 120000 ms from a start date to a specified end date and time.
{"scheduleType":"STATIC","startDate":"2013-09-26T12:18:40+0530","isScheduledForSpecifi
cDaysOfW
eek":false,"repeatInterval":"120000","endDate":"2013-09-26T19:30:00+0530"}
• Run every Monday and Tuesday.
{"scheduleType":"STATIC","startDate":"2013-09-26T12:19:36+0530","isScheduledForSpecifi
cDaysOfW
eek":true,"days":["Mon","Tue"]}
• Run every Monday and Tuesday, during a period between the specified start date and end date.
{"scheduleType":"STATIC","startDate":"2013-09-26T12:20:15+0530","isScheduledForSpecifi
cDaysOfW
eek":true,"days":["Mon","Tue"],"endDate":"2013-11-29T19:30:00+0530"}

190 Chapter 6: Sample XML and JSON Requests and Responses


Create Static Schedule for a Source
Use the POST method to create a static schedule for a source.

POST Request in JSON Format


To create a static schedule for a source in a RulePoint application, generate the following POST request:
POST http://invrw28cep14:8080/rulepoint/api/projects/1/sources/de27147d-22cf-4c62-b7c7-
cbc365548717/schedules
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"startDate": "2014-01-22T09:48:52+0530",
"endDate": "2014-01-22T09:53:52+0530",
"repeatInterval": 5000,
"isScheduledForSpecificDaysOfWeek": false,
"scheduleType": "STATIC"
}

POST Response in JSON Format


Returns the schedule object and response code 201 OK. Returns the error object if an error occurs.
{
"id": "1997",
"self": {
"rel": "self",
"href": "/api/projects/140/sources/0e923d83-0ac3-4f18-9979-f64159798992/
schedules/1997",
"id": "1997"
},
"actions": [
{
"rel": "update",
"href": "/api/projects/140/sources/0e923d83-0ac3-4f18-9979-f64159798992/
schedules/1997",
"type": "PUT"
},
{
"rel": "delete",
"href": "/api/projects/140/sources/0e923d83-0ac3-4f18-9979-f64159798992/
schedules/1997",
"type": "DELETE"
}
],
"scheduleType": "STATIC",
"runState": "ACTIVE",
"startDate": "2014-01-22T09:48:52+05:30",
"isScheduledForSpecificDaysOfWeek": false,
"repeatInterval": 5000,
"numRuns": 0,
"endDate": "2014-01-22T09:53:52+05:30"
}
Response Code: 201 Created

POST Request in XML Format


POST http://invrw28cep14:8080/rulepoint/api/projects/1/sources/de27147d-22cf-4c62-b7c7-
cbc365548717/schedules
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

Schedule 191
POST Body in XML Format
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<schedule>
<scheduleType>STATIC</scheduleType>
<startDate>2013-09-25T19:30:00+0530</startDate>
<endDate>2013-10-30T19:30:00+0530</endDate>
<isScheduledForSpecificDaysOfWeek>false</isScheduledForSpecificDaysOfWeek>
<numRuns>0</numRuns>
<repeatInterval>120000</repeatInterval>
</schedule>

POST Response in XML Format


Returns the schedule object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<schedule>
<actions>
<action>
<href>/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/
schedules/2</href>
<rel>update</rel>
<type>PUT</type>
</action>
<action>
<href>/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/
schedules/2</href>
<rel>delete</rel>
<type>DELETE</type>
</action>
</actions>
<id>2</id>
<name/>
<self>
<href>/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/schedules/2</
href>
<id>2</id>
<rel>self</rel>
</self>
<endDate>2013-09-30T19:30:00+0530</endDate>
<isScheduledForSpecificDaysOfWeek>false</isScheduledForSpecificDaysOfWeek>
<numRuns>0</numRuns>
<repeatInterval>120000</repeatInterval>
<runState>ACTIVE</runState>
<scheduleType>STATIC</scheduleType>
<startDate>2013-09-25T19:30:00+0530</startDate>
</schedule>
Response Code: 201 Created

Update Static Schedule for a Source


Use the PUT method to update a static schedule for a source in RulePoint.

PUT Request in JSON Format


To update a static schedule in a RulePoint application, generate the following PUT request:
PUT http://invrw28cep14:8080/rulepoint/api/projects/1/sources/de27147d-22cf-4c62-b7c7-
cbc365548717/schedules/2
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"scheduleType": "STATIC",

192 Chapter 6: Sample XML and JSON Requests and Responses


"startDate": "2013-09-25T19:30:00+0530",
"isScheduledForSpecificDaysOfWeek": false,
"repeatInterval": "60000",
"endDate": "2013-10-30T19:30:00+0530"
}

PUT Response in JSON Format


Returns the schedule object and source code 200 OK. Returns the error object if an error occurs.
{
"id": "2",
"self": {
"rel": "self",
"href": "/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/
schedules/2",
"id": "2"
},
"actions": [
{
"rel": "update",
"href": "/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/
schedules/2",
"type": "PUT"
},
{
"rel": "delete",
"href": "/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/
schedules/2",
"type": "DELETE"
}
],
"scheduleType": "STATIC",
"runState": "ACTIVE",
"startDate": "2013-09-25T19:30:00+0530",
"isScheduledForSpecificDaysOfWeek": false,
"repeatInterval": 60000,
"numRuns": 0,
"endDate": "2013-09-30T19:30:00+0530"
}
Response Code: 200 OK

PUT Request in XML Format


PUT http://invrw28cep14:8080/rulepoint/api/projects/1/sources/de27147d-22cf-4c62-b7c7-
cbc365548717/schedules/2
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<schedule>
<scheduleType>STATIC</scheduleType>
<startDate>2013-09-26T19:30:00+0530</startDate>
<endDate>2013-10-30T19:30:00+0530</endDate>
<isScheduledForSpecificDaysOfWeek>false</isScheduledForSpecificDaysOfWeek>
<numRuns>0</numRuns>
<repeatInterval>60000</repeatInterval>
</schedule>

PUT Response in XML Format


Returns the schedule object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<schedule>
<actions>
<action>
<href>/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/

Schedule 193
schedules/2</href>
<rel>update</rel>
<type>PUT</type>
</action>
<action>
<href>/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/
schedules/2</href>
<rel>delete</rel>
<type>DELETE</type>
</action>
</actions>
<id>2</id>
<name/>
<self>
<href>/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/schedules/2</
href>
<id>2</id>
<rel>self</rel>
</self>
<endDate>2013-09-30T19:30:00+0530</endDate>
<isScheduledForSpecificDaysOfWeek>false</isScheduledForSpecificDaysOfWeek>
<numRuns>0</numRuns>
<repeatInterval>120000</repeatInterval>
<runState>ACTIVE</runState>
<scheduleType>STATIC</scheduleType>
<startDate>2013-09-25T19:30:00+0530</startDate>
</schedule>
Response Code: 200 OK

Delete Static Schedule for a Source


Use the DELETE method to delete a static schedule for a source in RulePoint.

DELETE Request in JSON Format


To delete a static schedule in a RulePoint application, generate the following DELETE request:
DELETE http://invrw28cep14:8080/rulepoint/api/projects/1/sources/de27147d-22cf-4c62-b7c7-
cbc365548717/schedules/2
Accept: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No content

DELETE Request in XML Format


DELETE http://invrw28cep14:8080/rulepoint/api/projects/1/sources/de27147d-22cf-4c62-b7c7-
cbc365548717/schedules/2
Accept: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No content

194 Chapter 6: Sample XML and JSON Requests and Responses


Dynamic Schedule
You can create, update, or delete a dynamic schedule for a source.

Create Dynamic Schedule for a Source


Use the POST method to create a dynamic schedule for a source.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates a dynamic schedule for a source
in a RulePoint application:
POST http://invrw28cep14:8080/rulepoint/api/projects/1/sources/de27147d-22cf-4c62-b7c7-
cbc365548717/schedules
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"repeatInterval": "5000",
"scheduleType": "DYNAMIC"
}

POST Response in JSON Format


Returns the schedule object and response code. Returns the error object if an error occurs.
{
"id": "1",
"self": {
"rel": "self",
"href": "/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/
schedules/1",
"id": "1"
},
"actions": [
{
"rel": "update",
"href": "/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/
schedules/1",
"type": "PUT"
},
{
"rel": "delete",
"href": "/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/
schedules/1",
"type": "DELETE"
}
],
"scheduleType": "DYNAMIC",
"runState": "ACTIVE",
"repeatInterval": 5000
}
Response Code: 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates a dynamic schedule for a source
in a RulePoint application:
POST http://invrw28cep14:8080/rulepoint/api/projects/1/sources/
de27147d-22cf-4c62-b7c7-cbc365548717/schedules
Accept: application/xml

Schedule 195
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<schedule>
<repeatInterval>5000</repeatInterval>
<scheduleType>DYNAMIC</scheduleType>
</schedule>

POST Response in XML Format


Returns the schedule object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<schedule>
<actions>
<action>
<href>/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/
schedules/1</href>
<rel>update</rel>
<type>PUT</type>
</action>
<action>
<href>/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/
schedules/1</href>
<rel>delete</rel>
<type>DELETE</type>
</action>
</actions>
<id>1</id>
<name/>
<self>
<href>/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/schedules/1</
href>
<id>1</id>
<rel>self</rel>
</self>
<repeatInterval>5000</repeatInterval>
<runState>ACTIVE</runState>
<scheduleType>DYNAMIC</scheduleType>
</schedule>
Response Code: 201 Created

Update Dynamic Schedule for a Source


Use the PUT method to update a dynamic schedule for a source in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates a dynamic schedule in a RulePoint
application:
PUT http://invrw28cep14:8080/rulepoint/api/projects/1/sources/de27147d-22cf-4c62-b7c7-
cbc365548717/schedules/1
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{ "repeatInterval": "15000", "scheduleType": "DYNAMIC"}

196 Chapter 6: Sample XML and JSON Requests and Responses


PUT Response in JSON Format
Returns the schedule object and source code. Returns the error object if an error occurs.
{
"id": "1",
"self": {
"rel": "self",
"href": "/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/
schedules/1",
"id": "1"
},
"actions": [
{
"rel": "update",
"href": "/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/
schedules/1",
"type": "PUT"
},
{
"rel": "delete",
"href": "/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/
schedules/1",
"type": "DELETE"
}
],
"scheduleType": "DYNAMIC",
"runState": "ACTIVE",
"repeatInterval": 15000
}
Response Code: 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates a dynamic schedule in a RulePoint
application:
PUT http://invrw28cep14:8080/rulepoint/api/projects/1/sources/de27147d-22cf-4c62-b7c7-
cbc365548717/schedules/1
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<schedule>
<repeatInterval>15000</repeatInterval>
<scheduleType>DYNAMIC</scheduleType>
</schedule>

PUT Response in XML Format


Returns the schedule object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<schedule>
<actions>
<action>
<href>/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/
schedules/1</href>
<rel>update</rel>
<type>PUT</type>
</action>
<action>
<href>/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/
schedules/1</href>
<rel>delete</rel>
<type>DELETE</type>
</action>

Schedule 197
</actions>
<id>1</id>
<name/>
<self>
<href>/api/projects/1/sources/de27147d-22cf-4c62-b7c7-cbc365548717/schedules/1</
href>
<id>1</id>
<rel>self</rel>
</self>
<repeatInterval>15000</repeatInterval>
<runState>ACTIVE</runState>
<scheduleType>DYNAMIC</scheduleType>
</schedule>
Response Code: 200 OK

Delete Dynamic Schedule for a Source


Use the DELETE method to delete a dynamic schedule for a source in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes a dynamic schedule in a
RulePoint application:
DELETE http://invrw28cep14:8080/rulepoint/api/projects/1/sources/de27147d-22cf-4c62-b7c7-
cbc365548717/schedules/1
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes a dynamic schedule in a
RulePoint application:
DELETE http://invrw28cep14:8080/rulepoint/api/projects/1/sources/de27147d-22cf-4c62-b7c7-
cbc365548717/schedules/1
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No content

198 Chapter 6: Sample XML and JSON Requests and Responses


Responders
You can use API calls to perform various operations with SQL, email, JMS, web service, event transformer,
file output, and RTAM responders.

SQL Responder
Use the examples to create, retrieve, update, or delete an SQL responder.

Create SQL Responder


Use the POST method to create an SQL responder in RulePoint.

POST Request in JSON Format


To create an SQL responder in a RulePoint application, generate the following POST request:
POST http://localhost:8080/rulepoint/api/projects/1/responders
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


Returns the SQL responder object and response code 201 OK. Returns the error object if an error occurs.
{
"name": "mysqlresponder",
"type": "responders",
"responderType": "SqlResponder",
"responderTypeDisplayName": "SQL Responder",
"config": {
"sql": "insert into hot_stocks(symbol, price) values('INFA', 38.90)",
"params": null
},
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/2d5c8d79-b732-4fe8-ad69-3243d102ed49",
"title": "sqlconnection",
"id": "2d5c8d79-b732-4fe8-ad69-3243d102ed49"
}
}

POST Response in JSON Format


{
"id": "8bd61211-404b-4cd4-8a84-f36a7bcdf151",
"name": "mysqlresponder",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151",
"title": "mysqlresponder",
"id": "8bd61211-404b-4cd4-8a84-f36a7bcdf151"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",

Responders 199
"href": "api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "createResponse",
"href": "api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151",
"type": "DELETE",
"title": "Create Response"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responders",
"lastModifiedDate": "2013-08-13T12:15:01+05:30",
"createDate": "2013-08-13T12:15:01+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"dtError": "There are no responses associated with this Responder",
"responderType": "SqlResponder",
"responderTypeDisplayName": "SQL Responder",
"config": {
"sql": "insert into hot_stock(symbol, price) values ('INFA', 38.90)",
"params": null
},
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/2d5c8d79-b732-4fe8-ad69-3243d102ed49",
"title": "sqlconnection",
"id": "2d5c8d79-b732-4fe8-ad69-3243d102ed49"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code : 201 Created

POST Request in XML Format


POST http://localhost:8080/rulepoint/api/projects/1/responders
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<name>mysqlresponder</name>
<type>responders</type>
<config>
<entry>
<key>sql</key>
<value>insert into hot_stocks(symbol, price) values ('INFA', 38.90)</value>
</entry>
<entry>

200 Chapter 6: Sample XML and JSON Requests and Responses


<key>params</key>
</entry>
</config>
<connection>
<href>api/projects/1/connections/2d5c8d79-b732-4fe8-ad69-3243d102ed49</href>
<id>2d5c8d79-b732-4fe8-ad69-3243d102ed49</id>
<rel>connection</rel>
<title>sqlconnection</title>
</connection>
<responderType>SqlResponder</responderType>
</responder>

POST Response in XML Format


Returns the SQL responder object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<acl>
<href>api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151</href>
<rel>createResponse</rel>
<title>Create Response</title>
<type>DELETE</type>
</action>
</actions>
<id>8bd61211-404b-4cd4-8a84-f36a7bcdf151</id>
<links/>
<name>mysqlresponder</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151</href>
<id>8bd61211-404b-4cd4-8a84-f36a7bcdf151</id>
<rel>self</rel>
<title>mysqlresponder</title>
</self>
<valid>false</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<dtError>There are no responses associated with this Responder</dtError>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responders</type>
<config>
<entry>
<key>sql</key>

Responders 201
<value>insert into hot_stock(symbol, price) values ('INFA', 38.90)</value>
</entry>
<entry>
<key>params</key>
</entry>
</config>
<connection>
<href>api/projects/1/connections/2d5c8d79-b732-4fe8-ad69-3243d102ed49</href>
<id>2d5c8d79-b732-4fe8-ad69-3243d102ed49</id>
<rel>connection</rel>
<title>sqlconnection</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>SqlResponder</responderType>
<responderTypeDisplayName>SQL Responder</responderTypeDisplayName>
<responses />
<topics />
</responder>
Response Code : 201 Created

Retrieve SQL Responder


Use the GET method to retrieve an SQL responder in RulePoint.

GET Request in JSON Format


To retrieve an SQL responder in a RulePoint application, generate the following GET request:
GET http://localhost:8080/rulepoint/api/projects/1/responders
Accept: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

GET Response in JSON Format


{
"total": 6,
"count": 6,
"items": [
{
"id": "c4851206-93e0-45ee-a013-3fb1d2fc5c5d",
"name": "rtam",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/responders/c4851206-93e0-45ee-a013-3fb1d2fc5c5d",
"title": "rtam",
"id": "c4851206-93e0-45ee-a013-3fb1d2fc5c5d"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responders/c4851206-93e0-45ee-
a013-3fb1d2fc5c5d",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responders/c4851206-93e0-45ee-
a013-3fb1d2fc5c5d",
"type": "DELETE",
"title": "Delete"
},
{

202 Chapter 6: Sample XML and JSON Requests and Responses


"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createResponse",
"href": "api/projects/1/responders/c4851206-93e0-45ee-
a013-3fb1d2fc5c5d",
"type": "DELETE",
"title": "Create Response"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responders/c4851206-93e0-45ee-
a013-3fb1d2fc5c5d/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responders",
"lastModifiedDate": "2013-08-19T11:21:03+05:30",
"createDate": "2013-08-07T17:50:59+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responderType": "RTAMResponder",
"responderTypeDisplayName": "RTAM Responder",
"config": {
"to": "e",
"body": "re",
"subject": "re",
"priority": "3",
"channels": "",
"header": "",
"actions": "",
"groups": "",
"metadata": null
},
"responses": [
{
"href": "api/projects/1/responses/a2e64636-5206-46da-
abe9-4c9bb8b592bc",
"title": "rtam_response",
"objectType": "responses",
"id": "a2e64636-5206-46da-abe9-4c9bb8b592bc"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
},
{
"id": "08ff3fdc-85f3-4bd2-8cd8-06442d7eae0c",
"name": "wsresponder",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/responders/08ff3fdc-85f3-4bd2-8cd8-06442d7eae0c",
"title": "wsresponder",
"id": "08ff3fdc-85f3-4bd2-8cd8-06442d7eae0c"

Responders 203
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responders/
08ff3fdc-85f3-4bd2-8cd8-06442d7eae0c",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responders/
08ff3fdc-85f3-4bd2-8cd8-06442d7eae0c",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createResponse",
"href": "api/projects/1/responders/
08ff3fdc-85f3-4bd2-8cd8-06442d7eae0c",
"type": "DELETE",
"title": "Create Response"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responders/
08ff3fdc-85f3-4bd2-8cd8-06442d7eae0c/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responders",
"lastModifiedDate": "2013-08-19T11:10:52+05:30",
"createDate": "2013-08-19T10:59:14+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responderType": "webService",
"responderTypeDisplayName": "Web Service Responder",
"config": {
"operation": "hello",
"inputParameters": "hello.name=xkjhkj",
"serviceName": "HelloWorldServices"
},
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/03e9c236-1a01-40e2-9d4a-
f13c893abef7",
"title": "wsconn",
"id": "03e9c236-1a01-40e2-9d4a-f13c893abef7"
},
"responses": [
{
"href": "api/projects/1/responses/f1fbf054-6124-4111-a69e-
abe30586deb0",
"title": "wsresponder_response",
"objectType": "responses",

204 Chapter 6: Sample XML and JSON Requests and Responses


"id": "f1fbf054-6124-4111-a69e-abe30586deb0"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
},
{
"id": "8bd61211-404b-4cd4-8a84-f36a7bcdf151",
"name": "sqlresponder",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151",
"title": "sqlresponder",
"id": "8bd61211-404b-4cd4-8a84-f36a7bcdf151"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responders/8bd61211-404b-4cd4-8a84-
f36a7bcdf151",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responders/8bd61211-404b-4cd4-8a84-
f36a7bcdf151",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "createResponse",
"href": "api/projects/1/responders/8bd61211-404b-4cd4-8a84-
f36a7bcdf151",
"type": "DELETE",
"title": "Create Response"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responders/8bd61211-404b-4cd4-8a84-
f36a7bcdf151/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responders",
"lastModifiedDate": "2013-08-13T12:15:01+05:30",
"createDate": "2013-08-13T12:15:01+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"dtError": "There are no responses associated with this Responder",
"responderType": "SqlResponder",
"responderTypeDisplayName": "SQL Responder",
"config": {
"sql": "insert into something",
"params": null
},
"connection": {

Responders 205
"rel": "connection",
"href": "api/projects/1/connections/2d5c8d79-b732-4fe8-
ad69-3243d102ed49",
"title": "sqlconnection",
"id": "2d5c8d79-b732-4fe8-ad69-3243d102ed49"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
},
{
"id": "51ba1457-5112-4e70-99f1-fe94af5ddea3",
"name": "emailresponder",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/1/responders/51ba1457-5112-4e70-99f1-fe94af5ddea3",
"title": "emailresponder",
"id": "51ba1457-5112-4e70-99f1-fe94af5ddea3"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responders/51ba1457-5112-4e70-99f1-
fe94af5ddea3",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responders/51ba1457-5112-4e70-99f1-
fe94af5ddea3",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "createResponse",
"href": "api/projects/1/responders/51ba1457-5112-4e70-99f1-
fe94af5ddea3",
"type": "DELETE",
"title": "Create Response"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responders/51ba1457-5112-4e70-99f1-
fe94af5ddea3/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responders",
"lastModifiedDate": "2013-08-07T17:49:48+05:30",
"createDate": "2013-08-07T17:49:48+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"dtError": "There are no responses associated with this Responder",
"responderType": "EmailResponder",
"responderTypeDisplayName": "Email Responder",
"config": {
"to": "ad",

206 Chapter 6: Sample XML and JSON Requests and Responses


"body": "dsw",
"replyTo": "",
"subject": "ds",
"sentDate": null,
"bcc": "",
"from": "ew",
"contentType": "text",
"cc": ""
},
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/bba20936-201a-4d3c-
afad-33c76fb9366b",
"title": "emailcon",
"id": "bba20936-201a-4d3c-afad-33c76fb9366b"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
},
{
"id": "2a1efc67-29fc-4a57-90c8-896867802c73",
"name": "another",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/1/responders/2a1efc67-29fc-4a57-90c8-896867802c73",
"title": "another",
"id": "2a1efc67-29fc-4a57-90c8-896867802c73"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responders/
2a1efc67-29fc-4a57-90c8-896867802c73",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responders/
2a1efc67-29fc-4a57-90c8-896867802c73",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "createResponse",
"href": "api/projects/1/responders/
2a1efc67-29fc-4a57-90c8-896867802c73",
"type": "DELETE",
"title": "Create Response"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responders/
2a1efc67-29fc-4a57-90c8-896867802c73/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responders",
"lastModifiedDate": "2013-08-07T16:55:39+05:30",
"createDate": "2013-08-07T16:55:39+05:30",

Responders 207
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"dtError": "There are no responses associated with this Responder",
"responderType": "http",
"responderTypeDisplayName": "HTTP Responder",
"config": {
"body": "",
"username": "",
"retryCount": "3",
"retryDelay": "1000",
"targeturl": "http://invr28cep46:8080/",
"method": "GET",
"parameters": null,
"password": null,
"mimeType": ""
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
},
{
"id": "73876991-1dc2-47e6-ae1f-56347427a249",
"name": "fileout",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/responders/73876991-1dc2-47e6-ae1f-56347427a249",
"title": "fileout",
"id": "73876991-1dc2-47e6-ae1f-56347427a249"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responders/73876991-1dc2-47e6-
ae1f-56347427a249",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responders/73876991-1dc2-47e6-
ae1f-56347427a249",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createResponse",
"href": "api/projects/1/responders/73876991-1dc2-47e6-
ae1f-56347427a249",
"type": "DELETE",
"title": "Create Response"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responders/73876991-1dc2-47e6-
ae1f-56347427a249/acl",
"title": "acl"
},

208 Chapter 6: Sample XML and JSON Requests and Responses


"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responders",
"lastModifiedDate": "2013-07-30T10:14:46+05:30",
"createDate": "2013-07-30T10:10:49+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responderType": "fileOutput",
"responderTypeDisplayName": "File Responder",
"config": {
"contents": "nest",
"filename": "best",
"mode": "append"
},
"responses": [
{
"href": "api/projects/1/responses/8322f00d-6191-4932-a447-
a090e03b5696",
"title": "fileout_response",
"objectType": "responses",
"id": "8322f00d-6191-4932-a447-a090e03b5696"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
]
}
Response Code : 200 OK

GET Request in XML Format


GET http://localhost:8080/rulepoint/api/projects/1/responders
Accept: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

GET Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<name>hotstockresponder</name>
<type>responders</type>
<config>
<entry>
<key>sql</key>
<value>insert into hot_stocks(symbol, price) values ('INFA', 38.90)</value>
</entry>
<entry>
<key>params</key>
</entry>
</config>
<connection>
<href>api/projects/1/connections/2d5c8d79-b732-4fe8-ad69-3243d102ed49</href>
<id>2d5c8d79-b732-4fe8-ad69-3243d102ed49</id>
<rel>connection</rel>
<title>sqlconnection</title>
</connection>
<responderType>SqlResponder</responderType>
</responder>

Responders 209
GET Response in XML Format
Returns the SQL responder object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<artifacts>
<count>1</count>
<items>
<responder>
<acl>
<href>api/projects/1/responders/c4befa65-dd03-4213-96fc-3cbc71e74211/
acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responders/c4befa65-
dd03-4213-96fc-3cbc71e74211</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responders/c4befa65-
dd03-4213-96fc-3cbc71e74211</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/responders/c4befa65-
dd03-4213-96fc-3cbc71e74211</href>
<rel>createResponse</rel>
<title>Create Response</title>
<type>DELETE</type>
</action>
</actions>
<id>c4befa65-dd03-4213-96fc-3cbc71e74211</id>
<name>sqlresponder</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responders/c4befa65-dd03-4213-96fc-3cbc71e74211</
href>
<id>c4befa65-dd03-4213-96fc-3cbc71e74211</id>
<rel>self</rel>
<title>sqlresponder</title>
</self>
<valid>false</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<dtError>There are no responses associated with this Responder</dtError>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responders</type>
<config>
<entry>
<key>sql</key>
<value>insert into something</value>
</entry>
<entry>
<key>params</key>

210 Chapter 6: Sample XML and JSON Requests and Responses


</entry>
</config>
<connection>
<href>api/projects/1/connections/2d5c8d79-b732-4fe8-ad69-3243d102ed49</
href>
<id>2d5c8d79-b732-4fe8-ad69-3243d102ed49</id>
<rel>connection</rel>
<title>sqlconnection</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>SqlResponder</responderType>
<responderTypeDisplayName>SQL Responder</responderTypeDisplayName>
</responder>
</items>
<total>1</total>
<invalidCount>1</invalidCount>
</artifacts>
Response Code : 200 OK

Update SQL Responder


Use the PUT method to update an SQL responder in RulePoint.

PUT Request in JSON Format


To update an SQL responder in a RulePoint application, generate the following PUT request:
PUT http://localhost:8080/rulepoint/api/projects/1/responders/8bd61211-404b-4cd4-8a84-
f36a7bcdf151
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "hotstockresponder",
"type": "responders",
"responderType": "SqlResponder",
"responderTypeDisplayName": "SQL Responder",
"config": {
"sql": "insert into hot_stocks(symbol, price) values('INFA', 38.90)",
"params": null
},
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/2d5c8d79-b732-4fe8-ad69-3243d102ed49",
"title": "sqlconnection",
"id": "2d5c8d79-b732-4fe8-ad69-3243d102ed49"
}
}

PUT Response in JSON Format


Returns the SQL responder object and response code 200 OK. Returns the error object if an error occurs.
{
"id": "8bd61211-404b-4cd4-8a84-f36a7bcdf151",
"name": "hotstockresponder",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151",
"title": "hotstockresponder",

Responders 211
"id": "8bd61211-404b-4cd4-8a84-f36a7bcdf151"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "createResponse",
"href": "api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151",
"type": "DELETE",
"title": "Create Response"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responders",
"lastModifiedDate": "2013-08-13T12:15:01+05:30",
"createDate": "2013-08-13T12:15:01+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"dtError": "There are no responses associated with this Responder",
"responderType": "SqlResponder",
"responderTypeDisplayName": "SQL Responder",
"config": {
"sql": "insert into hot_stock(symbol, price) values ('INFA', 38.90)",
"params": null
},
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/2d5c8d79-b732-4fe8-ad69-3243d102ed49",
"title": "sqlconnection",
"id": "2d5c8d79-b732-4fe8-ad69-3243d102ed49"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code : 200 OK

PUT Request in XML Format


PUT http://localhost:8080/rulepoint/api/projects/1/responders/8bd61211-404b-4cd4-8a84-
f36a7bcdf151
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

212 Chapter 6: Sample XML and JSON Requests and Responses


PUT Body in XML Format
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<name>hotstockresponder</name>
<type>responders</type>
<config>
<entry>
<key>sql</key>
<value>insert into hot_stocks(symbol, price) values ('INFA', 38.90)</value>
</entry>
<entry>
<key>params</key>
</entry>
</config>
<connection>
<href>api/projects/1/connections/2d5c8d79-b732-4fe8-ad69-3243d102ed49</href>
<id>2d5c8d79-b732-4fe8-ad69-3243d102ed49</id>
<rel>connection</rel>
<title>sqlconnection</title>
</connection>
<responderType>SqlResponder</responderType>
</responder>

PUT Response in XML Format


Returns the SQL responder object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<acl>
<href>api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151</href>
<rel>createResponse</rel>
<title>Create Response</title>
<type>DELETE</type>
</action>
</actions>
<id>8bd61211-404b-4cd4-8a84-f36a7bcdf151</id>
<links/>
<name>mysqlresponder</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151</href>
<id>8bd61211-404b-4cd4-8a84-f36a7bcdf151</id>
<rel>self</rel>
<title>mysqlresponder</title>
</self>
<valid>false</valid>

Responders 213
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<dtError>There are no responses associated with this Responder</dtError>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responders</type>
<config>
<entry>
<key>sql</key>
<value>insert into hot_stock(symbol, price) values ('INFA', 38.90)</value>
</entry>
<entry>
<key>params</key>
</entry>
</config>
<connection>
<href>api/projects/1/connections/2d5c8d79-b732-4fe8-ad69-3243d102ed49</href>
<id>2d5c8d79-b732-4fe8-ad69-3243d102ed49</id>
<rel>connection</rel>
<title>sqlconnection</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>SqlResponder</responderType>
<responderTypeDisplayName>SQL Responder</responderTypeDisplayName>
<responses />
<topics />
</responder>
Response Code : 200 OK

Delete SQL Responder


Use the DELETE method to delete an SQL responder in RulePoint.

DELETE Request in JSON Format


To delete an SQL responder in a RulePoint application, generate the following DELETE request:
DELETE http://localhost:8080/rulepoint/api/projects/1/responders/8bd61211-404b-4cd4-8a84-
f36a7bcdf151
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

DELETE Request in XML Format


DELETE http://localhost:8080/rulepoint/api/projects/1/responders/
8bd61211-404b-4cd4-8a84-f36a7bcdf151
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

214 Chapter 6: Sample XML and JSON Requests and Responses


Email Responder
Use the examples to create, update, or delete an email responder.

Create Email Responder


Use the POST method to create an email responder in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates an email responder in a RulePoint
application.
POST http://localhost:8080/rulepoint/api/projects/1/responders
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "EmailResponder1",
"responderType": "EmailResponder",
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/446f972d-d3ea-4d77-98f8-84816ed4abcb",
"title": "EmailConnection1",
"id": "446f972d-d3ea-4d77-98f8-84816ed4abcb"
},
"valid": true,
"config": {
"to": "sbhimisetty@informatica.com",
"body": "Test email from EmailResponder",
"replyTo": null,
"subject": "Test email subject from EmailResponder",
"sentDate": null,
"bcc": null,
"from": "sbhimisetty@informatica.com",
"contentType": "text",
"cc": null
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}

POST Response in JSON Format


Returns the email responder object and response code. Returns the error object if an error occurs.
{
"id": "26154ed7-41ce-4db4-888f-ce5573e965d1",
"name": "EmailResponder1",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1",
"title": "EmailResponder1",
"id": "26154ed7-41ce-4db4-888f-ce5573e965d1"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1",
"type": "PUT",

Responders 215
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "createResponse",
"href": "api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1",
"type": "DELETE",
"title": "Create Response"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responders",
"lastModifiedDate": "2013-09-13T16:19:50+05:30",
"createDate": "2013-09-13T16:10:38+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"dtError": "There are no responses associated with this Responder",
"responderType": "EmailResponder",
"responderTypeDisplayName": "Email Responder",
"config": {
"to": "sbhimisetty@informatica.com",
"body": "Test email from EmailResponder",
"replyTo": "",
"subject": "Test email subject from EmailResponder",
"sentDate": null,
"bcc": "",
"from": "sbhimisetty@informatica.com",
"contentType": "text",
"cc": ""
},
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/446f972d-d3ea-4d77-98f8-84816ed4abcb",
"title": "EmailConnection1",
"id": "446f972d-d3ea-4d77-98f8-84816ed4abcb"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code : 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates an email responder in a RulePoint
application.
POST http://localhost:8080/rulepoint/api/projects/1/responders
Accept: application/xml

216 Chapter 6: Sample XML and JSON Requests and Responses


Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<name>EmailResponder1</name>
<type>responders</type>
<config>
<entry>
<key>to</key>
<value>sbhimisetty@informatica.com</value>
</entry>
<entry>
<key>body</key>
<value>Test email from EmailResponder</value>
</entry>
<entry>
<key>replyTo</key>
<value/>
</entry>
<entry>
<key>subject</key>
<value>Test email subject from EmailResponder</value>
</entry>
<entry>
<key>sentDate</key>
</entry>
<entry>
<key>bcc</key>
<value/>
</entry>
<entry>
<key>from</key>
<value>sbhimisetty@informatica.com</value>
</entry>
<entry>
<key>contentType</key>
<value>text</value>
</entry>
<entry>
<key>cc</key>
<value/>
</entry>
</config>
<connection>
<href>api/projects/1/connections/446f972d-d3ea-4d77-98f8-84816ed4abcb</href>
<id>446f972d-d3ea-4d77-98f8-84816ed4abcb</id>
<rel>connection</rel>
<title>EmailConnection1</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>EmailResponder</responderType>
</responder>

POST Response in XML Format


Returns the SQL responder object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<acl>
<href>api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>

Responders 217
<action>
<href>api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1</href>
<rel>createResponse</rel>
<title>Create Response</title>
<type>DELETE</type>
</action>
</actions>
<id>26154ed7-41ce-4db4-888f-ce5573e965d1</id>
<links/>
<name>EmailResponder1</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1</href>
<id>26154ed7-41ce-4db4-888f-ce5573e965d1</id>
<rel>self</rel>
<title>EmailResponder1</title>
</self>
<valid>false</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<dtError>There are no responses associated with this Responder</dtError>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responders</type>
<config>
<entry>
<key>to</key>
<value>sbhimisetty@informatica.com</value>
</entry>
<entry>
<key>body</key>
<value>Test email from EmailResponder</value>
</entry>
<entry>
<key>replyTo</key>
<value/>
</entry>
<entry>
<key>subject</key>
<value>Test email subject from EmailResponder</value>
</entry>
<entry>
<key>sentDate</key>
</entry>
<entry>
<key>bcc</key>
<value/>
</entry>
<entry>
<key>from</key>

218 Chapter 6: Sample XML and JSON Requests and Responses


<value>sbhimisetty@informatica.com</value>
</entry>
<entry>
<key>contentType</key>
<value>text</value>
</entry>
<entry>
<key>cc</key>
<value/>
</entry>
</config>
<connection>
<href>api/projects/1/connections/446f972d-d3ea-4d77-98f8-84816ed4abcb</href>
<id>446f972d-d3ea-4d77-98f8-84816ed4abcb</id>
<rel>connection</rel>
<title>EmailConnection1</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>EmailResponder</responderType>
<responderTypeDisplayName>Email Responder</responderTypeDisplayName>
<responses />
<topics />
</responder>
Response Code : 201 Created

Update Email Responder


Use the PUT method to update an email responder in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request creates an email responder in a RulePoint
application.
PUT http://localhost:8080/rulepoint/api/projects/1/responders/26154ed7-41ce-4db4-888f-
ce5573e965d1
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "MyEmailResponder",
"responderType": "EmailResponder",
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/446f972d-d3ea-4d77-98f8-84816ed4abcb",
"title": "EmailConnection1",
"id": "446f972d-d3ea-4d77-98f8-84816ed4abcb"
},
"valid": true,
"config": {
"to": "sbhimisetty@informatica.com",
"body": "Test email from EmailResponder",
"replyTo": null,
"subject": "Test email subject from EmailResponder",
"sentDate": null,
"bcc": null,
"from": "sbhimisetty@informatica.com",
"contentType": "text",
"cc": null
},
"marshaller": {

Responders 219
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}

PUT Response in JSON Format


Returns the email responder object and response code. Returns the error object if an error occurs.
{
"id": "26154ed7-41ce-4db4-888f-ce5573e965d1",
"name": "MyEmailResponder",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1",
"title": "MyEmailResponder",
"id": "26154ed7-41ce-4db4-888f-ce5573e965d1"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "createResponse",
"href": "api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1",
"type": "DELETE",
"title": "Create Response"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responders",
"lastModifiedDate": "2013-09-13T16:19:50+05:30",
"createDate": "2013-09-13T16:10:38+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"dtError": "There are no responses associated with this Responder",
"responderType": "EmailResponder",
"responderTypeDisplayName": "Email Responder",
"config": {
"to": "sbhimisetty@informatica.com",
"body": "Test email from EmailResponder",
"replyTo": "",
"subject": "Test email subject from EmailResponder",
"sentDate": null,
"bcc": "",
"from": "sbhimisetty@informatica.com",

220 Chapter 6: Sample XML and JSON Requests and Responses


"contentType": "text",
"cc": ""
},
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/446f972d-d3ea-4d77-98f8-84816ed4abcb",
"title": "EmailConnection1",
"id": "446f972d-d3ea-4d77-98f8-84816ed4abcb"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code : 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request creates an email responder in a RulePoint
application.
PUT http://localhost:8080/rulepoint/api/projects/1/responders/26154ed7-41ce-4db4-888f-
ce5573e965d1
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<name>MyEmailResponder</name>
<type>responders</type>
<config>
<entry>
<key>to</key>
<value>sbhimisetty@informatica.com</value>
</entry>
<entry>
<key>body</key>
<value>Test email from EmailResponder</value>
</entry>
<entry>
<key>replyTo</key>
<value/>
</entry>
<entry>
<key>subject</key>
<value>Test email subject from EmailResponder</value>
</entry>
<entry>
<key>sentDate</key>
</entry>
<entry>
<key>bcc</key>
<value/>
</entry>
<entry>
<key>from</key>
<value>sbhimisetty@informatica.com</value>
</entry>
<entry>
<key>contentType</key>
<value>text</value>
</entry>
<entry>
<key>cc</key>
<value/>
</entry>

Responders 221
</config>
<connection>
<href>api/projects/1/connections/446f972d-d3ea-4d77-98f8-84816ed4abcb</href>
<id>446f972d-d3ea-4d77-98f8-84816ed4abcb</id>
<rel>connection</rel>
<title>EmailConnection1</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>EmailResponder</responderType>
</responder>

PUT Response in XML Format


Returns the SQL responder object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<acl>
<href>api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1</href>
<rel>createResponse</rel>
<title>Create Response</title>
<type>DELETE</type>
</action>
</actions>
<id>26154ed7-41ce-4db4-888f-ce5573e965d1</id>
<links/>
<name>EmailResponder1</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1</href>
<id>26154ed7-41ce-4db4-888f-ce5573e965d1</id>
<rel>self</rel>
<title>EmailResponder1</title>
</self>
<valid>false</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<dtError>There are no responses associated with this Responder</dtError>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responders</type>
<config>

222 Chapter 6: Sample XML and JSON Requests and Responses


<entry>
<key>to</key>
<value>sbhimisetty@informatica.com</value>
</entry>
<entry>
<key>body</key>
<value>Test email from EmailResponder</value>
</entry>
<entry>
<key>replyTo</key>
<value/>
</entry>
<entry>
<key>subject</key>
<value>Test email subject from EmailResponder</value>
</entry>
<entry>
<key>sentDate</key>
</entry>
<entry>
<key>bcc</key>
<value/>
</entry>
<entry>
<key>from</key>
<value>sbhimisetty@informatica.com</value>
</entry>
<entry>
<key>contentType</key>
<value>text</value>
</entry>
<entry>
<key>cc</key>
<value/>
</entry>
</config>
<connection>
<href>api/projects/1/connections/446f972d-d3ea-4d77-98f8-84816ed4abcb</href>
<id>446f972d-d3ea-4d77-98f8-84816ed4abcb</id>
<rel>connection</rel>
<title>EmailConnection1</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>EmailResponder</responderType>
<responderTypeDisplayName>Email Responder</responderTypeDisplayName>
<responses />
<topics />
</responder>
Response Code : 200 OK

Delete Email Responder


Use the DELETE method to delete an email responder in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes an email responder in a
RulePoint application.
DELETE http://localhost:8080/rulepoint/api/projects/1/responders/26154ed7-41ce-4db4-888f-
ce5573e965d1
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

Responders 223
Response Code: 204 No Content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes an email responder in a
RulePoint application.
DELETE http://localhost:8080/rulepoint/api/projects/1/responders/26154ed7-41ce-4db4-888f-
ce5573e965d1
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

JMS Responder
Use the examples to create, update, or delete a JMS responder.

Create JMS Responder


Use the POST method to create a JMS responder in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates a JMS responder in a RulePoint
application.
POST http://localhost:8080/rulepoint/api/projects/1/responders
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "jmsresponder",
"type": "responders",
"responderType": "JMSResponder",
"config": {
"body": "test message",
"retryCount": "3",
"priority": "4",
"retryDelay": "1000",
"deliveryMode": "2",
"params": null,
"timeToLive": "0",
"destination": "jmsQueue"
},
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25",
"title": "jmsconnection",
"id": "894b2948-ce82-4e0a-9302-267d3482ae25"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}

224 Chapter 6: Sample XML and JSON Requests and Responses


POST Response in JSON Format
Returns the JMS responder object and response code. Returns the error object if an error occurs.
{
"id": "ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7",
"name": "jmsresponder",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7",
"title": "jmsresponder",
"id": "ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createResponse",
"href": "api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7",
"type": "DELETE",
"title": "Create Response"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responders",
"lastModifiedDate": "2013-08-23T15:20:20+05:30",
"createDate": "2013-08-23T15:20:14+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responderType": "JMSResponder",
"responderTypeDisplayName": "JMS Responder",
"config": {
"body": "test message",
"retryCount": "3",
"priority": "4",
"retryDelay": "1000",
"deliveryMode": "2",
"params": null,
"timeToLive": "0",
"destination": "jmsQueue"

Responders 225
},
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25",
"title": "jmsconnection",
"id": "894b2948-ce82-4e0a-9302-267d3482ae25"
},
"responses": [
{
"href": "api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755",
"title": "jmsresponder_response",
"objectType": "responses",
"id": "acb4152d-d034-468d-be96-d95178200755"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code : 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates a JMS responder in a RulePoint
application.
POST http://localhost:8080/rulepoint/api/projects/1/responders
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<name>jmsresponder</name>
<type>responders</type>
<config>
<entry>
<key>body</key>
<value>test message</value>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>priority</key>
<value>4</value>
</entry>
<entry>
<key>retryDelay</key>
<value>1000</value>
</entry>
<entry>
<key>deliveryMode</key>
<value>2</value>
</entry>
<entry>
<key>params</key>
</entry>
<entry>
<key>timeToLive</key>
<value>0</value>
</entry>
<entry>
<key>destination</key>
<value>jmsQueue</value>

226 Chapter 6: Sample XML and JSON Requests and Responses


</entry>
</config>
<connection>
<href>api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25</href>
<id>894b2948-ce82-4e0a-9302-267d3482ae25</id>
<rel>connection</rel>
<title>jmsconnection</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>JMSResponder</responderType>
</responder>

POST Response in XML Format


Returns the SQL responder object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<acl>
<href>api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/deploy</href>
<rel>deploy</rel>
<title>Deploy</title>
<type>POST</type>
</action>
<action>
<href>api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</href>
<rel>createResponse</rel>
<title>Create Response</title>
<type>DELETE</type>
</action>
</actions>
<id>ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</id>
<links/>
<name>jmsresponder</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</href>
<id>ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</id>
<rel>self</rel>
<title>jmsresponder</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>

Responders 227
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responders</type>
<config>
<entry>
<key>body</key>
<value>test message</value>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>priority</key>
<value>4</value>
</entry>
<entry>
<key>retryDelay</key>
<value>1000</value>
</entry>
<entry>
<key>deliveryMode</key>
<value>2</value>
</entry>
<entry>
<key>params</key>
</entry>
<entry>
<key>timeToLive</key>
<value>0</value>
</entry>
<entry>
<key>destination</key>
<value>jmsQueue</value>
</entry>
</config>
<connection>
<href>api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25</href>
<id>894b2948-ce82-4e0a-9302-267d3482ae25</id>
<rel>connection</rel>
<title>jmsconnection</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>JMSResponder</responderType>
<responses />
<topics />
</responder>
Response Code : 201 Created

Update JMS Responder


Use the PUT method to update a JMS responder in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates a JMS responder in a RulePoint
application.
PUT http://localhost:8080/rulepoint/api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-
ffcd35c1f8f7
Accept: application/json

228 Chapter 6: Sample XML and JSON Requests and Responses


Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "ActiveMQResponder",
"type": "responders",
"responderType": "JMSResponder",
"config": {
"body": "test message",
"retryCount": "3",
"priority": "4",
"retryDelay": "1000",
"deliveryMode": "2",
"params": null,
"timeToLive": "0",
"destination": "jmsQueue"
},
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25",
"title": "jmsconnection",
"id": "894b2948-ce82-4e0a-9302-267d3482ae25"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}

PUT Response in JSON Format


Returns the JMS responder object and response code. Returns the error object if an error occurs.
{
"id": "ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7",
"name": "ActiveMQResponder",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7",
"title": "ActiveMQResponder",
"id": "ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createResponse",
"href": "api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7",
"type": "DELETE",
"title": "Create Response"

Responders 229
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responders",
"lastModifiedDate": "2013-08-23T15:20:20+05:30",
"createDate": "2013-08-23T15:20:14+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responderType": "JMSResponder",
"responderTypeDisplayName": "JMS Responder",
"config": {
"body": "test message",
"retryCount": "3",
"priority": "4",
"retryDelay": "1000",
"deliveryMode": "2",
"params": null,
"timeToLive": "0",
"destination": "jmsQueue"
},
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25",
"title": "jmsconnection",
"id": "894b2948-ce82-4e0a-9302-267d3482ae25"
},
"responses": [
{
"href": "api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755",
"title": "jmsresponder_response",
"objectType": "responses",
"id": "acb4152d-d034-468d-be96-d95178200755"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code : 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates a JMS responder in a RulePoint
application.
PUT http://localhost:8080/rulepoint/api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-
ffcd35c1f8f7
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>

230 Chapter 6: Sample XML and JSON Requests and Responses


<name>ActiveMQResponder</name>
<type>responders</type>
<config>
<entry>
<key>body</key>
<value>test message</value>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>priority</key>
<value>4</value>
</entry>
<entry>
<key>retryDelay</key>
<value>1000</value>
</entry>
<entry>
<key>deliveryMode</key>
<value>2</value>
</entry>
<entry>
<key>params</key>
</entry>
<entry>
<key>timeToLive</key>
<value>0</value>
</entry>
<entry>
<key>destination</key>
<value>jmsQueue</value>
</entry>
</config>
<connection>
<href>api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25</href>
<id>894b2948-ce82-4e0a-9302-267d3482ae25</id>
<rel>connection</rel>
<title>jmsconnection</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>JMSResponder</responderType>
</responder>

PUT Response in XML Format


Returns the SQL responder object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<acl>
<href>api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>

Responders 231
</action>
<action>
<href>api/projects/1/deploy</href>
<rel>deploy</rel>
<title>Deploy</title>
<type>POST</type>
</action>
<action>
<href>api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</href>
<rel>createResponse</rel>
<title>Create Response</title>
<type>DELETE</type>
</action>
</actions>
<id>ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</id>
<links/>
<name>jmsresponder</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</href>
<id>ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</id>
<rel>self</rel>
<title>jmsresponder</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responders</type>
<config>
<entry>
<key>body</key>
<value>test message</value>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>priority</key>
<value>4</value>
</entry>
<entry>
<key>retryDelay</key>
<value>1000</value>
</entry>
<entry>
<key>deliveryMode</key>
<value>2</value>
</entry>
<entry>
<key>params</key>
</entry>
<entry>
<key>timeToLive</key>
<value>0</value>
</entry>
<entry>
<key>destination</key>
<value>jmsQueue</value>
</entry>

232 Chapter 6: Sample XML and JSON Requests and Responses


</config>
<connection>
<href>api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25</href>
<id>894b2948-ce82-4e0a-9302-267d3482ae25</id>
<rel>connection</rel>
<title>jmsconnection</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>JMSResponder</responderType>
<responses />
<topics />
</responder>
Response Code : 200 OK

Delete JMS Responder


Use the DELETE method to delete a JMS responder in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes a JMS responder in a
RulePoint application.
DELETE http://localhost:8080/rulepoint/api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-
ffcd35c1f8f7
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes a JMS responder in a
RulePoint application.
DELETE http://localhost:8080/rulepoint/api/projects/1/responders/
ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7 Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

Web Service Responder


Use the examples to create, update, or delete a web service responder.

Create Web Service Responder


Use the POST method to create a web service responder in RulePoint.

POST Request in JSON Format


To create a web service responder in a RulePoint application, generate the following POST request:
POST http://localhost:8080/rulepoint/api/projects/1/responders
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

Responders 233
POST Body in JSON Format
{
"name": "wsResponder1",
"description": "",
"responderType": "webService",
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052",
"title": "WsConnection1",
"id": "e9bcc9ae-8e78-4b2c-a3f4-48352e817052"
},
"valid": true,
"config": {
"serviceName": "HelloWorldServices",
"operation": "hello",
"inputParameters": "hello.name=Chris"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {}
}
}

POST Response in JSON Format


Returns the web service responder object and response code 201 OK. Returns the error object if an error
occurs.
{
"id": "776acc35-7a4a-47e1-8b9a-07f7d8bb6f01",
"name": "wsResponder1",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01",
"title": "wsResponder1",
"id": "776acc35-7a4a-47e1-8b9a-07f7d8bb6f01"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "createResponse",
"href": "api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01",
"type": "DELETE",
"title": "Create Response"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},

234 Chapter 6: Sample XML and JSON Requests and Responses


"type": "responders",
"lastModifiedDate": "2013-09-13T17:05:02+05:30",
"createDate": "2013-09-13T17:05:02+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"dtError": "There are no responses associated with this Responder",
"responderType": "webService",
"responderTypeDisplayName": "Web Service Responder",
"config": {
"operation": "hello",
"inputParameters": "hello.name=Chris",
"serviceName": "HelloWorldServices"
},
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052",
"title": "WsConnection1",
"id": "e9bcc9ae-8e78-4b2c-a3f4-48352e817052"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": null,
"marshallerThreadsafe": false
}
}
Response Code : 201 Created

POST Request in XML Format


POST http://localhost:8080/rulepoint/api/projects/1/responders
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<name>wsResponder1</name>
<type>responders</type>
<config>
<entry>
<key>operation</key>
<value>hello</value>
</entry>
<entry>
<key>inputParameters</key>
<value>hello.name=Chris</value>
</entry>
<entry>
<key>serviceName</key>
<value>HelloWorldServices</value>
</entry>
</config>
<connection>
<href>api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052</href>
<id>e9bcc9ae-8e78-4b2c-a3f4-48352e817052</id>
<rel>connection</rel>
<title>WsConnection1</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>webService</responderType>
</responder>

Responders 235
POST Response in XML Format
Returns the web service responder object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<acl>
<href>api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01</href>
<rel>createResponse</rel>
<title>Create Response</title>
<type>DELETE</type>
</action>
</actions>
<id>776acc35-7a4a-47e1-8b9a-07f7d8bb6f01</id>
<links/>
<name>wsResponder1</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01</href>
<id>776acc35-7a4a-47e1-8b9a-07f7d8bb6f01</id>
<rel>self</rel>
<title>wsResponder1</title>
</self>
<valid>false</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<dtError>There are no responses associated with this Responder</dtError>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responders</type>
<config>
<entry>
<key>operation</key>
<value>hello</value>
</entry>
<entry>
<key>inputParameters</key>
<value>hello.name=Chris</value>
</entry>
<entry>
<key>serviceName</key>
<value>HelloWorldServices</value>
</entry>
</config>

236 Chapter 6: Sample XML and JSON Requests and Responses


<connection>
<href>api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052</href>
<id>e9bcc9ae-8e78-4b2c-a3f4-48352e817052</id>
<rel>connection</rel>
<title>WsConnection1</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>webService</responderType>
<responderTypeDisplayName>Web Service Responder</responderTypeDisplayName>
<responses />
<topics />
</responder>
Response Code : 201 Created

Update Web Service Responder


Use the PUT method to update a web service responder in RulePoint.

PUT Request in JSON Format


To update a web service responder in a RulePoint application, generate the following PUT request:
PUT http://localhost:8080/rulepoint/api/projects/1/responders/
776acc35-7a4a-47e1-8b9a-07f7d8bb6f01
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "MyWebServiceResponder",
"responderType": "webService",
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052",
"title": "WsConnection1",
"id": "e9bcc9ae-8e78-4b2c-a3f4-48352e817052"
},
"valid": true,
"config": {
"serviceName": "HelloWorldServices",
"operation": "hello",
"inputParameters": "hello.name=Chris"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}

PUT Response in JSON Format


Returns the web service responder object and response code. Returns the error object if an error occurs.
{
"id": "776acc35-7a4a-47e1-8b9a-07f7d8bb6f01",
"name": "MyWebServiceResponder",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01",
"title": "MyWebServiceResponder",

Responders 237
"id": "776acc35-7a4a-47e1-8b9a-07f7d8bb6f01"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "createResponse",
"href": "api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01",
"type": "DELETE",
"title": "Create Response"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responders",
"lastModifiedDate": "2013-09-13T17:06:27+05:30",
"createDate": "2013-09-13T17:05:02+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"dtError": "There are no responses associated with this Responder",
"responderType": "webService",
"responderTypeDisplayName": "Web Service Responder",
"config": {
"operation": "hello",
"inputParameters": "hello.name=Chris",
"serviceName": "HelloWorldServices"
},
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052",
"title": "WsConnection1",
"id": "e9bcc9ae-8e78-4b2c-a3f4-48352e817052"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code : 200 OK

PUT Request in XML Format


PUT http://localhost:8080/rulepoint/api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-
ffcd35c1f8f7
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

238 Chapter 6: Sample XML and JSON Requests and Responses


PUT Body in XML Format
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<name>MyWebServiceResponder</name>
<type>responders</type>
<config>
<entry>
<key>operation</key>
<value>hello</value>
</entry>
<entry>
<key>inputParameters</key>
<value>hello.name=Chris</value>
</entry>
<entry>
<key>serviceName</key>
<value>HelloWorldServices</value>
</entry>
</config>
<connection>
<href>api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052</href>
<id>e9bcc9ae-8e78-4b2c-a3f4-48352e817052</id>
<rel>connection</rel>
<title>WsConnection1</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>webService</responderType>
</responder>

PUT Response in XML Format


Returns the SQL responder object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<acl>
<href>api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01</href>
<rel>createResponse</rel>
<title>Create Response</title>
<type>DELETE</type>
</action>
</actions>
<id>776acc35-7a4a-47e1-8b9a-07f7d8bb6f01</id>
<links/>
<name>wsResponder1</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>

Responders 239
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01</href>
<id>776acc35-7a4a-47e1-8b9a-07f7d8bb6f01</id>
<rel>self</rel>
<title>wsResponder1</title>
</self>
<valid>false</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<dtError>There are no responses associated with this Responder</dtError>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responders</type>
<config>
<entry>
<key>operation</key>
<value>hello</value>
</entry>
<entry>
<key>inputParameters</key>
<value>hello.name=Chris</value>
</entry>
<entry>
<key>serviceName</key>
<value>HelloWorldServices</value>
</entry>
</config>
<connection>
<href>api/projects/1/connections/e9bcc9ae-8e78-4b2c-a3f4-48352e817052</href>
<id>e9bcc9ae-8e78-4b2c-a3f4-48352e817052</id>
<rel>connection</rel>
<title>WsConnection1</title>
</connection>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>webService</responderType>
<responderTypeDisplayName>Web Service Responder</responderTypeDisplayName>
<responses />
<topics />
</responder>
Response Code : 200 OK

Delete Web Service Responder


Use the DELETE method to delete a web service responder in RulePoint.

DELETE Request in JSON Format


To delete a web service responder in a RulePoint application, generate the following DELETE request:
DELETE http://localhost:8080/rulepoint/api/projects/1/responders/
776acc35-7a4a-47e1-8b9a-07f7d8bb6f01
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

240 Chapter 6: Sample XML and JSON Requests and Responses


DELETE Request in XML Format
DELETE http://localhost:8080/rulepoint/api/projects/1/responders/
776acc35-7a4a-47e1-8b9a-07f7d8bb6f01
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

Event Transformer Responder


Use the examples to create, update, or delete an event transformer responder.

Create Event Transformer Responder


Use the POST method to create an event transformer responder in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates an event transformer responder
in a RulePoint application.
POST http://localhost:8080/rulepoint/api/projects/1/responders
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "event_transformer",
"description": "",
"responderType": "EventTransformer",
"connection": null,
"valid": true,
"config": {
"properties": "*",
"topic": "topic1 as topic2",
"params": "newproperty=100"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {}
}
}

POST Response in JSON Format


Returns the event transformer responder object and response code. Returns the error object if an error
occurs.
{
"id": "c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5",
"name": "event_transformer",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5",
"title": "event_transformer",
"id": "c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5"
},
"actions": [
{
"rel": "update",

Responders 241
"href": "api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "createResponse",
"href": "api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5",
"type": "DELETE",
"title": "Create Response"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responders",
"lastModifiedDate": "2013-09-19T18:05:16+05:30",
"createDate": "2013-09-19T18:05:16+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"dtError": "There are no responses associated with this Responder",
"responderType": "EventTransformer",
"responderTypeDisplayName": "Event Transformer",
"config": {
"topic": "topic1 as topic2",
"params": "newproperty=100",
"properties": "*"
},
"topics": [
{
"href": "api/projects/1/topics/ff702fca-cfc3-4268-aa90-5449cffa030e",
"title": "topic2",
"objectType": "topics",
"id": "ff702fca-cfc3-4268-aa90-5449cffa030e"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": null,
"marshallerThreadsafe": false
}
}
Response Code : 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates an event transformer responder
in a RulePoint application.
POST http://localhost:8080/rulepoint/api/projects/1/responders
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

242 Chapter 6: Sample XML and JSON Requests and Responses


POST Body in XML Format
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<name>event_transformer</name>
<type>responders</type>
<config>
<entry>
<key>topic</key>
<value>topic1 as topic2</value>
</entry>
<entry>
<key>params</key>
<value>newproperty=100</value>
</entry>
<entry>
<key>properties</key>
<value>*</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>EventTransformer</responderType>
<topics>
<href>api/projects/1/topics/ff702fca-cfc3-4268-aa90-5449cffa030e</href>
<id>ff702fca-cfc3-4268-aa90-5449cffa030e</id>
<objectType>topics</objectType>
<title>topic2</title>
</topics>
</responder>

POST Response in XML Format


Returns the event transformer responder object and response code. Returns the error object if an error
occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<acl>
<href>api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5</href>
<rel>createResponse</rel>
<title>Create Response</title>
<type>DELETE</type>
</action>
</actions>
<id>c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5</id>
<links/>
<name>event_transformer</name>
<owningProject>
<href>api/projects/1</href>

Responders 243
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5</href>
<id>c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5</id>
<rel>self</rel>
<title>event_transformer</title>
</self>
<valid>false</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<dtError>There are no responses associated with this Responder</dtError>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responders</type>
<config>
<entry>
<key>topic</key>
<value>topic1 as topic2</value>
</entry>
<entry>
<key>params</key>
<value>newproperty=100</value>
</entry>
<entry>
<key>properties</key>
<value>*</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>EventTransformer</responderType>
<responderTypeDisplayName>Event Transformer</responderTypeDisplayName>
<responses />
<topics>
<topic>
<href>api/projects/1/topics/ff702fca-cfc3-4268-aa90-5449cffa030e</href>
<id>ff702fca-cfc3-4268-aa90-5449cffa030e</id>
<objectType>topics</objectType>
<title>topic2</title>
</topic>
</topics>
</responder>
Response Code : 201 Created

Update Event Transformer Responder


Use the PUT method to update an event transformer responder in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates an event transformer responder in a
RulePoint application.
PUT http://invrw28cep14:8080/rulepoint/api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-
f8c61a8cf7b5
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

244 Chapter 6: Sample XML and JSON Requests and Responses


PUT Body in JSON Format
{
"name": "MyEventTransformer",
"responderType": "EventTransformer",
"connection": null,
"valid": true,
"config": {
"topic": "topic1 as topic2",
"params": "newproperty=100",
"properties": "*"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}

PUT Response in JSON Format


Returns the event transformer responder object and response code. Returns the error object if an error
occurs.
{
"id": "c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5",
"name": "MyEventTransformer",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5",
"title": "MyEventTransformer",
"id": "c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "createResponse",
"href": "api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5",
"type": "DELETE",
"title": "Create Response"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responders",
"lastModifiedDate": "2013-09-19T18:09:14+05:30",
"createDate": "2013-09-19T18:05:16+05:30",
"createdBy": "Administrator",
"predefined": false,

Responders 245
"deployable": true,
"deployState": "DRAFT",
"force": false,
"dtError": "There are no responses associated with this Responder",
"responderType": "EventTransformer",
"responderTypeDisplayName": "Event Transformer",
"config": {
"topic": "topic1 as topic2",
"params": "newproperty=100",
"properties": "*"
},
"topics": [
{
"href": "api/projects/1/topics/ff702fca-cfc3-4268-aa90-5449cffa030e",
"title": "topic2",
"objectType": "topics",
"id": "ff702fca-cfc3-4268-aa90-5449cffa030e"
}
],
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code : 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates an event transformer responder in a
RulePoint application.
PUT http://invrw28cep14:8080/rulepoint/api/projects/1/responders/c1e571f9-6d29-4d4b-
bb78-f8c61a8cf7b5
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<name>MyEventTransformer</name>
<type>responders</type>
<config>
<entry>
<key>topic</key>
<value>topic1 as topic2</value>
</entry>
<entry>
<key>params</key>
<value>newproperty=100</value>
</entry>
<entry>
<key>properties</key>
<value>*</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>EventTransformer</responderType>
<topics>
<href>api/projects/1/topics/ff702fca-cfc3-4268-aa90-5449cffa030e</href>
<id>ff702fca-cfc3-4268-aa90-5449cffa030e</id>
<objectType>topics</objectType>
<title>topic2</title>
</topics>
</responder>

246 Chapter 6: Sample XML and JSON Requests and Responses


PUT Response in XML Format
Returns the event transformer responder object and response code. Returns the error object if an error
occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<acl>
<href>api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5</href>
<rel>createResponse</rel>
<title>Create Response</title>
<type>DELETE</type>
</action>
</actions>
<id>c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5</id>
<links/>
<name>event_transformer</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5</href>
<id>c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5</id>
<rel>self</rel>
<title>event_transformer</title>
</self>
<valid>false</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<dtError>There are no responses associated with this Responder</dtError>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responders</type>
<config>
<entry>
<key>topic</key>
<value>topic1 as topic2</value>
</entry>
<entry>
<key>params</key>
<value>newproperty=100</value>
</entry>
<entry>
<key>properties</key>
<value>*</value>
</entry>

Responders 247
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>EventTransformer</responderType>
<responderTypeDisplayName>Event Transformer</responderTypeDisplayName>
<responses />
<topics>
<topic>
<href>api/projects/1/topics/ff702fca-cfc3-4268-aa90-5449cffa030e</href>
<id>ff702fca-cfc3-4268-aa90-5449cffa030e</id>
<objectType>topics</objectType>
<title>topic2</title>
</topic>
</topics>
</responder>
Response Code : 200 OK

Delete Event Transformer Responder


Use the DELETE method to delete an event transformer responder in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes an event transformer
responder in a RulePoint application.
DELETE http://invrw28cep14:8080/rulepoint/api/projects/1/responders/c1e571f9-6d29-4d4b-
bb78-f8c61a8cf7b5
Accept: application/json
Content-Type: application/json`
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes an event transformer
responder in a RulePoint application.
DELETE http://invrw28cep14:8080/rulepoint/api/projects/1/responders/c1e571f9-6d29-4d4b-
bb78-f8c61a8cf7b5
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

248 Chapter 6: Sample XML and JSON Requests and Responses


File Output Responder
Use the examples to create, update, or delete a file output responder.

Create File Output Responder


Use the POST method to create a file output responder in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates a file output responder in a
RulePoint application.
POST http://localhost:8080/rulepoint/api/projects/1/responders
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "fileout_responder",
"description": "",
"responderType": "fileOutput",
"connection": null,
"valid": true,
"config": {
"contents": "writing to my out file",
"filename": "response.out",
"mode": "append"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {}
}
}

POST Response in JSON Format


Returns the file output responder object and response code. Returns the error object if an error occurs.
{
"id": "757f8948-dc3c-4a52-a755-c261e2010005",
"name": "fileout_responder",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/1/responders/757f8948-dc3c-4a52-a755-c261e2010005",
"title": "fileout_responder",
"id": "757f8948-dc3c-4a52-a755-c261e2010005"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responders/757f8948-dc3c-4a52-a755-c261e2010005",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responders/757f8948-dc3c-4a52-a755-c261e2010005",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "createResponse",
"href": "api/projects/1/responders/757f8948-dc3c-4a52-a755-c261e2010005",

Responders 249
"type": "DELETE",
"title": "Create Response"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responders/757f8948-dc3c-4a52-a755-c261e2010005/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responders",
"lastModifiedDate": "2013-09-19T18:21:25+05:30",
"createDate": "2013-09-19T18:21:25+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"dtError": "There are no responses associated with this Responder",
"responderType": "fileOutput",
"responderTypeDisplayName": "File Responder",
"config": {
"contents": "writing to my out file",
"filename": "response.out",
"mode": "append"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": null,
"marshallerThreadsafe": false
}
}
Response Code : 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates a file output responder in a
RulePoint application.
POST http://localhost:8080/rulepoint/api/projects/1/responders
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<name>fileout_responder</name>
<type>responders</type>
<config>
<entry>
<key>contents</key>
<value>writing to my out file</value>
</entry>
<entry>
<key>filename</key>
<value>response.out</value>
</entry>
<entry>
<key>mode</key>
<value>append</value>
</entry>
</config>
<marshaller>

250 Chapter 6: Sample XML and JSON Requests and Responses


<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>fileOutput</responderType>
</responder>

POST Response in XML Format


Returns the file output responder object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<acl>
<href>api/projects/1/responders/757f8948-dc3c-4a52-a755-c261e2010005/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responders/757f8948-dc3c-4a52-a755-c261e2010005</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responders/757f8948-dc3c-4a52-a755-c261e2010005</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/responders/757f8948-dc3c-4a52-a755-c261e2010005</href>
<rel>createResponse</rel>
<title>Create Response</title>
<type>DELETE</type>
</action>
</actions>
<id>757f8948-dc3c-4a52-a755-c261e2010005</id>
<links/>
<name>fileout_responder</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responders/757f8948-dc3c-4a52-a755-c261e2010005</href>
<id>757f8948-dc3c-4a52-a755-c261e2010005</id>
<rel>self</rel>
<title>fileout_responder</title>
</self>
<valid>false</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<dtError>There are no responses associated with this Responder</dtError>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responders</type>
<config>
<entry>
<key>contents</key>
<value>writing to my out file</value>
</entry>
<entry>
<key>filename</key>
<value>response.out</value>
</entry>

Responders 251
<entry>
<key>mode</key>
<value>append</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>fileOutput</responderType>
<responderTypeDisplayName>File Responder</responderTypeDisplayName>
<responses />
<topics />
</responder>
Response Code : 201 Created

Update File Output Responder


Use the PUT method to update a file output responder in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates a file output responder in a
RulePoint application.
PUT http://invrw28cep14:8080/rulepoint/api/projects/1/responders/757f8948-dc3c-4a52-a755-
c261e2010005
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "MyFileOutputResponder",
"responderType": "fileOutput",
"connection": null,
"valid": true,
"config": {
"contents": "writing to my out file",
"filename": "response.out",
"mode": "append"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}

PUT Response in JSON Format


Returns the file output responder object and response code. Returns the error object if an error occurs.
{
"id": "757f8948-dc3c-4a52-a755-c261e2010005",
"name": "MyFileOutputResponder",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/1/responders/757f8948-dc3c-4a52-a755-c261e2010005",
"title": "MyFileOutputResponder",
"id": "757f8948-dc3c-4a52-a755-c261e2010005"
},
"actions": [
{
"rel": "update",

252 Chapter 6: Sample XML and JSON Requests and Responses


"href": "api/projects/1/responders/757f8948-dc3c-4a52-a755-c261e2010005",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responders/757f8948-dc3c-4a52-a755-c261e2010005",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "createResponse",
"href": "api/projects/1/responders/757f8948-dc3c-4a52-a755-c261e2010005",
"type": "DELETE",
"title": "Create Response"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responders/757f8948-dc3c-4a52-a755-c261e2010005/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responders",
"lastModifiedDate": "2013-09-19T18:24:53+05:30",
"createDate": "2013-09-19T18:21:25+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"dtError": "There are no responses associated with this Responder",
"responderType": "fileOutput",
"responderTypeDisplayName": "File Responder",
"config": {
"contents": "writing to my out file",
"filename": "response.out",
"mode": "append"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code : 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates a file output responder in a
RulePoint application.
PUT http://invrw28cep14:8080/rulepoint/api/projects/1/responders/757f8948-dc3c-4a52-a755-
c261e2010005
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<name>MyFileOutputResponder</name>
<type>responders</type>
<config>

Responders 253
<entry>
<key>contents</key>
<value>writing to my out file</value>
</entry>
<entry>
<key>filename</key>
<value>response.out</value>
</entry>
<entry>
<key>mode</key>
<value>append</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>fileOutput</responderType>
</responder>

PUT Response in XML Format


Returns the file output responder object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<acl>
<href>api/projects/1/responders/757f8948-dc3c-4a52-a755-c261e2010005/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responders/757f8948-dc3c-4a52-a755-c261e2010005</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responders/757f8948-dc3c-4a52-a755-c261e2010005</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/responders/757f8948-dc3c-4a52-a755-c261e2010005</href>
<rel>createResponse</rel>
<title>Create Response</title>
<type>DELETE</type>
</action>
</actions>
<id>757f8948-dc3c-4a52-a755-c261e2010005</id>
<links/>
<name>fileout_responder</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responders/757f8948-dc3c-4a52-a755-c261e2010005</href>
<id>757f8948-dc3c-4a52-a755-c261e2010005</id>
<rel>self</rel>
<title>fileout_responder</title>
</self>
<valid>false</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>

254 Chapter 6: Sample XML and JSON Requests and Responses


<dtError>There are no responses associated with this Responder</dtError>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responders</type>
<config>
<entry>
<key>contents</key>
<value>writing to my out file</value>
</entry>
<entry>
<key>filename</key>
<value>response.out</value>
</entry>
<entry>
<key>mode</key>
<value>append</value>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>fileOutput</responderType>
<responderTypeDisplayName>File Responder</responderTypeDisplayName>
<responses />
<topics />
</responder>
Response Code : 200 OK

Delete File Output Responder


Use the DELETE method to delete a file output responder in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes a file output responder in a
RulePoint application.
DELETE http://invrw28cep14:8080/rulepoint/api/projects/1/responders/757f8948-dc3c-4a52-
a755-c261e2010005
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes a file output responder in a
RulePoint application.
DELETE http://invrw28cep14:8080/rulepoint/api/projects/1/responders/757f8948-dc3c-4a52-
a755-c261e2010005
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

Responders 255
RTAM Responder
Use the examples to create, update, or delete a RTAM responder.

Create RTAM Responder


Use the POST method to create an RTAM responder in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates an RTAM responder in a
RulePoint application.
POST http://localhost:8080/rulepoint/api/projects/1/responders
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "rtamresponder",
"description": "",
"responderType": "RTAMResponder",
"connection": null,
"valid": true,
"config": {
"to": "Administrator",
"groups": null,
"subject": "RTAM Alert Subject",
"body": "RTAM Alert Body",
"actions": null,
"channels": null,
"header": null,
"metadata": null,
"priority": "3"
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {}
}
}

POST Response in JSON Format


Returns the RTAM responder object and response code. Returns the error object if an error occurs.
{
"id": "d4c831d8-e031-4119-ac1b-28d4e785ab54",
"name": "rtamresponder",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54",
"title": "rtamresponder",
"id": "d4c831d8-e031-4119-ac1b-28d4e785ab54"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54",

256 Chapter 6: Sample XML and JSON Requests and Responses


"type": "DELETE",
"title": "Delete"
},
{
"rel": "createResponse",
"href": "api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54",
"type": "DELETE",
"title": "Create Response"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responders",
"lastModifiedDate": "2013-09-19T17:43:33+05:30",
"createDate": "2013-09-19T17:43:33+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"dtError": "There are no responses associated with this Responder",
"responderType": "RTAMResponder",
"responderTypeDisplayName": "RTAM Responder",
"config": {
"to": "Administrator",
"body": "RTAM Alert Body",
"subject": "RTAM Alert Subject",
"priority": "3",
"channels": "",
"header": "",
"actions": "",
"groups": "",
"metadata": null
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": null,
"marshallerThreadsafe": false
}
}
Response Code : 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates an RTAM responder in a
RulePoint application.
POST http://localhost:8080/rulepoint/api/projects/1/responders
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<name>rtamresponder</name>
<type>responders</type>
<config>
<entry>
<key>to</key>

Responders 257
<value>Administrator</value>
</entry>
<entry>
<key>body</key>
<value>RTAM Alert Body</value>
</entry>
<entry>
<key>subject</key>
<value>RTAM Alert Subject</value>
</entry>
<entry>
<key>priority</key>
<value>3</value>
</entry>
<entry>
<key>channels</key>
<value/>
</entry>
<entry>
<key>header</key>
<value/>
</entry>
<entry>
<key>actions</key>
<value/>
</entry>
<entry>
<key>groups</key>
<value/>
</entry>
<entry>
<key>metadata</key>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>RTAMResponder</responderType>
</responder>

POST Response in XML Format


Returns the RTAM responder object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<acl>
<href>api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54</href>
<rel>createResponse</rel>
<title>Create Response</title>
<type>DELETE</type>
</action>

258 Chapter 6: Sample XML and JSON Requests and Responses


</actions>
<id>d4c831d8-e031-4119-ac1b-28d4e785ab54</id>
<links/>
<name>rtamresponder</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54</href>
<id>d4c831d8-e031-4119-ac1b-28d4e785ab54</id>
<rel>self</rel>
<title>rtamresponder</title>
</self>
<valid>false</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<dtError>There are no responses associated with this Responder</dtError>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responders</type>
<config>
<entry>
<key>to</key>
<value>Administrator</value>
</entry>
<entry>
<key>body</key>
<value>RTAM Alert Body</value>
</entry>
<entry>
<key>subject</key>
<value>RTAM Alert Subject</value>
</entry>
<entry>
<key>priority</key>
<value>3</value>
</entry>
<entry>
<key>channels</key>
<value/>
</entry>
<entry>
<key>header</key>
<value/>
</entry>
<entry>
<key>actions</key>
<value/>
</entry>
<entry>
<key>groups</key>
<value/>
</entry>
<entry>
<key>metadata</key>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>RTAMResponder</responderType>
<responderTypeDisplayName>RTAM Responder</responderTypeDisplayName>
<responses />

Responders 259
<topics />
</responder>
Response Code : 201 Created

Update RTAM Responder


Use the PUT method to update a RTAM responder in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates an RTAM responder in a RulePoint
application.
http://invrw28cep14:8080/rulepoint/api/projects/1/responders/d4c831d8-e031-4119-
ac1b-28d4e785ab54
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "MyRTAMResponder",
"responderType": "RTAMResponder",
"connection": null,
"valid": true,
"config": {
"to": "Administrator",
"body": "RTAM Alert Body",
"subject": "RTAM Alert Subject",
"priority": "3",
"channels": null,
"header": null,
"actions": null,
"groups": null,
"metadata": null
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}

PUT Response in JSON Format


Returns the RTAM responder object and response code. Returns the error object if an error occurs.
{
"id": "d4c831d8-e031-4119-ac1b-28d4e785ab54",
"name": "MyRTAMResponder",
"valid": false,
"self": {
"rel": "self",
"href": "api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54",
"title": "MyRTAMResponder",
"id": "d4c831d8-e031-4119-ac1b-28d4e785ab54"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",

260 Chapter 6: Sample XML and JSON Requests and Responses


"href": "api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "createResponse",
"href": "api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54",
"type": "DELETE",
"title": "Create Response"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responders",
"lastModifiedDate": "2013-09-19T17:49:26+05:30",
"createDate": "2013-09-19T17:43:33+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"dtError": "There are no responses associated with this Responder",
"responderType": "RTAMResponder",
"responderTypeDisplayName": "RTAM Responder",
"config": {
"to": "Administrator",
"body": "RTAM Alert Body",
"subject": "RTAM Alert Subject",
"priority": "3",
"channels": "",
"header": "",
"actions": "",
"groups": "",
"metadata": null
},
"marshaller": {
"marshallerClassname": null,
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code : 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates an RTAM responder in a RulePoint
application.
PUT http://invrw28cep14:8080/rulepoint/api/projects/1/responders/d4c831d8-e031-4119-
ac1b-28d4e785ab54
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<name>MyRTAMResponder</name>
<type>responders</type>
<config>

Responders 261
<entry>
<key>to</key>
<value>Administrator</value>
</entry>
<entry>
<key>body</key>
<value>RTAM Alert Body</value>
</entry>
<entry>
<key>subject</key>
<value>RTAM Alert Subject</value>
</entry>
<entry>
<key>priority</key>
<value>3</value>
</entry>
<entry>
<key>channels</key>
<value/>
</entry>
<entry>
<key>header</key>
<value/>
</entry>
<entry>
<key>actions</key>
<value/>
</entry>
<entry>
<key>groups</key>
<value/>
</entry>
<entry>
<key>metadata</key>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>RTAMResponder</responderType>
</responder>

PUT Response in XML Format


Returns the RTAM responder object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<responder>
<acl>
<href>api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54</href>
<rel>createResponse</rel>
<title>Create Response</title>

262 Chapter 6: Sample XML and JSON Requests and Responses


<type>DELETE</type>
</action>
</actions>
<id>d4c831d8-e031-4119-ac1b-28d4e785ab54</id>
<links/>
<name>rtamresponder</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54</href>
<id>d4c831d8-e031-4119-ac1b-28d4e785ab54</id>
<rel>self</rel>
<title>rtamresponder</title>
</self>
<valid>false</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<dtError>There are no responses associated with this Responder</dtError>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responders</type>
<config>
<entry>
<key>to</key>
<value>Administrator</value>
</entry>
<entry>
<key>body</key>
<value>RTAM Alert Body</value>
</entry>
<entry>
<key>subject</key>
<value>RTAM Alert Subject</value>
</entry>
<entry>
<key>priority</key>
<value>3</value>
</entry>
<entry>
<key>channels</key>
<value/>
</entry>
<entry>
<key>header</key>
<value/>
</entry>
<entry>
<key>actions</key>
<value/>
</entry>
<entry>
<key>groups</key>
<value/>
</entry>
<entry>
<key>metadata</key>
</entry>
</config>
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<responderType>RTAMResponder</responderType>

Responders 263
<responderTypeDisplayName>RTAM Responder</responderTypeDisplayName>
<responses />
<topics />
</responder>
Response Code : 200 OK

Delete RTAM Responder


Use the DELETE method to delete a RTAM responder in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes an RTAM responder in a
RulePoint application.
DELETE http://invrw28cep14:8080/rulepoint/api/projects/1/responders/d4c831d8-e031-4119-
ac1b-28d4e785ab54
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes an RTAM responder in a
RulePoint application.
DELETE http://invrw28cep14:8080/rulepoint/api/projects/1/responders/d4c831d8-e031-4119-
ac1b-28d4e785ab54
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

Responses
You can use API calls to perform various operations with SQL, email, JMS, web service, event transformer,
file output, and RTAM responses.

SQL Response
Use the examples to retrieve, create, update, or delete an SQL response.

Create SQL Response


Use the POST method to create an SQL response in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates an SQL response in a RulePoint
application.
POST http://localhost:8080/rulepoint/api/projects/1/responses
Accept: application/json

264 Chapter 6: Sample XML and JSON Requests and Responses


Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "hotstockresponder_response",
"type": "responses",
"responseType": "SqlResponder",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151",
"title": "hotstockresponder",
"id": "8bd61211-404b-4cd4-8a84-f36a7bcdf151"
},
"config": {
"sql": "insert into hot_stocks(symbol, price) values('INFA', 38.90)",
"params": null
}
}

POST Response in JSON Format


Returns the SQL response object and response code. Returns the error object if an error occurs.
{
"id": "11780430-b441-4a03-9733-b2c429d15c45",
"name": "hotstockresponder_response",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/responses/11780430-b441-4a03-9733-b2c429d15c45",
"title": "hotstockresponder_response",
"id": "11780430-b441-4a03-9733-b2c429d15c45"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responses/11780430-b441-4a03-9733-b2c429d15c45",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responses/11780430-b441-4a03-9733-b2c429d15c45",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responses/11780430-b441-4a03-9733-b2c429d15c45/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responses",
"lastModifiedDate": "2013-08-20T17:19:15+05:30",
"createDate": "2013-08-20T17:19:15+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responseType": "SqlResponder",
"responseTypeDisplayName": "SQL Responder",

Responses 265
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151",
"title": "hotstockresponder",
"id": "8bd61211-404b-4cd4-8a84-f36a7bcdf151"
},
"multithreaded": false,
"config": {
"sql": "insert into hot_stocks(symbol, price) values('INFA', 38.90)",
"params": null
}
}
Response Code: 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates an SQL response in a RulePoint
application.
POST http://localhost:8080/rulepoint/api/projects/1/responses
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<name>hotstockresponder_response</name>
<type>responses</type>
<config>
<entry>
<key>sql</key>
<value>insert into hot_stocks(symbol, price) values('INFA', 38.90)</value>
</entry>
<entry>
<key>params</key>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151</href>
<id>8bd61211-404b-4cd4-8a84-f36a7bcdf151</id>
<rel>responder</rel>
<title>hotstockresponder</title>
</responder>
<responseType>SqlResponder</responseType>
</response>

POST Response in XML Format


Returns the SQL response object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<acl>
<href>api/projects/1/responses/11780430-b441-4a03-9733-b2c429d15c45/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responses/11780430-b441-4a03-9733-b2c429d15c45</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responses/11780430-b441-4a03-9733-b2c429d15c45</href>
<rel>delete</rel>

266 Chapter 6: Sample XML and JSON Requests and Responses


<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>11780430-b441-4a03-9733-b2c429d15c45</id>
<links/>
<name>hotstockresponder_response</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responses/11780430-b441-4a03-9733-b2c429d15c45</href>
<id>11780430-b441-4a03-9733-b2c429d15c45</id>
<rel>self</rel>
<title>hotstockresponder_response</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responses</type>
<config>
<entry>
<key>sql</key>
<value>insert into hot_stocks(symbol, price) values('INFA', 38.90)</value>
</entry>
<entry>
<key>params</key>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151</href>
<id>8bd61211-404b-4cd4-8a84-f36a7bcdf151</id>
<rel>responder</rel>
<title>hotstockresponder</title>
</responder>
<responseType>SqlResponder</responseType>
<responseTypeDisplayName>SQL Responder</responseTypeDisplayName>
<rules />
<templates />
</response>
Response Code : 201 Created

Retrieve SQL Response


Use the GET method to retrieve an SQL response in RulePoint.

GET Request in JSON Format


Generate a GET request. For example, the following GET request retrieves an SQL response in a RulePoint
application.
GET http://localhost:8080/rulepoint/api/projects/1/responses
Accept: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

Responses 267
GET Response in JSON Format
{
"total": 3,
"count": 3,
"items": [
{
"id": "a2e64636-5206-46da-abe9-4c9bb8b592bc",
"name": "rtam_response",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/responses/a2e64636-5206-46da-abe9-4c9bb8b592bc",
"title": "rtam_response",
"id": "a2e64636-5206-46da-abe9-4c9bb8b592bc"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responses/a2e64636-5206-46da-
abe9-4c9bb8b592bc",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responses/a2e64636-5206-46da-
abe9-4c9bb8b592bc",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responses/a2e64636-5206-46da-abe9-4c9bb8b592bc/
acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responses",
"lastModifiedDate": "2013-08-19T11:21:03+05:30",
"createDate": "2013-08-19T11:12:55+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responseType": "RTAMResponder",
"responseTypeDisplayName": "RTAM Responder",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/c4851206-93e0-45ee-a013-3fb1d2fc5c5d",
"title": "rtam",
"id": "c4851206-93e0-45ee-a013-3fb1d2fc5c5d"
},
"multithreaded": false,
"rules": [
{
"href": "api/projects/1/rules/f8573cc2-e263-47f8-8ae3-9de8b58c7b44",
"title": "sqlrtamrule",
"objectType": "rules",
"id": "f8573cc2-e263-47f8-8ae3-9de8b58c7b44"
}
],
"config": {

268 Chapter 6: Sample XML and JSON Requests and Responses


"to": "Administrator",
"body": "re",
"subject": "re",
"priority": "3",
"channels": "",
"header": "",
"actions": "",
"groups": "",
"metadata": null
}
},
{
"id": "f1fbf054-6124-4111-a69e-abe30586deb0",
"name": "wsresponder_response",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/responses/f1fbf054-6124-4111-a69e-abe30586deb0",
"title": "wsresponder_response",
"id": "f1fbf054-6124-4111-a69e-abe30586deb0"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responses/f1fbf054-6124-4111-a69e-
abe30586deb0",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responses/f1fbf054-6124-4111-a69e-
abe30586deb0",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responses/f1fbf054-6124-4111-a69e-abe30586deb0/
acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responses",
"lastModifiedDate": "2013-08-19T11:10:52+05:30",
"createDate": "2013-08-19T11:00:58+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responseType": "webService",
"responseTypeDisplayName": "Web Service Responder",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/08ff3fdc-85f3-4bd2-8cd8-06442d7eae0c",
"title": "wsresponder",
"id": "08ff3fdc-85f3-4bd2-8cd8-06442d7eae0c"
},
"multithreaded": false,
"rules": [
{
"href": "api/projects/1/rules/a5046814-e355-4103-b885-71e2ac82ec4c",
"title": "sqlrule",

Responses 269
"objectType": "rules",
"id": "a5046814-e355-4103-b885-71e2ac82ec4c"
}
],
"config": {
"operation": "hello",
"inputParameters": "hello.name=x; =901",
"serviceName": "HelloWorldServices"
}
},
{
"id": "8322f00d-6191-4932-a447-a090e03b5696",
"name": "fileout_response",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/responses/8322f00d-6191-4932-a447-a090e03b5696",
"title": "fileout_response",
"id": "8322f00d-6191-4932-a447-a090e03b5696"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responses/8322f00d-6191-4932-a447-
a090e03b5696",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responses/8322f00d-6191-4932-a447-
a090e03b5696",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responses/8322f00d-6191-4932-a447-a090e03b5696/
acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responses",
"lastModifiedDate": "2013-08-19T11:10:52+05:30",
"createDate": "2013-07-30T10:10:59+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responseType": "fileOutput",
"responseTypeDisplayName": "File Responder",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/73876991-1dc2-47e6-ae1f-56347427a249",
"title": "fileout",
"id": "73876991-1dc2-47e6-ae1f-56347427a249"
},
"multithreaded": false,
"rules": [
{
"href": "api/projects/1/rules/9e212e7e-96e9-43f6-9725-57b3e3da4e23",
"title": "filrule",
"objectType": "rules",

270 Chapter 6: Sample XML and JSON Requests and Responses


"id": "9e212e7e-96e9-43f6-9725-57b3e3da4e23"
}
],
"config": {
"contents": "nest",
"filename": "best",
"mode": "append"
}
}
]
}
Response Code: 200 OK

GET Request in XML Format


Generate a GET request. For example, the following GET request retrieves an SQL response in a RulePoint
application.
GET http://localhost:8080/rulepoint/api/projects/1/responses
Accept: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

GET Response in XML Format


Returns the SQL response object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<artifacts>
<count>1</count>
<items>
<response>
<acl>
<href>api/projects/1/responses/11780430-b441-4a03-9733-b2c429d15c45/acl</
href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responses/11780430-b441-4a03-9733-b2c429d15c45</
href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responses/11780430-b441-4a03-9733-b2c429d15c45</
href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>11780430-b441-4a03-9733-b2c429d15c45</id>
<links/>
<name>hotstockresponder_response</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responses/11780430-b441-4a03-9733-b2c429d15c45</
href>
<id>11780430-b441-4a03-9733-b2c429d15c45</id>
<rel>self</rel>
<title>hotstockresponder_response</title>
</self>
<valid>true</valid>

Responses 271
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responses</type>
<config>
<entry>
<key>sql</key>
<value>insert into hot_stocks(symbol, price) values('INFA', 38.90)</
value>
</entry>
<entry>
<key>params</key>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151</
href>
<id>8bd61211-404b-4cd4-8a84-f36a7bcdf151</id>
<rel>responder</rel>
<title>hotstockresponder</title>
</responder>
<responseType>SqlResponder</responseType>
<responseTypeDisplayName>SQL Responder</responseTypeDisplayName>
<rules />
<templates />
</response>
</items>
<total>1</total>
<invalidCount>0</invalidCount>
</artifacts>
Response Code : 200 OK

Update SQL Response


Use the PUT method to update an SQL response in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates an SQL response in a RulePoint
application.
PUT http://localhost:8080/rulepoint/api/projects/1/responses/11780430-b441-4a03-9733-
b2c429d15c45
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "hotstockresponse",
"type": "responses",
"responseType": "SqlResponder",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151",
"title": "hotstockresponder",
"id": "8bd61211-404b-4cd4-8a84-f36a7bcdf151"
},
"config": {
"sql": "insert into hot_stocks(symbol, price) values('INFA', 38.90)",
"params": null

272 Chapter 6: Sample XML and JSON Requests and Responses


}
}

PUT Response in JSON Format


Returns the SQL response object and response code. Returns the error object if an error occurs.
{
"id": "11780430-b441-4a03-9733-b2c429d15c45",
"name": "hotstockresponse",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/responses/11780430-b441-4a03-9733-b2c429d15c45",
"title": "hotstockresponse",
"id": "11780430-b441-4a03-9733-b2c429d15c45"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responses/11780430-b441-4a03-9733-b2c429d15c45",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responses/11780430-b441-4a03-9733-b2c429d15c45",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responses/11780430-b441-4a03-9733-b2c429d15c45/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responses",
"lastModifiedDate": "2013-08-20T17:19:15+05:30",
"createDate": "2013-08-20T17:19:15+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responseType": "SqlResponder",
"responseTypeDisplayName": "SQL Responder",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151",
"title": "hotstockresponder",
"id": "8bd61211-404b-4cd4-8a84-f36a7bcdf151"
},
"multithreaded": false,
"config": {
"sql": "insert into hot_stocks(symbol, price) values('INFA', 38.90)",
"params": null
}
}
Response Code: 200 OK

Responses 273
PUT Request in XML Format
Generate a PUT request. For example, the following PUT request updates a an SQL response in a RulePoint
application.
PUT http://localhost:8080/rulepoint/api/projects/1/responses/11780430-b441-4a03-9733-
b2c429d15c45
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<name>hotstockresponse</name>
<type>responses</type>
<config>
<entry>
<key>sql</key>
<value>insert into hot_stocks(symbol, price) values('INFA', 38.90)</value>
</entry>
<entry>
<key>params</key>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151</href>
<id>8bd61211-404b-4cd4-8a84-f36a7bcdf151</id>
<rel>responder</rel>
<title>hotstockresponder</title>
</responder>
<responseType>SqlResponder</responseType>
</response>

PUT Response in XML Format


Returns the SQL response object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<acl>
<href>api/projects/1/responses/11780430-b441-4a03-9733-b2c429d15c45/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responses/11780430-b441-4a03-9733-b2c429d15c45</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responses/11780430-b441-4a03-9733-b2c429d15c45</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>11780430-b441-4a03-9733-b2c429d15c45</id>
<links/>
<name>hotstockresponder_response</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>

274 Chapter 6: Sample XML and JSON Requests and Responses


<href>api/projects/1/responses/11780430-b441-4a03-9733-b2c429d15c45</href>
<id>11780430-b441-4a03-9733-b2c429d15c45</id>
<rel>self</rel>
<title>hotstockresponder_response</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responses</type>
<config>
<entry>
<key>sql</key>
<value>insert into hot_stocks(symbol, price) values('INFA', 38.90)</value>
</entry>
<entry>
<key>params</key>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/8bd61211-404b-4cd4-8a84-f36a7bcdf151</href>
<id>8bd61211-404b-4cd4-8a84-f36a7bcdf151</id>
<rel>responder</rel>
<title>hotstockresponder</title>
</responder>
<responseType>SqlResponder</responseType>
<responseTypeDisplayName>SQL Responder</responseTypeDisplayName>
<rules />
<templates />
</response>
Response Code : 200 OK

Delete SQL Response


Use the DELETE method to delete an SQL response in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes an SQL response in a
RulePoint application.
DELETE http://localhost:8080/rulepoint/api/projects/1/responses/11780430-b441-4a03-9733-
b2c429d15c45
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes an SQL response in a
RulePoint application.
DELETE http://localhost:8080/rulepoint/api/projects/1/responses/11780430-b441-4a03-9733-
b2c429d15c45
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

Responses 275
Email Response
Use the examples to create, update, or delete an email response.

Create Email Response


Use the POST method to create an email response in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates an email response in a RulePoint
application.
POST http://localhost:8080/rulepoint/api/projects/1/responses
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "EmailResponse1",
"description": "",
"valid": true,
"force": false,
"responder": {
"rel": "self",
"href": "api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1",
"title": "EmailResponder1",
"id": "26154ed7-41ce-4db4-888f-ce5573e965d1"
},
"config": {
"to": "sbhimisetty@informatica.com",
"body": "Test email from EmailResponder",
"replyTo": null,
"subject": "Test email subject from EmailResponder",
"sentDate": null,
"bcc": null,
"from": "sbhimisetty@informatica.com",
"contentType": "text",
"cc": null
}
}

POST Response in JSON Format


Returns the email response object and response code. Returns the error object if an error occurs.
{
"id": "aa8c1aa6-31a1-48bb-9e0a-a9477df4e625",
"name": "EmailResponse1",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625",
"title": "EmailResponse1",
"id": "aa8c1aa6-31a1-48bb-9e0a-a9477df4e625"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",

276 Chapter 6: Sample XML and JSON Requests and Responses


"href": "api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responses",
"lastModifiedDate": "2013-09-13T16:27:51+05:30",
"createDate": "2013-09-13T16:27:51+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responseType": "EmailResponder",
"responseTypeDisplayName": "Email Responder",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1",
"title": "EmailResponder1",
"id": "26154ed7-41ce-4db4-888f-ce5573e965d1"
},
"multithreaded": false,
"config": {
"to": "sbhimisetty@informatica.com",
"body": "Test email from EmailResponder",
"replyTo": "",
"subject": "Test email subject from EmailResponder",
"sentDate": null,
"bcc": "",
"from": "sbhimisetty@informatica.com",
"contentType": "text",
"cc": ""
}
}
Response Code: 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates an email response in a RulePoint
application.
POST http://localhost:8080/rulepoint/api/projects/1/responses
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<name>EmailResponse1</name>
<type>responses</type>
<config>
<entry>
<key>to</key>
<value>sbhimisetty@informatica.com</value>
</entry>
<entry>
<key>body</key>

Responses 277
<value>Test email from EmailResponder</value>
</entry>
<entry>
<key>replyTo</key>
<value/>
</entry>
<entry>
<key>subject</key>
<value>Test email subject from EmailResponder</value>
</entry>
<entry>
<key>sentDate</key>
</entry>
<entry>
<key>bcc</key>
<value/>
</entry>
<entry>
<key>from</key>
<value>sbhimisetty@informatica.com</value>
</entry>
<entry>
<key>contentType</key>
<value>text</value>
</entry>
<entry>
<key>cc</key>
<value/>
</entry>
</config>
<responder>
<href>api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1</href>
<id>26154ed7-41ce-4db4-888f-ce5573e965d1</id>
<rel>responder</rel>
<title>EmailResponder1</title>
</responder>
<responseType>EmailResponder</responseType>
</response>

POST Response in XML Format


Returns the email response object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<acl>
<href>api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>aa8c1aa6-31a1-48bb-9e0a-a9477df4e625</id>
<links/>
<name>EmailResponse1</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>

278 Chapter 6: Sample XML and JSON Requests and Responses


<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625</href>
<id>aa8c1aa6-31a1-48bb-9e0a-a9477df4e625</id>
<rel>self</rel>
<title>EmailResponse1</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responses</type>
<config>
<entry>
<key>to</key>
<value>sbhimisetty@informatica.com</value>
</entry>
<entry>
<key>body</key>
<value>Test email from EmailResponder</value>
</entry>
<entry>
<key>replyTo</key>
<value/>
</entry>
<entry>
<key>subject</key>
<value>Test email subject from EmailResponder</value>
</entry>
<entry>
<key>sentDate</key>
</entry>
<entry>
<key>bcc</key>
<value/>
</entry>
<entry>
<key>from</key>
<value>sbhimisetty@informatica.com</value>
</entry>
<entry>
<key>contentType</key>
<value>text</value>
</entry>
<entry>
<key>cc</key>
<value/>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1</href>
<id>26154ed7-41ce-4db4-888f-ce5573e965d1</id>
<rel>responder</rel>
<title>EmailResponder1</title>
</responder>
<responseType>EmailResponder</responseType>
<responseTypeDisplayName>Email Responder</responseTypeDisplayName>
<templates />
<rules />
</response>
Response Code : 201 Created

Responses 279
Update Email Response
Use the PUT method to update an email response in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates an email response in a RulePoint
application.
PUT http://localhost:8080/rulepoint/api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-
a9477df4e625
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "MyEmailResponse",
"description": "",
"valid": true,
"force": false,
"responder": {
"rel": "self",
"href": "api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1",
"title": "EmailResponder1",
"id": "26154ed7-41ce-4db4-888f-ce5573e965d1"
},
"config": {
"to": "sbhimisetty@informatica.com",
"body": "Test email from EmailResponder",
"replyTo": null,
"subject": "Test email subject from EmailResponder",
"sentDate": null,
"bcc": null,
"from": "sbhimisetty@informatica.com",
"contentType": "text",
"cc": null
}
}

PUT Response in JSON Format


Returns the email response object and response code 200 OK. Returns the error object if an error occurs.
{
"id": "aa8c1aa6-31a1-48bb-9e0a-a9477df4e625",
"name": "MyEmailResponse",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625",
"title": "MyEmailResponse",
"id": "aa8c1aa6-31a1-48bb-9e0a-a9477df4e625"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {

280 Chapter 6: Sample XML and JSON Requests and Responses


"rel": "acl",
"href": "api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responses",
"lastModifiedDate": "2013-09-13T16:27:51+05:30",
"createDate": "2013-09-13T16:27:51+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responseType": "EmailResponder",
"responseTypeDisplayName": "Email Responder",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1",
"title": "EmailResponder1",
"id": "26154ed7-41ce-4db4-888f-ce5573e965d1"
},
"multithreaded": false,
"config": {
"to": "user@mycompany.com",
"body": "Test email from EmailResponder",
"replyTo": "",
"subject": "Test email subject from EmailResponder",
"sentDate": null,
"bcc": "",
"from": "user@mycompany.com",
"contentType": "text",
"cc": ""
}
}
Response Code: 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates an email response in a RulePoint
application.
PUT http://localhost:8080/rulepoint/api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-
a9477df4e625
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<name>MyEmailResponse</name>
<type>responses</type>
<config>
<entry>
<key>to</key>
<value>sbhimisetty@informatica.com</value>
</entry>
<entry>
<key>body</key>
<value>Test email from EmailResponder</value>
</entry>
<entry>
<key>replyTo</key>
<value/>

Responses 281
</entry>
<entry>
<key>subject</key>
<value>Test email subject from EmailResponder</value>
</entry>
<entry>
<key>sentDate</key>
</entry>
<entry>
<key>bcc</key>
<value/>
</entry>
<entry>
<key>from</key>
<value>sbhimisetty@informatica.com</value>
</entry>
<entry>
<key>contentType</key>
<value>text</value>
</entry>
<entry>
<key>cc</key>
<value/>
</entry>
</config>
<responder>
<href>api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1</href>
<id>26154ed7-41ce-4db4-888f-ce5573e965d1</id>
<rel>responder</rel>
<title>EmailResponder1</title>
</responder>
<responseType>EmailResponder</responseType>
</response>

PUT Response in XML Format


Returns the email response object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<acl>
<href>api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>aa8c1aa6-31a1-48bb-9e0a-a9477df4e625</id>
<links/>
<name>EmailResponse1</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625</href>
<id>aa8c1aa6-31a1-48bb-9e0a-a9477df4e625</id>

282 Chapter 6: Sample XML and JSON Requests and Responses


<rel>self</rel>
<title>EmailResponse1</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responses</type>
<config>
<entry>
<key>to</key>
<value>sbhimisetty@informatica.com</value>
</entry>
<entry>
<key>body</key>
<value>Test email from EmailResponder</value>
</entry>
<entry>
<key>replyTo</key>
<value/>
</entry>
<entry>
<key>subject</key>
<value>Test email subject from EmailResponder</value>
</entry>
<entry>
<key>sentDate</key>
</entry>
<entry>
<key>bcc</key>
<value/>
</entry>
<entry>
<key>from</key>
<value>sbhimisetty@informatica.com</value>
</entry>
<entry>
<key>contentType</key>
<value>text</value>
</entry>
<entry>
<key>cc</key>
<value/>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1</href>
<id>26154ed7-41ce-4db4-888f-ce5573e965d1</id>
<rel>responder</rel>
<title>EmailResponder1</title>
</responder>
<responseType>EmailResponder</responseType>
<responseTypeDisplayName>Email Responder</responseTypeDisplayName>
<templates />
<rules />
</response>
Response Code : 200 OK

Responses 283
Update Email Response
Use the PUT method to update an email response in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates an email response in a RulePoint
application.
PUT http://localhost:8080/rulepoint/api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-
a9477df4e625
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "MyEmailResponse",
"description": "",
"valid": true,
"force": false,
"responder": {
"rel": "self",
"href": "api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1",
"title": "EmailResponder1",
"id": "26154ed7-41ce-4db4-888f-ce5573e965d1"
},
"config": {
"to": "sbhimisetty@informatica.com",
"body": "Test email from EmailResponder",
"replyTo": null,
"subject": "Test email subject from EmailResponder",
"sentDate": null,
"bcc": null,
"from": "sbhimisetty@informatica.com",
"contentType": "text",
"cc": null
}
}

PUT Response in JSON Format


Returns the email response object and response code 200 OK. Returns the error object if an error occurs.
{
"id": "aa8c1aa6-31a1-48bb-9e0a-a9477df4e625",
"name": "MyEmailResponse",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625",
"title": "MyEmailResponse",
"id": "aa8c1aa6-31a1-48bb-9e0a-a9477df4e625"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {

284 Chapter 6: Sample XML and JSON Requests and Responses


"rel": "acl",
"href": "api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responses",
"lastModifiedDate": "2013-09-13T16:27:51+05:30",
"createDate": "2013-09-13T16:27:51+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responseType": "EmailResponder",
"responseTypeDisplayName": "Email Responder",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1",
"title": "EmailResponder1",
"id": "26154ed7-41ce-4db4-888f-ce5573e965d1"
},
"multithreaded": false,
"config": {
"to": "user@mycompany.com",
"body": "Test email from EmailResponder",
"replyTo": "",
"subject": "Test email subject from EmailResponder",
"sentDate": null,
"bcc": "",
"from": "user@mycompany.com",
"contentType": "text",
"cc": ""
}
}
Response Code: 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates an email response in a RulePoint
application.
PUT http://localhost:8080/rulepoint/api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-
a9477df4e625
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<name>MyEmailResponse</name>
<type>responses</type>
<config>
<entry>
<key>to</key>
<value>sbhimisetty@informatica.com</value>
</entry>
<entry>
<key>body</key>
<value>Test email from EmailResponder</value>
</entry>
<entry>
<key>replyTo</key>
<value/>

Responses 285
</entry>
<entry>
<key>subject</key>
<value>Test email subject from EmailResponder</value>
</entry>
<entry>
<key>sentDate</key>
</entry>
<entry>
<key>bcc</key>
<value/>
</entry>
<entry>
<key>from</key>
<value>sbhimisetty@informatica.com</value>
</entry>
<entry>
<key>contentType</key>
<value>text</value>
</entry>
<entry>
<key>cc</key>
<value/>
</entry>
</config>
<responder>
<href>api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1</href>
<id>26154ed7-41ce-4db4-888f-ce5573e965d1</id>
<rel>responder</rel>
<title>EmailResponder1</title>
</responder>
<responseType>EmailResponder</responseType>
</response>

PUT Response in XML Format


Returns the email response object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<acl>
<href>api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>aa8c1aa6-31a1-48bb-9e0a-a9477df4e625</id>
<links/>
<name>EmailResponse1</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responses/aa8c1aa6-31a1-48bb-9e0a-a9477df4e625</href>
<id>aa8c1aa6-31a1-48bb-9e0a-a9477df4e625</id>

286 Chapter 6: Sample XML and JSON Requests and Responses


<rel>self</rel>
<title>EmailResponse1</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responses</type>
<config>
<entry>
<key>to</key>
<value>sbhimisetty@informatica.com</value>
</entry>
<entry>
<key>body</key>
<value>Test email from EmailResponder</value>
</entry>
<entry>
<key>replyTo</key>
<value/>
</entry>
<entry>
<key>subject</key>
<value>Test email subject from EmailResponder</value>
</entry>
<entry>
<key>sentDate</key>
</entry>
<entry>
<key>bcc</key>
<value/>
</entry>
<entry>
<key>from</key>
<value>sbhimisetty@informatica.com</value>
</entry>
<entry>
<key>contentType</key>
<value>text</value>
</entry>
<entry>
<key>cc</key>
<value/>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/26154ed7-41ce-4db4-888f-ce5573e965d1</href>
<id>26154ed7-41ce-4db4-888f-ce5573e965d1</id>
<rel>responder</rel>
<title>EmailResponder1</title>
</responder>
<responseType>EmailResponder</responseType>
<responseTypeDisplayName>Email Responder</responseTypeDisplayName>
<templates />
<rules />
</response>
Response Code : 200 OK

Responses 287
JMS Response
Use the examples to create, update, or delete a JMS response.

Create JMS Response


Use the POST method to create a JMS response in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates a JMS response in a RulePoint
application.
POST http://localhost:8080/rulepoint/api/projects/1/responses
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "jmsresponder_response",
"type": "responses",
"responseType": "JMSResponder",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7",
"title": "jmsresponder",
"id": "ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7"
},
"multithreaded": false,
"config": {
"body": "test message",
"retryCount": "3",
"priority": "4",
"retryDelay": "1000",
"deliveryMode": "2",
"params": null,
"timeToLive": "0",
"destination": "jmsQueue"
}
}

POST Response in JSON Format


Returns the JMS response object and response code 201 OK. Returns the error object if an error occurs.
{
"id": "acb4152d-d034-468d-be96-d95178200755",
"name": "jmsresponder_response",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755",
"title": "jmsresponder_response",
"id": "acb4152d-d034-468d-be96-d95178200755"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755",

288 Chapter 6: Sample XML and JSON Requests and Responses


"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responses",
"lastModifiedDate": "2013-08-23T15:20:20+05:30",
"createDate": "2013-08-23T15:20:20+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responseType": "JMSResponder",
"responseTypeDisplayName": "JMS Responder",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7",
"title": "jmsresponder",
"id": "ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7"
},
"multithreaded": false,
"config": {
"body": "test message",
"retryCount": "3",
"priority": "4",
"retryDelay": "1000",
"deliveryMode": "2",
"params": null,
"timeToLive": "0",
"destination": "jmsQueue"
}
}
Response Code: 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates a JMS response in a RulePoint
application.
POST http://localhost:8080/rulepoint/api/projects/1/responses
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<name>jmsresponder_response</name>
<type>responses</type>
<config>
<entry>
<key>body</key>
<value>test message</value>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>

Responses 289
<entry>
<key>priority</key>
<value>4</value>
</entry>
<entry>
<key>retryDelay</key>
<value>1000</value>
</entry>
<entry>
<key>deliveryMode</key>
<value>2</value>
</entry>
<entry>
<key>params</key>
</entry>
<entry>
<key>timeToLive</key>
<value>0</value>
</entry>
<entry>
<key>destination</key>
<value>jmsQueue</value>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</href>
<id>ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</id>
<rel>responder</rel>
<title>jmsresponder</title>
</responder>
<responseType>JMSResponder</responseType>
<responseTypeDisplayName>JMS Responder</responseTypeDisplayName>
</response>

POST Response in XML Format


Returns the JMS response object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<acl>
<href>api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>acb4152d-d034-468d-be96-d95178200755</id>
<links/>
<name>jmsresponder_response</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755</href>

290 Chapter 6: Sample XML and JSON Requests and Responses


<id>acb4152d-d034-468d-be96-d95178200755</id>
<rel>self</rel>
<title>jmsresponder_response</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responses</type>
<config>
<entry>
<key>body</key>
<value>test message</value>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>priority</key>
<value>4</value>
</entry>
<entry>
<key>retryDelay</key>
<value>1000</value>
</entry>
<entry>
<key>deliveryMode</key>
<value>2</value>
</entry>
<entry>
<key>params</key>
</entry>
<entry>
<key>timeToLive</key>
<value>0</value>
</entry>
<entry>
<key>destination</key>
<value>jmsQueue</value>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</href>
<id>ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</id>
<rel>responder</rel>
<title>jmsresponder</title>
</responder>
<responseType>JMSResponder</responseType>
<responseTypeDisplayName>JMS Responder</responseTypeDisplayName>
<templates />
<rules />
</response>
Response Code : 201 Created

Responses 291
Update JMS Response
Use the PUT method to update a JMS response in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates a JMS response in a RulePoint
application.
PUT http://localhost:8080/rulepoint/api/projects/1/responses/acb4152d-d034-468d-be96-
d95178200755
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


Returns the JMS response object and response code. Returns the error object if an error occurs.
{
"name": "ActiveMQResponse",
"type": "responses",
"responseType": "JMSResponder",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7",
"title": "jmsresponder",
"id": "ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7"
},
"multithreaded": false,
"config": {
"body": "test message",
"retryCount": "3",
"priority": "4",
"retryDelay": "1000",
"deliveryMode": "2",
"params": null,
"timeToLive": "0",
"destination": "jmsQueue"
}
}

PUT Response in JSON Format


{
"id": "acb4152d-d034-468d-be96-d95178200755",
"name": "ActiveMQResponse",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755",
"title": "ActiveMQResponse",
"id": "acb4152d-d034-468d-be96-d95178200755"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",

292 Chapter 6: Sample XML and JSON Requests and Responses


"href": "api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responses",
"lastModifiedDate": "2013-08-23T15:20:20+05:30",
"createDate": "2013-08-23T15:20:20+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responseType": "JMSResponder",
"responseTypeDisplayName": "JMS Responder",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7",
"title": "jmsresponder",
"id": "ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7"
},
"multithreaded": false,
"config": {
"body": "test message",
"retryCount": "3",
"priority": "4",
"retryDelay": "1000",
"deliveryMode": "2",
"params": null,
"timeToLive": "0",
"destination": "jmsQueue"
}
}
Response Code: 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates a JMS response in a RulePoint
application.
PUT http://localhost:8080/rulepoint/api/projects/1/responses/acb4152d-d034-468d-be96-
d95178200755
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<name>ActiveMQResponse</name>
<type>responses</type>
<config>
<entry>
<key>body</key>
<value>test message</value>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>priority</key>
<value>4</value>
</entry>
<entry>

Responses 293
<key>retryDelay</key>
<value>1000</value>
</entry>
<entry>
<key>deliveryMode</key>
<value>2</value>
</entry>
<entry>
<key>params</key>
</entry>
<entry>
<key>timeToLive</key>
<value>0</value>
</entry>
<entry>
<key>destination</key>
<value>jmsQueue</value>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</href>
<id>ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</id>
<rel>responder</rel>
<title>jmsresponder</title>
</responder>
<responseType>JMSResponder</responseType>
<responseTypeDisplayName>JMS Responder</responseTypeDisplayName>
</response>

PUT Response in XML Format


Returns the JMS response object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<acl>
<href>api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>acb4152d-d034-468d-be96-d95178200755</id>
<links/>
<name>jmsresponder_response</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responses/acb4152d-d034-468d-be96-d95178200755</href>
<id>acb4152d-d034-468d-be96-d95178200755</id>
<rel>self</rel>
<title>jmsresponder_response</title>
</self>
<valid>true</valid>

294 Chapter 6: Sample XML and JSON Requests and Responses


<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responses</type>
<config>
<entry>
<key>body</key>
<value>test message</value>
</entry>
<entry>
<key>retryCount</key>
<value>3</value>
</entry>
<entry>
<key>priority</key>
<value>4</value>
</entry>
<entry>
<key>retryDelay</key>
<value>1000</value>
</entry>
<entry>
<key>deliveryMode</key>
<value>2</value>
</entry>
<entry>
<key>params</key>
</entry>
<entry>
<key>timeToLive</key>
<value>0</value>
</entry>
<entry>
<key>destination</key>
<value>jmsQueue</value>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</href>
<id>ec9ba07c-7ac1-48b0-8b7d-ffcd35c1f8f7</id>
<rel>responder</rel>
<title>jmsresponder</title>
</responder>
<responseType>JMSResponder</responseType>
<responseTypeDisplayName>JMS Responder</responseTypeDisplayName>
<templates />
<rules />
</response>
Response Code : 200 OK

Delete JMS Response


Use the DELETE method to delete a JMS response in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes a JMS response in a
RulePoint application.
DELETE http://localhost:8080/rulepoint/api/projects/1/responses/acb4152d-d034-468d-be96-
d95178200755

Responses 295
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes a JMS response in a
RulePoint application.
DELETE http://localhost:8080/rulepoint/api/projects/1/responses/acb4152d-d034-468d-be96-
d95178200755
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

Web Service Response


Use the examples to create, update, or delete a web service response.

Create Web Service Response


Use the POST method to create a JMS response in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates a JMS response in a RulePoint
application.
POST http://localhost:8080/rulepoint/api/projects/1/responses
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "MyWebServiceResponder_response",
"valid": true,
"force": false,
"responder": {
"rel": "self",
"href": "api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01",
"title": "MyWebServiceResponder",
"id": "776acc35-7a4a-47e1-8b9a-07f7d8bb6f01"
},
"config": {
"operation": "hello",
"inputParameters": "hello.name=Chris",
"serviceName": "HelloWorldServices"
}
}

POST Response in JSON Format


Returns the JMS response object and response code 201 OK. Returns the error object if an error occurs.
{
"id": "994714e0-f56a-44ca-9b03-a7562367370c",
"name": "MyWebServiceResponder_response",
"valid": true,
"self": {
"rel": "self",

296 Chapter 6: Sample XML and JSON Requests and Responses


"href": "api/projects/1/responses/994714e0-f56a-44ca-9b03-a7562367370c",
"title": "MyWebServiceResponder_response",
"id": "994714e0-f56a-44ca-9b03-a7562367370c"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responses/994714e0-f56a-44ca-9b03-a7562367370c",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responses/994714e0-f56a-44ca-9b03-a7562367370c",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responses/994714e0-f56a-44ca-9b03-a7562367370c/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responses",
"lastModifiedDate": "2013-09-13T17:12:11+05:30",
"createDate": "2013-09-13T17:12:11+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responseType": "webService",
"responseTypeDisplayName": "Web Service Responder",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01",
"title": "MyWebServiceResponder",
"id": "776acc35-7a4a-47e1-8b9a-07f7d8bb6f01"
},
"multithreaded": false,
"config": {
"operation": "hello",
"inputParameters": "hello.name=Chris",
"serviceName": "HelloWorldServices"
}
}
Response Code: 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates a JMS response in a RulePoint
application.
POST http://localhost:8080/rulepoint/api/projects/1/responses
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<name>MyWebServiceResponder_response</name>
<type>responses</type>

Responses 297
<config>
<entry>
<key>operation</key>
<value>hello</value>
</entry>
<entry>
<key>inputParameters</key>
<value>hello.name=Chris</value>
</entry>
<entry>
<key>serviceName</key>
<value>HelloWorldServices</value>
</entry>
</config>
<responder>
<href>api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01</href>
<id>776acc35-7a4a-47e1-8b9a-07f7d8bb6f01</id>
<rel>responder</rel>
<title>MyWebServiceResponder</title>
</responder>
<responseType>webService</responseType>
</response>

POST Response in XML Format


Returns the JMS response object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<acl>
<href>api/projects/1/responses/994714e0-f56a-44ca-9b03-a7562367370c/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responses/994714e0-f56a-44ca-9b03-a7562367370c</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responses/994714e0-f56a-44ca-9b03-a7562367370c</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>994714e0-f56a-44ca-9b03-a7562367370c</id>
<links/>
<name>MyWebServiceResponder_response</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responses/994714e0-f56a-44ca-9b03-a7562367370c</href>
<id>994714e0-f56a-44ca-9b03-a7562367370c</id>
<rel>self</rel>
<title>MyWebServiceResponder_response</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>

298 Chapter 6: Sample XML and JSON Requests and Responses


<type>responses</type>
<config>
<entry>
<key>operation</key>
<value>hello</value>
</entry>
<entry>
<key>inputParameters</key>
<value>hello.name=Chris</value>
</entry>
<entry>
<key>serviceName</key>
<value>HelloWorldServices</value>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01</href>
<id>776acc35-7a4a-47e1-8b9a-07f7d8bb6f01</id>
<rel>responder</rel>
<title>MyWebServiceResponder</title>
</responder>
<responseType>webService</responseType>
<responseTypeDisplayName>Web Service Responder</responseTypeDisplayName>
<templates />
<rules />
</response>
Response Code : 201 Created

Update Web Service Response


Use the PUT method to update a Web Service response in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates a Web Service response in a
RulePoint application.
PUT http://localhost:8080/rulepoint/api/projects/1/responses/994714e0-f56a-44ca-9b03-
a7562367370c
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


Returns the Web Service response object and response code 200 OK. Returns the error object if an error
occurs.
{
"name": "MyWebServiceResponse",
"valid": true,
"force": false,
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01",
"title": "MyWebServiceResponder",
"id": "776acc35-7a4a-47e1-8b9a-07f7d8bb6f01"
},
"config": {
"operation": "hello",
"inputParameters": "hello.name=Chris",
"serviceName": "HelloWorldServices"
}
}

Responses 299
PUT Response in JSON Format
Returns the Web Service response object and response code. Returns the error object if an error occurs.
{
"id": "994714e0-f56a-44ca-9b03-a7562367370c",
"name": "MyWebServiceResponse",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/responses/994714e0-f56a-44ca-9b03-a7562367370c",
"title": "MyWebServiceResponse",
"id": "994714e0-f56a-44ca-9b03-a7562367370c"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responses/994714e0-f56a-44ca-9b03-a7562367370c",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responses/994714e0-f56a-44ca-9b03-a7562367370c",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responses/994714e0-f56a-44ca-9b03-a7562367370c/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responses",
"lastModifiedDate": "2013-09-13T17:14:55+05:30",
"createDate": "2013-09-13T17:12:11+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responseType": "webService",
"responseTypeDisplayName": "Web Service Responder",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01",
"title": "MyWebServiceResponder",
"id": "776acc35-7a4a-47e1-8b9a-07f7d8bb6f01"
},
"multithreaded": false,
"config": {
"operation": "hello",
"inputParameters": "hello.name=Chris",
"serviceName": "HelloWorldServices"
}
}
Response Code: 200 OK

300 Chapter 6: Sample XML and JSON Requests and Responses


PUT Request in XML Format
Generate a PUT request. For example, the following PUT request updates a Web Service response in a
RulePoint application.
PUT http://localhost:8080/rulepoint/api/projects/1/responses/994714e0-f56a-44ca-9b03-
a7562367370c
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<name>MyWebServiceResponse</name>
<type>responses</type>
<config>
<entry>
<key>operation</key>
<value>hello</value>
</entry>
<entry>
<key>inputParameters</key>
<value>hello.name=Chris</value>
</entry>
<entry>
<key>serviceName</key>
<value>HelloWorldServices</value>
</entry>
</config>
<responder>
<href>api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01</href>
<id>776acc35-7a4a-47e1-8b9a-07f7d8bb6f01</id>
<rel>responder</rel>
<title>MyWebServiceResponder</title>
</responder>
<responseType>webService</responseType>
</response>

PUT Response in XML Format


Returns the Web Service response object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<acl>
<href>api/projects/1/responses/994714e0-f56a-44ca-9b03-a7562367370c/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responses/994714e0-f56a-44ca-9b03-a7562367370c</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responses/994714e0-f56a-44ca-9b03-a7562367370c</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>994714e0-f56a-44ca-9b03-a7562367370c</id>
<links/>
<name>MyWebServiceResponder_response</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>

Responses 301
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responses/994714e0-f56a-44ca-9b03-a7562367370c</href>
<id>994714e0-f56a-44ca-9b03-a7562367370c</id>
<rel>self</rel>
<title>MyWebServiceResponder_response</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responses</type>
<config>
<entry>
<key>operation</key>
<value>hello</value>
</entry>
<entry>
<key>inputParameters</key>
<value>hello.name=Chris</value>
</entry>
<entry>
<key>serviceName</key>
<value>HelloWorldServices</value>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/776acc35-7a4a-47e1-8b9a-07f7d8bb6f01</href>
<id>776acc35-7a4a-47e1-8b9a-07f7d8bb6f01</id>
<rel>responder</rel>
<title>MyWebServiceResponder</title>
</responder>
<responseType>webService</responseType>
<responseTypeDisplayName>Web Service Responder</responseTypeDisplayName>
<templates />
<rules />
</response>
Response Code : 200 OK

Delete Web Service Response


Use the DELETE method to delete a Web Service response in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes a JMS response in a
RulePoint application.
DELETE http://localhost:8080/rulepoint/api/projects/1/responses/994714e0-f56a-44ca-9b03-
a7562367370c
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

302 Chapter 6: Sample XML and JSON Requests and Responses


DELETE Request in XML Format
Generate a DELETE request. For example, the following DELETE request deletes a JMS response in a
RulePoint application.
DELETE http://localhost:8080/rulepoint/api/projects/1/responses/994714e0-f56a-44ca-9b03-
a7562367370c
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

Event Transformer Response


Use the examples to create, update, or delete an event transformer response.

Create Event Transformer Response


Use the POST method to create an event transformer response in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates an event transformer response in
a RulePoint application.
POST http://localhost:8080/rulepoint/api/projects/1/responses
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


Returns the event transformer response object and response code 201 OK. Returns the error object if an error
occurs.
{
"name": "event_transformer_response",
"valid": true,
"force": false,
"responder": {
"rel": "self",
"href": "api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5",
"title": "MyEventTransformer",
"id": "c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5"
},
"config": {
"topic": "topic1 as topic2",
"params": "newproperty=100",
"properties": "*"
}
}

POST Response in JSON Format


Returns the event transformer response object and response code. Returns the error object if an error occurs.
{
"id": "69c36892-e18f-49ae-acab-ca78f9d8b100",
"name": "event_transformer_response",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/responses/69c36892-e18f-49ae-acab-ca78f9d8b100",
"title": "event_transformer_response",

Responses 303
"id": "69c36892-e18f-49ae-acab-ca78f9d8b100"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responses/69c36892-e18f-49ae-acab-ca78f9d8b100",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responses/69c36892-e18f-49ae-acab-ca78f9d8b100",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responses/69c36892-e18f-49ae-acab-ca78f9d8b100/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responses",
"lastModifiedDate": "2013-09-19T18:10:48+05:30",
"createDate": "2013-09-19T18:10:48+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responseType": "EventTransformer",
"responseTypeDisplayName": "Event Transformer",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5",
"title": "MyEventTransformer",
"id": "c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5"
},
"multithreaded": false,
"config": {
"topic": "topic1 as topic2",
"params": "newproperty=100",
"properties": "*"
}
}
Response Code: 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates an event transformer response in
a RulePoint application.
POST http://localhost:8080/rulepoint/api/projects/1/responses
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<name>event_transformer_response</name>
<type>responses</type>
<config>
<entry>

304 Chapter 6: Sample XML and JSON Requests and Responses


<key>topic</key>
<value>topic1 as topic2</value>
</entry>
<entry>
<key>params</key>
<value>newproperty=100</value>
</entry>
<entry>
<key>properties</key>
<value>*</value>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5</href>
<id>c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5</id>
<rel>responder</rel>
<title>MyEventTransformer</title>
</responder>
<responseType>EventTransformer</responseType>
</response>

POST Response in XML Format


Returns the event transformer response object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<acl>
<href>api/projects/1/responses/69c36892-e18f-49ae-acab-ca78f9d8b100/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responses/69c36892-e18f-49ae-acab-ca78f9d8b100</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responses/69c36892-e18f-49ae-acab-ca78f9d8b100</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>69c36892-e18f-49ae-acab-ca78f9d8b100</id>
<links/>
<name>event_transformer_response</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responses/69c36892-e18f-49ae-acab-ca78f9d8b100</href>
<id>69c36892-e18f-49ae-acab-ca78f9d8b100</id>
<rel>self</rel>
<title>event_transformer_response</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responses</type>

Responses 305
<config>
<entry>
<key>topic</key>
<value>topic1 as topic2</value>
</entry>
<entry>
<key>params</key>
<value>newproperty=100</value>
</entry>
<entry>
<key>properties</key>
<value>*</value>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5</href>
<id>c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5</id>
<rel>responder</rel>
<title>MyEventTransformer</title>
</responder>
<responseType>EventTransformer</responseType>
<responseTypeDisplayName>Event Transformer</responseTypeDisplayName>
<templates />
<rules />
</response>
Response Code : 201 Created

Update Event Transformer Response


Use the PUT method to update an event transformer response in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates an event transformer response in a
RulePoint application.
PUT http://invrw28cep14:8080/rulepoint/api/projects/1/responses/69c36892-e18f-49ae-acab-
ca78f9d8b100
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


Returns the event transformer response object and response code. Returns the error object if an error occurs.
{
"name": "MyEventTransformerResponse",
"valid": true,
"force": false,
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5",
"title": "MyEventTransformer",
"id": "c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5"
},
"config": {
"topic": "topic1 as topic2",
"params": "newproperty=100",
"properties": "*"
}
}

306 Chapter 6: Sample XML and JSON Requests and Responses


PUT Response in JSON Format
Returns the event transformer response object and response code. Returns the error object if an error occurs.
{
"id": "69c36892-e18f-49ae-acab-ca78f9d8b100",
"name": "MyEventTransformerResponse",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/responses/69c36892-e18f-49ae-acab-ca78f9d8b100",
"title": "MyEventTransformerResponse",
"id": "69c36892-e18f-49ae-acab-ca78f9d8b100"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responses/69c36892-e18f-49ae-acab-ca78f9d8b100",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responses/69c36892-e18f-49ae-acab-ca78f9d8b100",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responses/69c36892-e18f-49ae-acab-ca78f9d8b100/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responses",
"lastModifiedDate": "2013-09-19T18:14:24+05:30",
"createDate": "2013-09-19T18:10:48+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responseType": "EventTransformer",
"responseTypeDisplayName": "Event Transformer",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5",
"title": "MyEventTransformer",
"id": "c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5"
},
"multithreaded": false,
"config": {
"topic": "topic1 as topic2",
"params": "newproperty=100",
"properties": "*"
}
}
Response Code: 200 OK

Responses 307
PUT Request in XML Format
Generate a PUT request. For example, the following PUT request updates an event transformer response in a
RulePoint application.
PUT http://invrw28cep14:8080/rulepoint/api/projects/1/responses/69c36892-e18f-49ae-acab-
ca78f9d8b100
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<name>MyEventTransformerResponse</name>
<type>responses</type>
<config>
<entry>
<key>topic</key>
<value>topic1 as topic2</value>
</entry>
<entry>
<key>params</key>
<value>newproperty=100</value>
</entry>
<entry>
<key>properties</key>
<value>*</value>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5</href>
<id>c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5</id>
<rel>responder</rel>
<title>MyEventTransformer</title>
</responder>
<responseType>EventTransformer</responseType>
</response>

PUT Response in XML Format


Returns the event transformer response object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<acl>
<href>api/projects/1/responses/69c36892-e18f-49ae-acab-ca78f9d8b100/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responses/69c36892-e18f-49ae-acab-ca78f9d8b100</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responses/69c36892-e18f-49ae-acab-ca78f9d8b100</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>69c36892-e18f-49ae-acab-ca78f9d8b100</id>
<links/>
<name>MyEventTransformerResponse</name>
<owningProject>
<href>api/projects/1</href>

308 Chapter 6: Sample XML and JSON Requests and Responses


<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responses/69c36892-e18f-49ae-acab-ca78f9d8b100</href>
<id>69c36892-e18f-49ae-acab-ca78f9d8b100</id>
<rel>self</rel>
<title>MyEventTransformerResponse</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responses</type>
<config>
<entry>
<key>topic</key>
<value>topic1 as topic2</value>
</entry>
<entry>
<key>params</key>
<value>newproperty=100</value>
</entry>
<entry>
<key>properties</key>
<value>*</value>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5</href>
<id>c1e571f9-6d29-4d4b-bb78-f8c61a8cf7b5</id>
<rel>responder</rel>
<title>MyEventTransformer</title>
</responder>
<responseType>EventTransformer</responseType>
<responseTypeDisplayName>Event Transformer</responseTypeDisplayName>
<templates />
<rules />
</response>
Response Code : 200 OK

Delete Event Transformer Response


Use the DELETE method to delete an event transformer response in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes an event transformer
response in a RulePoint application.
DELETE http://invrw28cep14:8080/rulepoint/api/projects/1/responses/69c36892-e18f-49ae-
acab-ca78f9d8b100
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

Responses 309
DELETE Request in XML Format
Generate a DELETE request. For example, the following DELETE request deletes an event transformer
response in a RulePoint application.
DELETE http://invrw28cep14:8080/rulepoint/api/projects/1/responses/69c36892-e18f-49ae-
acab-ca78f9d8b100
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

RTAM Response
Use the examples to create, update, or delete an RTAM response.

Create RTAM Response


Use the POST method to create an RTAM response in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates an RTAM response in a RulePoint
application.
POST http://localhost:8080/rulepoint/api/projects/1/responses
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "rtamresponse",
"valid": true,
"force": false,
"responder": {
"rel": "self",
"href": "api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54",
"title": "MyRTAMResponder",
"id": "d4c831d8-e031-4119-ac1b-28d4e785ab54"
},
"config": {
"to": "Administrator",
"body": "RTAM Alert Body",
"subject": "RTAM Alert Subject",
"priority": "3",
"channels": null,
"header": null,
"actions": null,
"groups": null,
"metadata": null
}
}

POST Response in JSON Format


Returns the RTAM response object and response code. Returns the error object if an error occurs.
{
"id": "10467fff-8e53-4d23-b227-a663a7e458e3",
"name": "rtamresponse",
"valid": true,
"self": {

310 Chapter 6: Sample XML and JSON Requests and Responses


"rel": "self",
"href": "api/projects/1/responses/10467fff-8e53-4d23-b227-a663a7e458e3",
"title": "rtamresponse",
"id": "10467fff-8e53-4d23-b227-a663a7e458e3"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responses/10467fff-8e53-4d23-b227-a663a7e458e3",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responses/10467fff-8e53-4d23-b227-a663a7e458e3",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responses/10467fff-8e53-4d23-b227-a663a7e458e3/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responses",
"lastModifiedDate": "2013-09-19T17:51:50+05:30",
"createDate": "2013-09-19T17:51:50+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responseType": "RTAMResponder",
"responseTypeDisplayName": "RTAM Responder",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54",
"title": "MyRTAMResponder",
"id": "d4c831d8-e031-4119-ac1b-28d4e785ab54"
},
"multithreaded": false,
"config": {
"to": "Administrator",
"body": "RTAM Alert Body",
"subject": "RTAM Alert Subject",
"priority": "3",
"channels": "",
"header": "",
"actions": "",
"groups": "",
"metadata": null
}
}
Response Code: 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates an RTAM response in a RulePoint
application.
POST http://localhost:8080/rulepoint/api/projects/1/responses
Accept: application/xml

Responses 311
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<name>rtamresponse</name>
<type>responses</type>
<config>
<entry>
<key>to</key>
<value>Administrator</value>
</entry>
<entry>
<key>body</key>
<value>RTAM Alert Body</value>
</entry>
<entry>
<key>subject</key>
<value>RTAM Alert Subject</value>
</entry>
<entry>
<key>priority</key>
<value>3</value>
</entry>
<entry>
<key>channels</key>
<value/>
</entry>
<entry>
<key>header</key>
<value/>
</entry>
<entry>
<key>actions</key>
<value/>
</entry>
<entry>
<key>groups</key>
<value/>
</entry>
<entry>
<key>metadata</key>
</entry>
</config>
<responder>
<href>api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54</href>
<id>d4c831d8-e031-4119-ac1b-28d4e785ab54</id>
<rel>responder</rel>
<title>MyRTAMResponder</title>
</responder>
<responseType>RTAMResponder</responseType>
</response>

POST Response in XML Format


Returns the RTAM response object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<acl>
<href>api/projects/1/responses/10467fff-8e53-4d23-b227-a663a7e458e3/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responses/10467fff-8e53-4d23-b227-a663a7e458e3</href>
<rel>update</rel>
<title>Edit</title>

312 Chapter 6: Sample XML and JSON Requests and Responses


<type>PUT</type>
</action>
<action>
<href>api/projects/1/responses/10467fff-8e53-4d23-b227-a663a7e458e3</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>10467fff-8e53-4d23-b227-a663a7e458e3</id>
<links/>
<name>rtamresponse</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responses/10467fff-8e53-4d23-b227-a663a7e458e3</href>
<id>10467fff-8e53-4d23-b227-a663a7e458e3</id>
<rel>self</rel>
<title>rtamresponse</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responses</type>
<config>
<entry>
<key>to</key>
<value>Administrator</value>
</entry>
<entry>
<key>body</key>
<value>RTAM Alert Body</value>
</entry>
<entry>
<key>subject</key>
<value>RTAM Alert Subject</value>
</entry>
<entry>
<key>priority</key>
<value>3</value>
</entry>
<entry>
<key>channels</key>
<value/>
</entry>
<entry>
<key>header</key>
<value/>
</entry>
<entry>
<key>actions</key>
<value/>
</entry>
<entry>
<key>groups</key>
<value/>
</entry>
<entry>
<key>metadata</key>
</entry>
</config>

Responses 313
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54</href>
<id>d4c831d8-e031-4119-ac1b-28d4e785ab54</id>
<rel>responder</rel>
<title>MyRTAMResponder</title>
</responder>
<responseType>RTAMResponder</responseType>
<responseTypeDisplayName>RTAM Responder</responseTypeDisplayName>
<templates />
<rules />
</response>
Response Code : 201 Created

Update RTAM Response


Use the PUT method to update an RTAM response in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates an RTAM response in a RulePoint
application.
PUT http://invrw28cep14:8080/rulepoint/api/projects/1/responses/10467fff-8e53-4d23-b227-
a663a7e458e3
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "MyRTAMResponse",
"valid": true,
"force": false,
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54",
"title": "MyRTAMResponder",
"id": "d4c831d8-e031-4119-ac1b-28d4e785ab54"
},
"config": {
"to": "Administrator",
"body": "RTAM Alert Body",
"subject": "RTAM Alert Subject",
"priority": "3",
"channels": null,
"header": null,
"actions": null,
"groups": null,
"metadata": null
}
}

PUT Response in JSON Format


Returns the RTAM response object and response code. Returns the error object if an error occurs.
{
"id": "10467fff-8e53-4d23-b227-a663a7e458e3",
"name": "MyRTAMResponse",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/responses/10467fff-8e53-4d23-b227-a663a7e458e3",
"title": "MyRTAMResponse",
"id": "10467fff-8e53-4d23-b227-a663a7e458e3"

314 Chapter 6: Sample XML and JSON Requests and Responses


},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responses/10467fff-8e53-4d23-b227-a663a7e458e3",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responses/10467fff-8e53-4d23-b227-a663a7e458e3",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responses/10467fff-8e53-4d23-b227-a663a7e458e3/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responses",
"lastModifiedDate": "2013-09-19T17:56:01+05:30",
"createDate": "2013-09-19T17:51:50+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responseType": "RTAMResponder",
"responseTypeDisplayName": "RTAM Responder",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54",
"title": "MyRTAMResponder",
"id": "d4c831d8-e031-4119-ac1b-28d4e785ab54"
},
"multithreaded": false,
"config": {
"to": "Administrator",
"body": "RTAM Alert Body",
"subject": "RTAM Alert Subject",
"priority": "3",
"channels": "",
"header": "",
"actions": "",
"groups": "",
"metadata": null
}
}
Response Code: 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates an RTAM response in a RulePoint
application.
PUT http://invrw28cep14:8080/rulepoint/api/projects/1/responses/10467fff-8e53-4d23-b227-
a663a7e458e3
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

Responses 315
PUT Body in XML Format
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<name>MyRTAMResponse</name>
<type>responses</type>
<config>
<entry>
<key>to</key>
<value>Administrator</value>
</entry>
<entry>
<key>body</key>
<value>RTAM Alert Body</value>
</entry>
<entry>
<key>subject</key>
<value>RTAM Alert Subject</value>
</entry>
<entry>
<key>priority</key>
<value>3</value>
</entry>
<entry>
<key>channels</key>
<value/>
</entry>
<entry>
<key>header</key>
<value/>
</entry>
<entry>
<key>actions</key>
<value/>
</entry>
<entry>
<key>groups</key>
<value/>
</entry>
<entry>
<key>metadata</key>
</entry>
</config>
<responder>
<href>api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54</href>
<id>d4c831d8-e031-4119-ac1b-28d4e785ab54</id>
<rel>responder</rel>
<title>MyRTAMResponder</title>
</responder>
<responseType>RTAMResponder</responseType>
</response>

PUT Response in XML Format


Returns the RTAM response object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<acl>
<href>api/projects/1/responses/10467fff-8e53-4d23-b227-a663a7e458e3/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responses/10467fff-8e53-4d23-b227-a663a7e458e3</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>

316 Chapter 6: Sample XML and JSON Requests and Responses


<href>api/projects/1/responses/10467fff-8e53-4d23-b227-a663a7e458e3</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>10467fff-8e53-4d23-b227-a663a7e458e3</id>
<links/>
<name>rtamresponse</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responses/10467fff-8e53-4d23-b227-a663a7e458e3</href>
<id>10467fff-8e53-4d23-b227-a663a7e458e3</id>
<rel>self</rel>
<title>rtamresponse</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responses</type>
<config>
<entry>
<key>to</key>
<value>Administrator</value>
</entry>
<entry>
<key>body</key>
<value>RTAM Alert Body</value>
</entry>
<entry>
<key>subject</key>
<value>RTAM Alert Subject</value>
</entry>
<entry>
<key>priority</key>
<value>3</value>
</entry>
<entry>
<key>channels</key>
<value/>
</entry>
<entry>
<key>header</key>
<value/>
</entry>
<entry>
<key>actions</key>
<value/>
</entry>
<entry>
<key>groups</key>
<value/>
</entry>
<entry>
<key>metadata</key>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/d4c831d8-e031-4119-ac1b-28d4e785ab54</href>

Responses 317
<id>d4c831d8-e031-4119-ac1b-28d4e785ab54</id>
<rel>responder</rel>
<title>MyRTAMResponder</title>
</responder>
<responseType>RTAMResponder</responseType>
<responseTypeDisplayName>RTAM Responder</responseTypeDisplayName>
<templates />
<rules />
</response>
Response Code : 200 OK

Delete RTAM Response


Use the DELETE method to delete an RTAM response in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes an RTAM response in a
RulePoint application.
DELETE http://invrw28cep14:8080/rulepoint/api/projects/1/responses/10467fff-8e53-4d23-
b227-a663a7e458e3
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes an RTAM response in a
RulePoint application.
DELETE http://invrw28cep14:8080/rulepoint/api/projects/1/responses/10467fff-8e53-4d23-
b227-a663a7e458e3
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

File Output Response


Use the examples to create, update, or delete a file output response.

Create File Output Response


Use the POST method to create a File Output response in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates a file output response in a
RulePoint application.
POST http://localhost:8080/rulepoint/api/projects/1/responses
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "MyFileOutputResponder_Response",

318 Chapter 6: Sample XML and JSON Requests and Responses


"valid": true,
"force": false,
"responder": {
"rel": "self",
"href": "api/projects/1/responders/be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe",
"title": "MyFileOutputResponder",
"id": "be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe"
},
"config": {
"contents": "RulePoint FileOUt response",
"filename": "response.txt",
"mode": "append"
}
}

POST Response in JSON Format


Returns the File Output response object and response code 201 OK. Returns the error object if an error
occurs.
{
"id": "c792b088-5f99-4b4b-9b28-b02d2c618edb",
"name": "MyFileOutputResponder_Response",
"self": {
"rel": "self",
"href": "api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb",
"title": "MyFileOutputResponder_Response",
"id": "c792b088-5f99-4b4b-9b28-b02d2c618edb"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responses",
"valid": true,
"lastModifiedDate": "2013-09-26T15:14:58+05:30",
"createDate": "2013-09-26T15:14:58+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responseType": "fileOutput",
"responseTypeDisplayName": "File Responder",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe",
"title": "MyFileOutputResponder",
"id": "be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe"

Responses 319
},
"multithreaded": false,
"config": {
"contents": "RulePoint FileOUt response",
"filename": "response.txt",
"mode": "append"
}
}
Response Code: 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates a file output response in a
RulePoint application.
POST http://localhost:8080/rulepoint/api/projects/1/responses
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<name>MyFileOutputResponder_Response</name>
<type>responses</type>
<config>
<entry>
<key>contents</key>
<value>RulePoint FileOUt response</value>
</entry>
<entry>
<key>filename</key>
<value>response.txt</value>
</entry>
<entry>
<key>mode</key>
<value>append</value>
</entry>
</config>
<responder>
<href>api/projects/1/responders/be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe</href>
<id>be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe</id>
<rel>responder</rel>
<title>MyFileOutputResponder</title>
</responder>
<responseType>fileOutput</responseType>
</response>

POST Response in XML Format


Returns the file output response object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<acl>
<href>api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb</href>
<rel>delete</rel>

320 Chapter 6: Sample XML and JSON Requests and Responses


<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>c792b088-5f99-4b4b-9b28-b02d2c618edb</id>
<name>MyFileOutputResponder_Response</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb</href>
<id>c792b088-5f99-4b4b-9b28-b02d2c618edb</id>
<rel>self</rel>
<title>MyFileOutputResponder_Response</title>
</self>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responses</type>
<valid>true</valid>
<config>
<entry>
<key>contents</key>
<value>RulePoint FileOUt response</value>
</entry>
<entry>
<key>filename</key>
<value>response.txt</value>
</entry>
<entry>
<key>mode</key>
<value>append</value>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe</href>
<id>be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe</id>
<rel>responder</rel>
<title>MyFileOutputResponder</title>
</responder>
<responseType>fileOutput</responseType>
<responseTypeDisplayName>File Responder</responseTypeDisplayName>
<templates />
<rules />
</response>
Response Code : 201 Created

Update File Output Response


Use the PUT method to update a file output response in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates a file output response in a
RulePoint application.
PUT http://localhost:8080/rulepoint/api/projects/1/responses/c792b088-5f99-4b4b-9b28-
b02d2c618edb
Accept: application/json

Responses 321
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "MyFileOutputResponse",
"valid": true,
"force": false,
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe",
"title": "MyFileOutputResponder",
"id": "be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe"
},
"config": {
"contents": "RulePoint FileOUt response",
"filename": "response.txt",
"mode": "append"
}

PUT Response in JSON Format


Returns the file output response object and response code 200 OK. Returns the error object if an error
occurs.
{
"id": "c792b088-5f99-4b4b-9b28-b02d2c618edb",
"name": "MyFileOutputResponse",
"self": {
"rel": "self",
"href": "api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb",
"title": "MyFileOutputResponse",
"id": "c792b088-5f99-4b4b-9b28-b02d2c618edb"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "responses",
"valid": true,
"lastModifiedDate": "2013-09-26T15:18:53+05:30",
"createDate": "2013-09-26T15:14:58+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"responseType": "fileOutput",

322 Chapter 6: Sample XML and JSON Requests and Responses


"responseTypeDisplayName": "File Responder",
"responder": {
"rel": "responder",
"href": "api/projects/1/responders/be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe",
"title": "MyFileOutputResponder",
"id": "be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe"
},
"multithreaded": false,
"config": {
"contents": "RulePoint FileOUt response",
"filename": "response.txt",
"mode": "append"
}
}
Response Code: 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates a file output response in a
RulePoint application.
PUT http://localhost:8080/rulepoint/api/projects/1/responses/c792b088-5f99-4b4b-9b28-
b02d2c618edb
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<name>MyFileOutputResponse</name>
<type>responses</type>
<config>
<entry>
<key>contents</key>
<value>RulePoint FileOUt response</value>
</entry>
<entry>
<key>filename</key>
<value>response.txt</value>
</entry>
<entry>
<key>mode</key>
<value>append</value>
</entry>
</config>
<responder>
<href>api/projects/1/responders/be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe</href>
<id>be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe</id>
<rel>responder</rel>
<title>MyFileOutputResponder</title>
</responder>
<responseType>fileOutput</responseType>
</response>

PUT Response in XML Format


Returns the file output response object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<acl>
<href>api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb</href>

Responses 323
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>c792b088-5f99-4b4b-9b28-b02d2c618edb</id>
<name>MyFileOutputResponder_Response</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb</href>
<id>c792b088-5f99-4b4b-9b28-b02d2c618edb</id>
<rel>self</rel>
<title>MyFileOutputResponder_Response</title>
</self>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>responses</type>
<valid>true</valid>
<config>
<entry>
<key>contents</key>
<value>RulePoint FileOUt response</value>
</entry>
<entry>
<key>filename</key>
<value>response.txt</value>
</entry>
<entry>
<key>mode</key>
<value>append</value>
</entry>
</config>
<multithreaded>false</multithreaded>
<responder>
<href>api/projects/1/responders/be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe</href>
<id>be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe</id>
<rel>responder</rel>
<title>MyFileOutputResponder</title>
</responder>
<responseType>fileOutput</responseType>
<responseTypeDisplayName>File Responder</responseTypeDisplayName>
<templates />
<rules />
</response>
Response Code : 200 OK

324 Chapter 6: Sample XML and JSON Requests and Responses


Delete File Output Response
Use the DELETE method to delete a file output response in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes a file output response in a
RulePoint application.
DELETE http://localhost:8080/rulepoint/api/projects/1/responses/
c792b088-5f99-4b4b-9b28-b02d2c618edb

Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes a file output response in a
RulePoint application.
DELETE http://localhost:8080/rulepoint/api/projects/1/responses/c792b088-5f99-4b4b-9b28-
b02d2c618edb
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No content

Marshaller
You can create or update a marshaller for a source.

Create a Marshaller
Use the POST method to create a marshaller for a source.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates a marshaller in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/sources
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "MyFileInputSource",
"description": "",
"valid": true,
"sourceType": "FileSource",
"connection": null,
"topics": [
{
"rel": "self",
"href": "api/projects/1/topics/45a09189-2edd-475a-8106-502f7da3115d",

Marshaller 325
"title": "filetopic",
"id": "45a09189-2edd-475a-8106-502f7da3115d"
}
],
"config": {
"file": "c:\\temp\\myfile.txt",
"mode": "new",
"markerId": null,
"propertyMetadataMap": null
},
"marshaller": {
"marshallerClassname": "com.mycompany.MyMarshaller",
"marshallerProperties": {}
}
}

POST Response in JSON Format


Returns the marshaller object and response code 201 created. Returns the error object if an error occurs.
{
"id": "f420484c-3cb9-4e51-9d18-a5db2eba6599",
"name": "MyFileInputSource",
"self": {
"rel": "self",
"href": "api/projects/1/sources/f420484c-3cb9-4e51-9d18-a5db2eba6599",
"title": "MyFileInputSource",
"id": "f420484c-3cb9-4e51-9d18-a5db2eba6599"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/sources/f420484c-3cb9-4e51-9d18-a5db2eba6599",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/sources/f420484c-3cb9-4e51-9d18-a5db2eba6599",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "createSchedule",
"href": "api/projects/1/sources/f420484c-3cb9-4e51-9d18-a5db2eba6599/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/sources/f420484c-3cb9-4e51-9d18-a5db2eba6599/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "sources",
"valid": false,
"lastModifiedDate": "2013-09-26T16:39:49+05:30",
"createDate": "2013-09-26T16:39:49+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,

326 Chapter 6: Sample XML and JSON Requests and Responses


"dtError": "There are no schedules attached to this Source",
"sourceType": "FileSource",
"sourceTypeDisplayName": "File Source",
"schedulable": true,
"config": {
"file": "c:\\temp\\myfile.txt",
"markerId": "",
"propertyMetadataMap": null,
"mode": "new"
},
"topics": [
{
"href": "api/projects/1/topics/45a09189-2edd-475a-8106-502f7da3115d",
"title": "filetopic",
"objectType": "topics",
"id": "45a09189-2edd-475a-8106-502f7da3115d"
}
],
"marshaller": {
"marshallerClassname": "com.mycompany.MyMarshaller",
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code: 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates a marshaller in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/sources
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<name>jmssource</name>
<type>sources</type>
<config>
<entry>
<key>clientAcknowledgeMode</key>
<value>AUTO_ACKNOWLEDGE</value>
</entry>
<entry>
<key>clientId</key>
<value/>
</entry>
<entry>
<key>destination</key>
<value>jmsQueue</value>
</entry>
<entry>
<key>messageSelector</key>
<value/>
</entry>
<entry>
<key>subscriptionName</key>
<value/>
</entry>
</config>
<connection>
<href>api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25</href>
<id>894b2948-ce82-4e0a-9302-267d3482ae25</id>
<rel>connection</rel>
<title>jmsconnection</title>
</connection>

Marshaller 327
<marshaller>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>false</schedulable>
<sourceType>JMSSource</sourceType>
<sourceTypeDisplayName>JMS Source</sourceTypeDisplayName>
<topics>
<topic>
<href>api/projects/1/topics/6e9c0ae9-fce0-4219-9e58-639af4e79daa</href>
<id>6e9c0ae9-fce0-4219-9e58-639af4e79daa</id>
<objectType>topics</objectType>
<title>jmstopic</title>
</topic>
</topics>
</source>

POST Response in XML Format


Returns the marshaller object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<acl>
<href>api/projects/1/sources/f420484c-3cb9-4e51-9d18-a5db2eba6599/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/sources/f420484c-3cb9-4e51-9d18-a5db2eba6599</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/sources/f420484c-3cb9-4e51-9d18-a5db2eba6599</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/sources/f420484c-3cb9-4e51-9d18-a5db2eba6599/schedules</
href>
<rel>createSchedule</rel>
<title>Create Schedule</title>
<type>POST</type>
</action>
</actions>
<id>f420484c-3cb9-4e51-9d18-a5db2eba6599</id>
<name>MyFileInputSource</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/sources/f420484c-3cb9-4e51-9d18-a5db2eba6599</href>
<id>f420484c-3cb9-4e51-9d18-a5db2eba6599</id>
<rel>self</rel>
<title>MyFileInputSource</title>
</self>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<description/>
<dtError>There are no schedules attached to this Source</dtError>
<force>false</force>
<lastModifiedDate/>

328 Chapter 6: Sample XML and JSON Requests and Responses


<predefined>false</predefined>
<type>sources</type>
<valid>false</valid>
<config>
<entry>
<key>file</key>
<value>c:\temp\myfile.txt</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>propertyMetadataMap</key>
</entry>
<entry>
<key>mode</key>
<value>new</value>
</entry>
</config>
<marshaller>
<marshallerClassname>com.mycompany.MyMarshaller</marshallerClassname>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<sourceType>FileSource</sourceType>
<sourceTypeDisplayName>File Source</sourceTypeDisplayName>
<topics>
<topic>
<href>api/projects/1/topics/45a09189-2edd-475a-8106-502f7da3115d</href>
<id>45a09189-2edd-475a-8106-502f7da3115d</id>
<objectType>topics</objectType>
<title>filetopic</title>
</topic>
</topics>
</source>
Response Code: 201 Created

Note:

When you create a marshaller for a responder, add the following code in the request body if you use the JSON
format:
"marshaller": {
"marshallerClassname": "com.mycompany.MyMarshaller",
"marshallerProperties":{}}
Add the following code in the request body if you use the XML format:
<marshaller>
<marshallerClassname>com.mycompany.MyMarshaller</marshallerClassname>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>

Update a Marshaller
Use the PUT method to update a marshaller in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates a marshaller in a RulePoint
application:
PUT http://localhost:8080/rulepoint/api/projects/1/sources/f420484c-3cb9-4e51-9d18-
a5db2eba6599

Marshaller 329
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "MyFileInputSource",
"description": "",
"valid": true,
"sourceType": "FileSource",
"connection": null,
"topics": [
{
"rel": "self",
"href": "api/projects/1/topics/45a09189-2edd-475a-8106-502f7da3115d",
"title": "filetopic",
"id": "45a09189-2edd-475a-8106-502f7da3115d"
}
],
"config": {
"file": "c:\\temp\\myfile.txt",
"mode": "new",
"markerId": null,
"propertyMetadataMap": null
},
"marshaller": {
"marshallerClassname": "com.mycompany.MySourceMarshaller",
"marshallerProperties": {}
}
}

PUT Response in JSON Format


Returns the marshaller object and source code 200 OK. Returns the error object if an error occurs.
{
"id": "f420484c-3cb9-4e51-9d18-a5db2eba6599",
"name": "MyFileInputSource",
"self": {
"rel": "self",
"href": "api/projects/1/sources/f420484c-3cb9-4e51-9d18-a5db2eba6599",
"title": "MyFileInputSource",
"id": "f420484c-3cb9-4e51-9d18-a5db2eba6599"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/sources/f420484c-3cb9-4e51-9d18-a5db2eba6599",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/sources/f420484c-3cb9-4e51-9d18-a5db2eba6599",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "createSchedule",
"href": "api/projects/1/sources/f420484c-3cb9-4e51-9d18-a5db2eba6599/
schedules",
"type": "POST",
"title": "Create Schedule"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/sources/f420484c-3cb9-4e51-9d18-a5db2eba6599/acl",
"title": "acl"

330 Chapter 6: Sample XML and JSON Requests and Responses


},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "sources",
"valid": false,
"lastModifiedDate": "2013-09-26T16:39:49+05:30",
"createDate": "2013-09-26T16:39:49+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"dtError": "There are no schedules attached to this Source",
"sourceType": "FileSource",
"sourceTypeDisplayName": "File Source",
"schedulable": true,
"config": {
"file": "c:\\temp\\myfile.txt",
"markerId": "",
"propertyMetadataMap": null,
"mode": "new"
},
"topics": [
{
"href": "api/projects/1/topics/45a09189-2edd-475a-8106-502f7da3115d",
"title": "filetopic",
"objectType": "topics",
"id": "45a09189-2edd-475a-8106-502f7da3115d"
}
],
"marshaller": {
"marshallerClassname": "com.mycompany.MySourceMarshaller",
"marshallerProperties": {},
"marshallerThreadsafe": false
}
}
Response Code: 200 OK

PUT Request in XML Format


PUT http://localhost:8080/rulepoint/api/projects/1/sources/f420484c-3cb9-4e51-9d18-
a5db2eba6599
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


Generate a PUT request. For example, the following PUT request updates a marshaller in a RulePoint
application:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<name>MyFileInputSource</name>
<type>sources</type>
<valid>false</valid>
<config>
<entry>
<key>file</key>
<value>c:\temp\myfile.txt</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>

Marshaller 331
<key>propertyMetadataMap</key>
</entry>
<entry>
<key>mode</key>
<value>new</value>
</entry>
</config>
<marshaller>
<marshallerClassname>com.mycompany.MySourceMarshaller</marshallerClassname>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<sourceType>FileSource</sourceType>
<sourceTypeDisplayName>File Source</sourceTypeDisplayName>
<topics>
<href>api/projects/1/topics/45a09189-2edd-475a-8106-502f7da3115d</href>
<id>45a09189-2edd-475a-8106-502f7da3115d</id>
<objectType>topics</objectType>
<title>filetopic</title>
</topics>
</source>

PUT Response in XML Format


Returns the schedule object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<source>
<acl>
<href>api/projects/1/sources/f420484c-3cb9-4e51-9d18-a5db2eba6599/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<href>api/projects/1/sources/f420484c-3cb9-4e51-9d18-a5db2eba6599</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</actions>
<actions>
<href>api/projects/1/sources/f420484c-3cb9-4e51-9d18-a5db2eba6599</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</actions>
<actions>
<href>api/projects/1/sources/f420484c-3cb9-4e51-9d18-a5db2eba6599/schedules</
href>
<rel>createSchedule</rel>
<title>Create Schedule</title>
<type>POST</type>
</actions>
<id>f420484c-3cb9-4e51-9d18-a5db2eba6599</id>
<name>MyFileInputSource</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/sources/f420484c-3cb9-4e51-9d18-a5db2eba6599</href>
<id>f420484c-3cb9-4e51-9d18-a5db2eba6599</id>
<rel>self</rel>
<title>MyFileInputSource</title>
</self>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<description/>

332 Chapter 6: Sample XML and JSON Requests and Responses


<dtError>There are no schedules attached to this Source</dtError>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>sources</type>
<valid>false</valid>
<config>
<entry>
<key>file</key>
<value>c:\temp\myfile.txt</value>
</entry>
<entry>
<key>markerId</key>
<value/>
</entry>
<entry>
<key>propertyMetadataMap</key>
</entry>
<entry>
<key>mode</key>
<value>new</value>
</entry>
</config>
<marshaller>
<marshallerClassname>com.mycompany.MySourceMarshaller</marshallerClassname>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>
<schedulable>true</schedulable>
<sourceType>FileSource</sourceType>
<sourceTypeDisplayName>File Source</sourceTypeDisplayName>
<topics>
<href>api/projects/1/topics/45a09189-2edd-475a-8106-502f7da3115d</href>
<id>45a09189-2edd-475a-8106-502f7da3115d</id>
<objectType>topics</objectType>
<title>filetopic</title>
</topics>
</source>
Response Code: 200 OK

Note:

When you update a marshaller for a responder, add the following code in the request body if you use the
JSON format:
<marshaller>
<marshallerClassname>com.mycompany.MySourceMarshaller</marshallerClassname>
<marshallerProperties/>
Add the following code in the request body if you use the XML format:
<marshaller>
<marshallerClassname>com.mycompany.MySourceMarshaller</marshallerClassname>
<marshallerProperties/>
<marshallerThreadsafe>false</marshallerThreadsafe>
</marshaller>

Marshaller 333
Template
You can create, update, or delete a template.

Create a Template
Use the POST method to create a template.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates a template in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/templates
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "template_stock_rule",
"description": "",
"instructions": "",
"comment": "A template for creating rules around stocks",
"templateDrqlText": "when 1 stock with symbol = '<<symbol>>' and price > '<<price>>'
then MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'",
"multithreaded": true,
"force": true,
"upgrade": false,
"templateParameters": [
{
"name": "symbol",
"fieldName": "symbol",
"paramType": "String",
"testParamValue": "XYZ",
"defaultParamValue": "XYZ",
"setDefault": true,
"paramOrder": 0
},
{
"name": "price",
"fieldName": "price",
"paramOrder": 1,
"paramType": "Real",
"testParamValue": "38.89",
"defaultParamValue": "38.89",
"setDefault": true
}
]
}

POST Response in JSON Format


Returns the template object and response code. Returns the error object if an error occurs.
{
"id": "3d385b72-232a-4caa-861c-c59072a98b44",
"name": "template_stock_rule",
"self": {
"rel": "self",
"href": "api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44",
"title": "template_stock_rule",
"id": "3d385b72-232a-4caa-861c-c59072a98b44"
},

334 Chapter 6: Sample XML and JSON Requests and Responses


"actions": [
{
"rel": "createDeploymentPolicy",
"href": "api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44/
deploymentPolicy",
"type": "POST",
"title": "Create Deployment Policy"
},
{
"rel": "createTemplateRule",
"href": "api/projects/1",
"type": "DELETE",
"title": "Create Template Rule"
},
{
"rel": "delete",
"href": "api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "update",
"href": "api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44",
"type": "PUT",
"title": "Edit"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"description": "",
"type": "templates",
"valid": true,
"lastModifiedDate": "2013-09-26T15:26:14+05:30",
"createDate": "2013-09-26T15:26:14+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": false,
"deployState": "DRAFT",
"force": false,
"templateParameters": [
{
"paramType": "String",
"name": "symbol",
"defaultParamValue": "XYZ",
"testParamValue": "XYZ",
"format": "",
"picklist": "",
"description": "",
"leftLabel": "",
"rightLabel": "",
"popupHelp": "",
"inlineHelp": null,
"valueList": null,
"minimum": null,
"maximum": null,
"realMin": null,
"realMax": null,
"maxLength": null,
"setDefault": true,
"fieldName": "symbol",
"customValidationValue": [],

Template 335
"watchlist": null,
"topicName": "",
"paramOrder": 0
},
{
"paramType": "Real",
"name": "price",
"defaultParamValue": "38.89",
"testParamValue": "38.89",
"format": "",
"picklist": "",
"description": "",
"leftLabel": "",
"rightLabel": "",
"popupHelp": "",
"inlineHelp": null,
"valueList": null,
"minimum": null,
"maximum": null,
"realMin": null,
"realMax": null,
"maxLength": null,
"setDefault": true,
"fieldName": "price",
"customValidationValue": null,
"watchlist": null,
"topicName": "",
"paramOrder": 1
}
],
"rules": [],
"topics": [
{
"href": "api/projects/1/topics/c03e56e5-3718-4989-b23b-fe6f342ea655",
"title": "stock",
"objectType": "topics",
"id": "c03e56e5-3718-4989-b23b-fe6f342ea655"
}
],
"watchlists": [],
"analytics": [],
"responses": [
{
"href": "api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb",
"title": "MyFileOutputResponse",
"objectType": "responses",
"id": "c792b088-5f99-4b4b-9b28-b02d2c618edb"
}
],
"comment": "A template for creating rules around stocks",
"upgrade": false,
"multithreaded": true,
"templateDrqlText": "when 1 stock with symbol = '<<symbol>>' and price > '<<price>>'
then MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'",
"instructions": "",
"templateDrqlTextFormatted": "when 1 stock with symbol = '&lt;&lt;symbol&gt;&gt;'
and price &gt; '&lt;&lt;price&gt;&gt;' then MyFileOutputResponse with contents='$
{stock.symbol} price is greater than ${stock.price}'"
}
Response Code: 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates a template in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/templates
Accept: application/xml

336 Chapter 6: Sample XML and JSON Requests and Responses


Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rule>
<name>stock_rule</name>
<description/>
<type>rules</type>
<valid>true</valid>
<drqlStatement>when 1 stock with symbol = 'XYZ' and price &gt; '38.89' then
MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'</drqlStatement>
<drqlStatementFormatted>when 1 stock with symbol = 'XYZ' and price &gt; '38.89' then
MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'</drqlStatementFormatted>
<multithreaded>false</multithreaded>
<responses>
<response>
<href>api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb</href>
<id>c792b088-5f99-4b4b-9b28-b02d2c618edb</id>
<objectType>responses</objectType>
<title>MyFileOutputResponse</title>
</response>
</responses>
<ruleType>template</ruleType>
<template>
<href>api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44</href>
<id>3d385b72-232a-4caa-861c-c59072a98b44</id>
<rel>template</rel>
<title>templ_stock_rule</title>
</template>
<templateParams>
<entry>
<key>price</key>
<value>38.89</value>
</entry>
<entry>
<key>symbol</key>
<value>XYZ</value>
</entry>
</templateParams>
<topics>
<topic>
<href>api/projects/1/topics/c03e56e5-3718-4989-b23b-fe6f342ea655</href>
<id>c03e56e5-3718-4989-b23b-fe6f342ea655</id>
<objectType>topics</objectType>
<title>stock</title>
</topic>
</topics>
</rule>

POST Response in XML Format


Returns the template object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rule>
<acl>
<href>api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>

Template 337
<action>
<href>api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/deploy</href>
<rel>deploy</rel>
<title>Deploy</title>
<type>POST</type>
</action>
<action>
<rel>createAdvancedRule</rel>
<title>Create Advanced Rule</title>
<type>POST</type>
</action>
<action>
<href>api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961</href>
<rel>createTemplate</rel>
<title>Create Template</title>
<type>POST</type>
</action>
</actions>
<id>42ef4d92-caed-4e05-abe8-16515f9f2961</id>
<name>stock_rule</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961</href>
<id>42ef4d92-caed-4e05-abe8-16515f9f2961</id>
<rel>self</rel>
<title>stock_rule</title>
</self>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<description/>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>rules</type>
<valid>true</valid>
<drqlStatement>when 1 stock with symbol = 'XYZ' and price &gt; '38.89' then
MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'</drqlStatement>
<drqlStatementFormatted>when 1 stock with symbol = 'XYZ' and price &gt; '38.89' then
MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'</drqlStatementFormatted>
<multithreaded>false</multithreaded>
<responses>
<response>
<href>api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb</href>
<id>c792b088-5f99-4b4b-9b28-b02d2c618edb</id>
<objectType>responses</objectType>
<title>MyFileOutputResponse</title>
</response>
</responses>
<ruleType>template</ruleType>
<template>
<href>api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44</href>
<id>3d385b72-232a-4caa-861c-c59072a98b44</id>
<rel>template</rel>
<title>templ_stock_rule</title>
</template>

338 Chapter 6: Sample XML and JSON Requests and Responses


<templateParams>
<entry>
<key>price</key>
<value>38.89</value>
</entry>
<entry>
<key>symbol</key>
<value>XYZ</value>
</entry>
</templateParams>
<topics>
<topic>
<href>api/projects/1/topics/c03e56e5-3718-4989-b23b-fe6f342ea655</href>
<id>c03e56e5-3718-4989-b23b-fe6f342ea655</id>
<objectType>topics</objectType>
<title>stock</title>
</topic>
</topics>
</rule>
Response Code: 201 Created

Update a Template
Use the PUT method to update a template in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates a template in a RulePoint
application:
PUT http://localhost:8080/rulepoint/api/projects/1/templates/3d385b72-232a-4caa-861c-
c59072a98b44
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "templ_stock_rule",
"description": "",
"instructions": "",
"comment": "A template for creating rules around stocks",
"templateDrqlText": "when 1 stock with symbol = '<<symbol>>' and price > '<<price>>'
then MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'",
"multithreaded": false,
"force": false,
"upgrade": false,
"templateParameters": [
{
"paramType": "String",
"name": "symbol",
"defaultParamValue": "XYZ",
"testParamValue": "XYZ",
"format": "",
"picklist": "",
"description": "",
"leftLabel": "",
"rightLabel": "",
"popupHelp": "",
"inlineHelp": null,
"valueList": null,
"minimum": null,
"maximum": null,
"realMin": null,
"realMax": null,

Template 339
"maxLength": null,
"setDefault": true,
"fieldName": "symbol",
"customValidationValue": [],
"watchlist": null,
"topicName": "",
"paramOrder": 0
},
{
"paramType": "Real",
"name": "price",
"defaultParamValue": "38.89",
"testParamValue": "38.89",
"format": "",
"picklist": "",
"description": "",
"leftLabel": "",
"rightLabel": "",
"popupHelp": "",
"inlineHelp": null,
"valueList": null,
"minimum": null,
"maximum": null,
"realMin": null,
"realMax": null,
"maxLength": null,
"setDefault": true,
"fieldName": "price",
"customValidationValue": null,
"watchlist": null,
"topicName": "",
"paramOrder": 1
}
]
}

PUT Response in JSON Format


Returns the template object and source code. Returns the error object if an error occurs.
{
"id": "3d385b72-232a-4caa-861c-c59072a98b44",
"name": "templ_stock_rule",
"self": {
"rel": "self",
"href": "api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44",
"title": "templ_stock_rule",
"id": "3d385b72-232a-4caa-861c-c59072a98b44"
},
"actions": [
{
"rel": "createDeploymentPolicy",
"href": "api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44/
deploymentPolicy",
"type": "POST",
"title": "Create Deployment Policy"
},
{
"rel": "createTemplateRule",
"href": "api/projects/1",
"type": "DELETE",
"title": "Create Template Rule"
},
{
"rel": "delete",
"href": "api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44",
"type": "DELETE",
"title": "Delete"
},
{

340 Chapter 6: Sample XML and JSON Requests and Responses


"rel": "update",
"href": "api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44",
"type": "PUT",
"title": "Edit"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"description": "",
"type": "templates",
"valid": true,
"lastModifiedDate": "2013-09-26T15:38:08+05:30",
"createDate": "2013-09-26T15:26:14+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": false,
"deployState": "DRAFT",
"force": false,
"templateParameters": [
{
"paramType": "String",
"name": "symbol",
"defaultParamValue": "XYZ",
"testParamValue": "XYZ",
"format": "",
"picklist": "",
"description": "",
"leftLabel": "",
"rightLabel": "",
"popupHelp": "",
"inlineHelp": null,
"valueList": null,
"minimum": null,
"maximum": null,
"realMin": null,
"realMax": null,
"maxLength": null,
"setDefault": true,
"fieldName": "symbol",
"customValidationValue": [],
"watchlist": null,
"topicName": "",
"paramOrder": 0
},
{
"paramType": "Real",
"name": "price",
"defaultParamValue": "38.89",
"testParamValue": "38.89",
"format": "",
"picklist": "",
"description": "",
"leftLabel": "",
"rightLabel": "",
"popupHelp": "",
"inlineHelp": null,
"valueList": null,
"minimum": null,
"maximum": null,
"realMin": null,
"realMax": null,

Template 341
"maxLength": null,
"setDefault": true,
"fieldName": "price",
"customValidationValue": null,
"watchlist": null,
"topicName": "",
"paramOrder": 1
}
],
"rules": [],
"topics": [
{
"href": "api/projects/1/topics/c03e56e5-3718-4989-b23b-fe6f342ea655",
"title": "stock",
"objectType": "topics",
"id": "c03e56e5-3718-4989-b23b-fe6f342ea655"
}
],
"watchlists": [],
"analytics": [],
"responses": [
{
"href": "api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb",
"title": "MyFileOutputResponse",
"objectType": "responses",
"id": "c792b088-5f99-4b4b-9b28-b02d2c618edb"
}
],
"comment": "A template for creating rules around stocks",
"upgrade": false,
"multithreaded": false,
"templateDrqlText": "when 1 stock with symbol = '<<symbol>>' and price > '<<price>>'
then MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'",
"instructions": "",
"templateDrqlTextFormatted": "when 1 stock with symbol = '&lt;&lt;symbol&gt;&gt;'
and price &gt; '&lt;&lt;price&gt;&gt;' then MyFileOutputResponse with contents='$
{stock.symbol} price is greater than ${stock.price}'"
}
Response Code: 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates a template in a RulePoint
application:
PUT http://localhost:8080/rulepoint/api/projects/1/templates/3d385b72-232a-4caa-861c-
c59072a98b44
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rule>
<name>stock_rule</name>
<description/>
<type>rules</type>
<valid>true</valid>
<drqlStatement>when 1 stock with symbol = 'XYZ' and price &gt; '38.89' then
MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'</drqlStatement>
<drqlStatementFormatted>when 1 stock with symbol = 'XYZ' and price &gt; '38.89' then
MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'</drqlStatementFormatted>
<multithreaded>false</multithreaded>
<responses>
<response>
<href>api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb</href>

342 Chapter 6: Sample XML and JSON Requests and Responses


<id>c792b088-5f99-4b4b-9b28-b02d2c618edb</id>
<objectType>responses</objectType>
<title>MyFileOutputResponse</title>
</response>
</responses>
<ruleType>template</ruleType>
<template>
<href>api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44</href>
<id>3d385b72-232a-4caa-861c-c59072a98b44</id>
<rel>template</rel>
<title>templ_stock_rule</title>
</template>
<templateParams>
<entry>
<key>price</key>
<value>38.89</value>
</entry>
<entry>
<key>symbol</key>
<value>XYZ</value>
</entry>
</templateParams>
<topics>
<topic>
<href>api/projects/1/topics/c03e56e5-3718-4989-b23b-fe6f342ea655</href>
<id>c03e56e5-3718-4989-b23b-fe6f342ea655</id>
<objectType>topics</objectType>
<title>stock</title>
</topic>
</topics>
</rule>

PUT Response in XML Format


Returns the schedule object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rule>
<acl>
<href>api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/deploy</href>
<rel>deploy</rel>
<title>Deploy</title>
<type>POST</type>
</action>
<action>
<rel>createAdvancedRule</rel>
<title>Create Advanced Rule</title>
<type>POST</type>
</action>
<action>
<href>api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961</href>
<rel>createTemplate</rel>
<title>Create Template</title>

Template 343
<type>POST</type>
</action>
</actions>
<id>42ef4d92-caed-4e05-abe8-16515f9f2961</id>
<name>stock_rule</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961</href>
<id>42ef4d92-caed-4e05-abe8-16515f9f2961</id>
<rel>self</rel>
<title>stock_rule</title>
</self>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<description/>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>rules</type>
<valid>true</valid>
<drqlStatement>when 1 stock with symbol = 'XYZ' and price &gt; '38.89' then
MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'</drqlStatement>
<drqlStatementFormatted>when 1 stock with symbol = 'XYZ' and price &gt; '38.89' then
MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'</drqlStatementFormatted>
<multithreaded>false</multithreaded>
<responses>
<response>
<href>api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb</href>
<id>c792b088-5f99-4b4b-9b28-b02d2c618edb</id>
<objectType>responses</objectType>
<title>MyFileOutputResponse</title>
</response>
</responses>
<ruleType>template</ruleType>
<template>
<href>api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44</href>
<id>3d385b72-232a-4caa-861c-c59072a98b44</id>
<rel>template</rel>
<title>templ_stock_rule</title>
</template>
<templateParams>
<entry>
<key>price</key>
<value>38.89</value>
</entry>
<entry>
<key>symbol</key>
<value>XYZ</value>
</entry>
</templateParams>
<topics>
<topic>
<href>api/projects/1/topics/c03e56e5-3718-4989-b23b-fe6f342ea655</href>
<id>c03e56e5-3718-4989-b23b-fe6f342ea655</id>
<objectType>topics</objectType>
<title>stock</title>
</topic>
</topics>
</rule>
Response Code: 200 OK

344 Chapter 6: Sample XML and JSON Requests and Responses


Delete a Template
Use the DELETE method to delete a template in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes a template in a RulePoint
application:
DELETE http://localhost:8080/rulepoint/api/projects/1/templates/3d385b72-232a-4caa-861c-
c59072a98b44
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes a template in a RulePoint
application:
DELETE http://localhost:8080/rulepoint/api/projects/1/templates/3d385b72-232a-4caa-861c-
c59072a98b44
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No content

Rules
Use the examples to retrieve a rule.

Create Template Rule


Use the POST method to create a template rule.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates a template rule in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/rules
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"name": "stock_rule",
"ruleType": "template",
"description": "",
"template": {
"rel": "self",
"href": "api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44",
"title": "templ_stock_rule",
"id": "3d385b72-232a-4caa-861c-c59072a98b44"
},
"templateParams": {

Rules 345
"symbol": "XYZ",
"price": "38.89"
}
}

POST Response in JSON Format


Returns the template rule object and response code. Returns the error object if an error occurs.
{
"id": "42ef4d92-caed-4e05-abe8-16515f9f2961",
"name": "stock_rule",
"self": {
"rel": "self",
"href": "api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961",
"title": "stock_rule",
"id": "42ef4d92-caed-4e05-abe8-16515f9f2961"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createAdvancedRule",
"type": "POST",
"title": "Create Advanced Rule"
},
{
"rel": "createTemplate",
"href": "api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961",
"type": "POST",
"title": "Create Template"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "rules",
"valid": true,
"lastModifiedDate": "2013-09-26T15:43:47+05:30",
"createDate": "2013-09-26T15:43:47+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"drqlStatement": "when 1 stock with symbol = 'XYZ' and price > '38.89' then

346 Chapter 6: Sample XML and JSON Requests and Responses


MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'",
"drqlStatementEditable": null,
"topics": [
{
"href": "api/projects/1/topics/c03e56e5-3718-4989-b23b-fe6f342ea655",
"title": "stock",
"objectType": "topics",
"id": "c03e56e5-3718-4989-b23b-fe6f342ea655"
}
],
"responses": [
{
"href": "api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb",
"title": "MyFileOutputResponse",
"objectType": "responses",
"id": "c792b088-5f99-4b4b-9b28-b02d2c618edb"
}
],
"multithreaded": false,
"template": {
"rel": "template",
"href": "api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44",
"title": "templ_stock_rule",
"id": "3d385b72-232a-4caa-861c-c59072a98b44"
},
"ruleType": "template",
"templateParams": {
"price": "38.89",
"symbol": "XYZ"
},
"drqlStatementFormatted": "when 1 stock with symbol = 'XYZ' and price > '38.89' then
MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'"
}
Response Code: 201 Created

POST Request in XML Format


Generate a POST request. For example, the following POST request creates a template rule in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/rules
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rule>
<name>stock_rule</name>
<description/>
<type>rules</type>
<valid>true</valid>
<drqlStatement>when 1 stock with symbol = 'XYZ' and price &gt; '38.89' then
MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'</drqlStatement>
<drqlStatementFormatted>when 1 stock with symbol = 'XYZ' and price &gt; '38.89' then
MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'</drqlStatementFormatted>
<multithreaded>false</multithreaded>
<responses>
<href>api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb</href>
<id>c792b088-5f99-4b4b-9b28-b02d2c618edb</id>
<objectType>responses</objectType>
<title>MyFileOutputResponse</title>
</responses>
<ruleType>template</ruleType>
<template>

Rules 347
<href>api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44</href>
<id>3d385b72-232a-4caa-861c-c59072a98b44</id>
<rel>template</rel>
<title>templ_stock_rule</title>
</template>
<templateParams>
<entry>
<key>price</key>
<value>38.89</value>
</entry>
<entry>
<key>symbol</key>
<value>XYZ</value>
</entry>
</templateParams>
<topics>
<href>api/projects/1/topics/c03e56e5-3718-4989-b23b-fe6f342ea655</href>
<id>c03e56e5-3718-4989-b23b-fe6f342ea655</id>
<objectType>topics</objectType>
<title>stock</title>
</topics>
</rule>

POST Response in XML Format


Returns the template rule object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rule>
<acl>
<href>api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961/acl</href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<href>api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</actions>
<actions>
<href>api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</actions>
<actions>
<href>api/projects/1/deploy</href>
<rel>deploy</rel>
<title>Deploy</title>
<type>POST</type>
</actions>
<actions>
<rel>createAdvancedRule</rel>
<title>Create Advanced Rule</title>
<type>POST</type>
</actions>
<actions>
<href>api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961</href>
<rel>createTemplate</rel>
<title>Create Template</title>
<type>POST</type>
</actions>
<id>42ef4d92-caed-4e05-abe8-16515f9f2961</id>
<name>stock_rule</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>

348 Chapter 6: Sample XML and JSON Requests and Responses


<self>
<href>api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961</href>
<id>42ef4d92-caed-4e05-abe8-16515f9f2961</id>
<rel>self</rel>
<title>stock_rule</title>
</self>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<description/>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>rules</type>
<valid>true</valid>
<drqlStatement>when 1 stock with symbol = 'XYZ' and price &gt; '38.89' then
MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'</drqlStatement>
<drqlStatementFormatted>when 1 stock with symbol = 'XYZ' and price &gt; '38.89' then
MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'</drqlStatementFormatted>
<multithreaded>false</multithreaded>
<responses>
<href>api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb</href>
<id>c792b088-5f99-4b4b-9b28-b02d2c618edb</id>
<objectType>responses</objectType>
<title>MyFileOutputResponse</title>
</responses>
<ruleType>template</ruleType>
<template>
<href>api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44</href>
<id>3d385b72-232a-4caa-861c-c59072a98b44</id>
<rel>template</rel>
<title>templ_stock_rule</title>
</template>
<templateParams>
<entry>
<key>price</key>
<value>38.89</value>
</entry>
<entry>
<key>symbol</key>
<value>XYZ</value>
</entry>
</templateParams>
<topics>
<href>api/projects/1/topics/c03e56e5-3718-4989-b23b-fe6f342ea655</href>
<id>c03e56e5-3718-4989-b23b-fe6f342ea655</id>
<objectType>topics</objectType>
<title>stock</title>
</topics>
</rule>
Response Code: 201 Created

Update Template Rule


Use the PUT method to update a template rule in RulePoint.

PUT Request in JSON Format


Generate a PUT request. For example, the following PUT request updates a template in a RulePoint
application:
PUT http://localhost:8080/rulepoint/api/projects/1/rules/42ef4d92-caed-4e05-
abe8-16515f9f2961
Accept: application/json

Rules 349
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format


{
"name": "stock_template_rule",
"ruleType": "template",
"template": {
"rel": "template",
"href": "api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44",
"title": "templ_stock_rule",
"id": "3d385b72-232a-4caa-861c-c59072a98b44"
},
"templateParams": {
"price": "38.89",
"symbol": "XYZ"
}
}

PUT Response in JSON Format


Returns the template rule object and source code 200 OK. Returns the error object if an error occurs.
{
"id": "42ef4d92-caed-4e05-abe8-16515f9f2961",
"name": "stock_template_rule",
"self": {
"rel": "self",
"href": "api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961",
"title": "stock_template_rule",
"id": "42ef4d92-caed-4e05-abe8-16515f9f2961"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createAdvancedRule",
"type": "POST",
"title": "Create Advanced Rule"
},
{
"rel": "createTemplate",
"href": "api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961",
"type": "POST",
"title": "Create Template"
}
],
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},

350 Chapter 6: Sample XML and JSON Requests and Responses


"type": "rules",
"valid": true,
"lastModifiedDate": "2013-09-26T16:00:06+05:30",
"createDate": "2013-09-26T15:43:47+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"drqlStatement": "when 1 stock with symbol = 'XYZ' and price > '38.89' then
MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'",
"drqlStatementEditable": null,
"topics": [
{
"href": "api/projects/1/topics/c03e56e5-3718-4989-b23b-fe6f342ea655",
"title": "stock",
"objectType": "topics",
"id": "c03e56e5-3718-4989-b23b-fe6f342ea655"
}
],
"responses": [
{
"href": "api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb",
"title": "MyFileOutputResponse",
"objectType": "responses",
"id": "c792b088-5f99-4b4b-9b28-b02d2c618edb"
}
],
"multithreaded": false,
"template": {
"rel": "template",
"href": "api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44",
"title": "templ_stock_rule",
"id": "3d385b72-232a-4caa-861c-c59072a98b44"
},
"ruleType": "template",
"templateParams": {
"price": "38.89",
"symbol": "XYZ"
},
"drqlStatementFormatted": "when 1 stock with symbol = 'XYZ' and price > '38.89' then
MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'"
}
Response Code: 200 OK

PUT Request in XML Format


Generate a PUT request. For example, the following PUT request updates a template in a RulePoint
application:
PUT http://localhost:8080/rulepoint/api/projects/1/rules/42ef4d92-caed-4e05-
abe8-16515f9f2961
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in XML Format


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rule>
<name>stock_template_rule</name>
<description/>
<type>rules</type>
<valid>true</valid>
<drqlStatement>when 1 stock with symbol = 'XYZ' and price &gt; '38.89' then
MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'</drqlStatement>
<drqlStatementFormatted>when 1 stock with symbol = 'XYZ' and price &gt; '38.89' then

Rules 351
MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'</drqlStatementFormatted>
<multithreaded>false</multithreaded>
<responses>
<href>api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb</href>
<id>c792b088-5f99-4b4b-9b28-b02d2c618edb</id>
<objectType>responses</objectType>
<title>MyFileOutputResponse</title>
</responses>
<ruleType>template</ruleType>
<template>
<href>api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44</href>
<id>3d385b72-232a-4caa-861c-c59072a98b44</id>
<rel>template</rel>
<title>templ_stock_rule</title>
</template>
<templateParams>
<entry>
<key>price</key>
<value>38.89</value>
</entry>
<entry>
<key>symbol</key>
<value>XYZ</value>
</entry>
</templateParams>
<topics>
<href>api/projects/1/topics/c03e56e5-3718-4989-b23b-fe6f342ea655</href>
<id>c03e56e5-3718-4989-b23b-fe6f342ea655</id>
<objectType>topics</objectType>
<title>stock</title>
</topics>
</rule>

PUT Response in XML Format


Returns the schedule object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rule>
<actions>
<href>api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961</href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</actions>
<actions>
<href>api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961</href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</actions>
<actions>
<href>api/projects/1/deploy</href>
<rel>deploy</rel>
<title>Deploy</title>
<type>POST</type>
</actions>
<actions>
<rel>createAdvancedRule</rel>
<title>Create Advanced Rule</title>
<type>POST</type>
</actions>
<actions>
<href>api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961</href>
<rel>createTemplate</rel>
<title>Create Template</title>
<type>POST</type>
</actions>
<id>42ef4d92-caed-4e05-abe8-16515f9f2961</id>
<name>stock_template_rule</name>

352 Chapter 6: Sample XML and JSON Requests and Responses


<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/rules/42ef4d92-caed-4e05-abe8-16515f9f2961</href>
<id>42ef4d92-caed-4e05-abe8-16515f9f2961</id>
<rel>self</rel>
<title>stock_template_rule</title>
</self>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<description/>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>rules</type>
<valid>true</valid>
<drqlStatement>when 1 stock with symbol = 'XYZ' and price &gt; '38.89' then
MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'</drqlStatement>
<drqlStatementFormatted>when 1 stock with symbol = 'XYZ' and price &gt; '38.89' then
MyFileOutputResponse with contents='${stock.symbol} price is greater than $
{stock.price}'</drqlStatementFormatted>
<multithreaded>false</multithreaded>
<responses>
<href>api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb</href>
<id>c792b088-5f99-4b4b-9b28-b02d2c618edb</id>
<objectType>responses</objectType>
<title>MyFileOutputResponse</title>
</responses>
<ruleType>template</ruleType>
<template>
<href>api/projects/1/templates/3d385b72-232a-4caa-861c-c59072a98b44</href>
<id>3d385b72-232a-4caa-861c-c59072a98b44</id>
<rel>template</rel>
<title>templ_stock_rule</title>
</template>
<templateParams>
<entry>
<key>price</key>
<value>38.89</value>
</entry>
<entry>
<key>symbol</key>
<value>XYZ</value>
</entry>
</templateParams>
<topics>
<href>api/projects/1/topics/c03e56e5-3718-4989-b23b-fe6f342ea655</href>
<id>c03e56e5-3718-4989-b23b-fe6f342ea655</id>
<objectType>topics</objectType>
<title>stock</title>
</topics>
</rule>
Response Code: 200 OK

Rules 353
Delete Template Rule
Use the DELETE method to delete a template rule in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes a template rule in a RulePoint
application:
DELETE http://localhost:8080/rulepoint/api/projects/1/rules/42ef4d92-caed-4e05-
abe8-16515f9f2961
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes a template rule in a RulePoint
application:
DELETE http://localhost:8080/rulepoint/api/projects/1/rules/42ef4d92-caed-4e05-
abe8-16515f9f2961
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No content

Retrieve Rules
Use the GET method to retrieve a rule in RulePoint.

GET Request in JSON Format


Generate a GET request. For example, the following GET request retrieves rules in a RulePoint application:
GET http://localhost:8080/rulepoint/api/projects/1/rules
Accept: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

GET Response in JSON Format


Returns the rule object and response code. Returns the error object if an error occurs.
{
"total": 3,
"count": 3,
"items": [
{
"id": "f8573cc2-e263-47f8-8ae3-9de8b58c7b44",
"name": "sqlrtamrule",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/rules/f8573cc2-e263-47f8-8ae3-9de8b58c7b44",
"title": "sqlrtamrule",
"id": "f8573cc2-e263-47f8-8ae3-9de8b58c7b44"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/rules/f8573cc2-e263-47f8-8ae3-9de8b58c7b44",
"type": "PUT",
"title": "Edit"
},

354 Chapter 6: Sample XML and JSON Requests and Responses


{
"rel": "delete",
"href": "api/projects/1/rules/f8573cc2-e263-47f8-8ae3-9de8b58c7b44",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createTemplate",
"href": "api/projects/1/rules/f8573cc2-e263-47f8-8ae3-9de8b58c7b44",
"type": "POST",
"title": "Create Template"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/rules/f8573cc2-e263-47f8-8ae3-9de8b58c7b44/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "rules",
"lastModifiedDate": "2013-08-19T11:21:03+05:30",
"createDate": "2013-08-19T11:15:11+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"drqlStatement": "when sqltopic with wsanalytic() as wsa != '1' then
rtam_response with subject=\"${sqltopic.symbol} alert\", body=\"cxall returns ${wsa}\"",
"drqlStatementEditable": null,
"topics": [
{
"href": "api/projects/1/topics/13dcf0cf-4d29-434a-98ae-99dff34367ab",
"title": "sqltopic",
"objectType": "topics",
"id": "13dcf0cf-4d29-434a-98ae-99dff34367ab"
}
],
"responses": [
{
"href": "api/projects/1/responses/a2e64636-5206-46da-
abe9-4c9bb8b592bc",
"title": "rtam_response",
"objectType": "responses",
"id": "a2e64636-5206-46da-abe9-4c9bb8b592bc"
}
],
"analytics": [
{
"href": "api/projects/1/analytics/42d49371-55ee-45b4-
bfff-46f35de9e156",
"title": "wsanalytic",
"objectType": "analytics",
"id": "42d49371-55ee-45b4-bfff-46f35de9e156"
}
],
"multithreaded": true,
"ruleType": "advanced",
"drqlStatementFormatted": "when sqltopic with wsanalytic() as wsa != '1'

Rules 355
then rtam_response with subject="${sqltopic.symbol} alert", body="cxall returns $
{wsa}""
},
{
"id": "a5046814-e355-4103-b885-71e2ac82ec4c",
"name": "sqlrule",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/rules/a5046814-e355-4103-b885-71e2ac82ec4c",
"title": "sqlrule",
"id": "a5046814-e355-4103-b885-71e2ac82ec4c"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/rules/a5046814-e355-4103-b885-71e2ac82ec4c",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/rules/a5046814-e355-4103-b885-71e2ac82ec4c",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createTemplate",
"href": "api/projects/1/rules/a5046814-e355-4103-b885-71e2ac82ec4c",
"type": "POST",
"title": "Create Template"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/rules/a5046814-e355-4103-b885-71e2ac82ec4c/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "rules",
"lastModifiedDate": "2013-08-19T11:10:52+05:30",
"createDate": "2013-08-19T11:01:38+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"drqlStatement": "when 1 sqltopic then wsresponder_response",
"drqlStatementEditable": null,
"topics": [
{
"href": "api/projects/1/topics/13dcf0cf-4d29-434a-98ae-99dff34367ab",
"title": "sqltopic",
"objectType": "topics",
"id": "13dcf0cf-4d29-434a-98ae-99dff34367ab"
}
],
"responses": [
{

356 Chapter 6: Sample XML and JSON Requests and Responses


"href": "api/projects/1/responses/f1fbf054-6124-4111-a69e-
abe30586deb0",
"title": "wsresponder_response",
"objectType": "responses",
"id": "f1fbf054-6124-4111-a69e-abe30586deb0"
}
],
"multithreaded": true,
"ruleType": "advanced",
"drqlStatementFormatted": "when 1 sqltopic then wsresponder_response"
},
{
"id": "9e212e7e-96e9-43f6-9725-57b3e3da4e23",
"name": "filrule",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/rules/9e212e7e-96e9-43f6-9725-57b3e3da4e23",
"title": "filrule",
"id": "9e212e7e-96e9-43f6-9725-57b3e3da4e23"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/rules/9e212e7e-96e9-43f6-9725-57b3e3da4e23",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/rules/9e212e7e-96e9-43f6-9725-57b3e3da4e23",
"type": "DELETE",
"title": "Delete"
},
{
"rel": "deploy",
"href": "api/projects/1/deploy",
"type": "POST",
"title": "Deploy"
},
{
"rel": "createTemplate",
"href": "api/projects/1/rules/9e212e7e-96e9-43f6-9725-57b3e3da4e23",
"type": "POST",
"title": "Create Template"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/rules/9e212e7e-96e9-43f6-9725-57b3e3da4e23/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "rules",
"lastModifiedDate": "2013-08-19T11:10:52+05:30",
"createDate": "2013-07-30T10:11:58+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"drqlStatement": "when 6 sqltopic with systimeanalytic() as mysystime then
fileout_response with contents = \"Read 6 events at ${mysystime}\"",
"drqlStatementEditable": null,
"topics": [

Rules 357
{
"href": "api/projects/1/topics/13dcf0cf-4d29-434a-98ae-99dff34367ab",
"title": "sqltopic",
"objectType": "topics",
"id": "13dcf0cf-4d29-434a-98ae-99dff34367ab"
}
],
"responses": [
{
"href": "api/projects/1/responses/8322f00d-6191-4932-a447-
a090e03b5696",
"title": "fileout_response",
"objectType": "responses",
"id": "8322f00d-6191-4932-a447-a090e03b5696"
}
],
"analytics": [
{
"href": "api/projects/1/analytics/d6a16480-2cd6-45bd-99a2-
dd347def6175",
"title": "systimeanalytic",
"objectType": "analytics",
"id": "d6a16480-2cd6-45bd-99a2-dd347def6175"
}
],
"multithreaded": true,
"ruleType": "advanced",
"drqlStatementFormatted": "when 6 sqltopic with systimeanalytic() as
mysystime then fileout_response with contents = "Read 6 events at ${mysystime}""
}
]
}
Response Code: 200 OK

GET Request in XML Format


Generate a GET request. For example, the following GET request retrieves rules in a RulePoint application:
GET http://localhost:8080/rulepoint/api/projects/1/rules
Accept: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

GET Response in XML Format


Returns the rule object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<artifacts>
<links/>
<valid>false</valid>
<count>1</count>
<items>
<rule>
<acl>
<href>api/projects/1/rules/f8573cc2-e263-47f8-8ae3-9de8b58c7b44/acl</
href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/rules/f8573cc2-e263-47f8-8ae3-9de8b58c7b44</
href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/rules/f8573cc2-e263-47f8-8ae3-9de8b58c7b44</
href>

358 Chapter 6: Sample XML and JSON Requests and Responses


<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
<action>
<href>api/projects/1/deploy</href>
<rel>deploy</rel>
<title>Deploy</title>
<type>POST</type>
</action>
<action>
<href>api/projects/1/rules/f8573cc2-e263-47f8-8ae3-9de8b58c7b44</
href>
<rel>createTemplate</rel>
<title>Create Template</title>
<type>POST</type>
</action>
</actions>
<id>f8573cc2-e263-47f8-8ae3-9de8b58c7b44</id>
<links/>
<name>sqlrtamrule</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/rules/f8573cc2-e263-47f8-8ae3-9de8b58c7b44</href>
<id>f8573cc2-e263-47f8-8ae3-9de8b58c7b44</id>
<rel>self</rel>
<title>sqlrtamrule</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>rules</type>
<analytics>
<analytic>
<href>api/projects/1/analytics/42d49371-55ee-45b4-bfff-46f35de9e156</
href>
<id>42d49371-55ee-45b4-bfff-46f35de9e156</id>
<objectType>analytics</objectType>
<title>wsanalytic</title>
</analytic>
</analytics>
<drqlStatement>when sqltopic with wsanalytic() as wsa != '1' then
rtam_response with subject="${sqltopic.symbol} alert", body="cxall returns ${wsa}"</
drqlStatement>
<drqlStatementFormatted>when sqltopic with wsanalytic() as wsa != '1' then
rtam_response with subject="${sqltopic.symbol} alert", body="cxall returns ${wsa}"</
drqlStatementFormatted>
<multithreaded>true</multithreaded>
<responses>
<response>
<href>api/projects/1/responses/a2e64636-5206-46da-abe9-4c9bb8b592bc</
href>
<id>a2e64636-5206-46da-abe9-4c9bb8b592bc</id>
<objectType>responses</objectType>
<title>rtam_response</title>
</response>
</responses>
<ruleType>advanced</ruleType>
<topics>
<href>api/projects/1/topics/13dcf0cf-4d29-434a-98ae-99dff34367ab</href>

Rules 359
<id>13dcf0cf-4d29-434a-98ae-99dff34367ab</id>
<objectType>topics</objectType>
<title>sqltopic</title>
</topics>
</rule>
</items>
<total>1</total>
</artifacts>
Response Code : 200 OK

Analytics
You can use API calls to retrieve an analytic in RulePoint.

Retrieve Analytics
Use the GET method to retrieve an analytic in RulePoint.

GET Request in JSON Format


To retrieve an analytic in a RulePoint application, generate the following GET request:
GET http://localhost:8080/rulepoint/api/projects/1/analytics
Accept: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

GET Response in JSON Format


{
"total": 2,
"count": 2,
"items": [
{
"id": "42d49371-55ee-45b4-bfff-46f35de9e156",
"name": "wsanalytic",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/analytics/42d49371-55ee-45b4-bfff-46f35de9e156",
"title": "wsanalytic",
"id": "42d49371-55ee-45b4-bfff-46f35de9e156"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/analytics/42d49371-55ee-45b4-
bfff-46f35de9e156",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/analytics/42d49371-55ee-45b4-
bfff-46f35de9e156",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/analytics/42d49371-55ee-45b4-bfff-46f35de9e156/

360 Chapter 6: Sample XML and JSON Requests and Responses


acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "analytics",
"lastModifiedDate": "2013-08-19T11:21:03+05:30",
"createDate": "2013-08-19T11:12:30+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"connection": {
"rel": "connection",
"href": "api/projects/1/connections/03e9c236-1a01-40e2-9d4a-
f13c893abef7",
"title": "wsconn",
"id": "03e9c236-1a01-40e2-9d4a-f13c893abef7"
},
"analyticType": "webService",
"analyticTypeDisplayName": "Webservice Analytic",
"config": {
"operation": "hello",
"evaluationRequired": "true",
"parameterList": "hello.name=bhui",
"xpathExpr": "//return",
"serviceName": "HelloWorldServices",
"cacheDuration": "0"
},
"rules": [
{
"href": "api/projects/1/rules/f8573cc2-e263-47f8-8ae3-9de8b58c7b44",
"title": "sqlrtamrule",
"objectType": "rules",
"id": "f8573cc2-e263-47f8-8ae3-9de8b58c7b44"
}
],
"booleanAnalytic": false
},
{
"id": "d6a16480-2cd6-45bd-99a2-dd347def6175",
"name": "systimeanalytic",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/analytics/d6a16480-2cd6-45bd-99a2-dd347def6175",
"title": "systimeanalytic",
"id": "d6a16480-2cd6-45bd-99a2-dd347def6175"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/analytics/d6a16480-2cd6-45bd-99a2-
dd347def6175",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",
"href": "api/projects/1/analytics/d6a16480-2cd6-45bd-99a2-
dd347def6175",
"type": "DELETE",
"title": "Delete"
}
],

Analytics 361
"acl": {
"rel": "acl",
"href": "api/projects/1/analytics/d6a16480-2cd6-45bd-99a2-dd347def6175/
acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "analytics",
"lastModifiedDate": "2013-08-19T11:10:52+05:30",
"createDate": "2013-07-30T10:10:21+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"analyticType": "systimeanalytic",
"analyticTypeDisplayName": "System Time Analytic",
"config": {
"evaluationRequired": "false",
"cacheDuration": "0"
},
"rules": [
{
"href": "api/projects/1/rules/9e212e7e-96e9-43f6-9725-57b3e3da4e23",
"title": "filrule",
"objectType": "rules",
"id": "9e212e7e-96e9-43f6-9725-57b3e3da4e23"
}
],
"booleanAnalytic": true
}
]
}
Response Code: 200 OK

GET Request in XML Format


GET http://localhost:8080/rulepoint/api/projects/1/analytics
Accept: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

GET Response in XML Format


Returns the analytic object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<artifacts>
<links/>
<valid>false</valid>
<count>2</count>
<items>
<analytic>
<acl>
<href>api/projects/1/analytics/42d49371-55ee-45b4-bfff-46f35de9e156/acl</
href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/analytics/42d49371-55ee-45b4-bfff-46f35de9e156</
href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>

362 Chapter 6: Sample XML and JSON Requests and Responses


</action>
<action>
<href>api/projects/1/analytics/42d49371-55ee-45b4-bfff-46f35de9e156</
href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>42d49371-55ee-45b4-bfff-46f35de9e156</id>
<links/>
<name>wsanalytic</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/analytics/42d49371-55ee-45b4-bfff-46f35de9e156</
href>
<id>42d49371-55ee-45b4-bfff-46f35de9e156</id>
<rel>self</rel>
<title>wsanalytic</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>analytics</type>
<analyticType>webService</analyticType>
<analyticTypeDisplayName>Webservice Analytic</analyticTypeDisplayName>
<booleanAnalytic>false</booleanAnalytic>
<config>
<entry>
<key>operation</key>
<value>hello</value>
</entry>
<entry>
<key>evaluationRequired</key>
<value>true</value>
</entry>
<entry>
<key>parameterList</key>
<value>hello.name=bhui</value>
</entry>
<entry>
<key>xpathExpr</key>
<value>//return</value>
</entry>
<entry>
<key>serviceName</key>
<value>HelloWorldServices</value>
</entry>
<entry>
<key>cacheDuration</key>
<value>0</value>
</entry>
</config>
<connection>
<href>api/projects/1/connections/03e9c236-1a01-40e2-9d4a-f13c893abef7</
href>
<id>03e9c236-1a01-40e2-9d4a-f13c893abef7</id>
<rel>connection</rel>
<title>wsconn</title>
</connection>

Analytics 363
<rules>
<rule>
<href>api/projects/1/rules/f8573cc2-e263-47f8-8ae3-9de8b58c7b44</
href>
<id>f8573cc2-e263-47f8-8ae3-9de8b58c7b44</id>
<objectType>rules</objectType>
<title>sqlrtamrule</title>
</rule>
</rules>
</analytic>
<analytic>
<acl>
<href>api/projects/1/analytics/d6a16480-2cd6-45bd-99a2-dd347def6175/acl</
href>
<rel>acl</rel>
<title>acl</title>
</acl>
<actions>
<action>
<href>api/projects/1/analytics/d6a16480-2cd6-45bd-99a2-dd347def6175</
href>
<rel>update</rel>
<title>Edit</title>
<type>PUT</type>
</action>
<action>
<href>api/projects/1/analytics/d6a16480-2cd6-45bd-99a2-dd347def6175</
href>
<rel>delete</rel>
<title>Delete</title>
<type>DELETE</type>
</action>
</actions>
<id>d6a16480-2cd6-45bd-99a2-dd347def6175</id>
<links/>
<name>systimeanalytic</name>
<owningProject>
<href>api/projects/1</href>
<id>1</id>
<rel>owningProject</rel>
<title>Default Project</title>
</owningProject>
<self>
<href>api/projects/1/analytics/d6a16480-2cd6-45bd-99a2-dd347def6175</
href>
<id>d6a16480-2cd6-45bd-99a2-dd347def6175</id>
<rel>self</rel>
<title>systimeanalytic</title>
</self>
<valid>true</valid>
<createDate/>
<createdBy>Administrator</createdBy>
<deployState>DRAFT</deployState>
<deployable>true</deployable>
<force>false</force>
<lastModifiedDate/>
<predefined>false</predefined>
<type>analytics</type>
<analyticType>systimeanalytic</analyticType>
<analyticTypeDisplayName>System Time Analytic</analyticTypeDisplayName>
<booleanAnalytic>true</booleanAnalytic>
<config>
<entry>
<key>evaluationRequired</key>
<value>false</value>
</entry>
<entry>
<key>cacheDuration</key>
<value>0</value>
</entry>

364 Chapter 6: Sample XML and JSON Requests and Responses


</config>
<rules>
<rule>
<href>api/projects/1/rules/9e212e7e-96e9-43f6-9725-57b3e3da4e23</
href>
<id>9e212e7e-96e9-43f6-9725-57b3e3da4e23</id>
<objectType>rules</objectType>
<title>filrule</title>
</rule>
</rules>
</analytic>
</items>
<total>2</total>
</artifacts>
Response Code : 200 OK

Users
Use the examples to create, retrieve, update, or delete a user.

Create Users
Use the POST method to create a user in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request creates a user in a RulePoint application:
POST http://localhost:8080/rulepoint/api/users
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format


{
"userName": "newuser12",
"password": "newuser1234",
"firstName": "new",
"lastName": "user1111",
"roles": [
{
"rel": "roles",
"href": "/api/roles/ROLE_ADMIN",
"title": "Predefined Admin Role",
"id": "ROLE_ADMIN"
},
{
"rel": "roles",
"href": "/api/roles/ROLE_USER",
"title": "Predefined User Role",
"id": "ROLE_USER"
}
],
"remoteUser": false
}

Users 365
POST Response in JSON Format
Returns the user object and response code. Returns the error object if an error occurs.
{
"id": "98305",
"self": {
"rel": "self",
"href": "/api/users/newuser12",
"title": "newuser12",
"id": "newuser12"
},
"actions": [
{
"rel": "update",
"href": "/api/users/",
"type": "PUT"
},
{
"rel": "delete",
"href": "/api/users/newuser12",
"type": "DELETE"
}
],
"lastModifiedDate": "2013-09-18T18:34:38+05:30",
"createDate": "2013-09-18T18:34:38+05:30",
"modifiedBy": "Administrator",
"createdBy": "Administrator",
"userName": "newuser12",
"password": "*****",
"firstName": "new",
"lastName": "user1111",
"roles": [
{
"rel": "roles",
"href": "/api/roles/ROLE_ADMIN",
"title": "Predefined Admin Role",
"id": "ROLE_ADMIN"
},
{
"rel": "roles",
"href": "/api/roles/ROLE_USER",
"title": "Predefined User Role",
"id": "ROLE_USER"
}
],
"enabled": true,
"predefined": false,
"remoteUser": false
}

POST Request in XML Format


POST http://localhost:8080/rulepoint/api/users
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


Generate a POST request. For example, the following POST request creates a user in a RulePoint application:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<user>
<valid>false</valid>
<enabled>true</enabled>
<firstName>new</firstName>
<lastName>user</lastName>
<password>newuser1234</password>
<predefined>false</predefined>
<remoteUser>false</remoteUser>

366 Chapter 6: Sample XML and JSON Requests and Responses


<roles>
<href>/api/roles/ROLE_ADMIN</href>
<id>ROLE_ADMIN</id>
<rel>roles</rel>
<title>Predefined Admin Role</title>
</roles>
<roles>
<href>/api/roles/ROLE_USER</href>
<id>ROLE_USER</id>
<rel>roles</rel>
<title>Predefined User Role</title>
</roles>
<userName>newuser123</userName>
</user>

POST Response in XML Format


Returns the user object and response code 200 OK. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<user>
<actions>
<action>
<href>/api/users/</href>
<rel>update</rel>
<type>PUT</type>
</action>
<action>
<href>/api/users/newuser123</href>
<rel>delete</rel>
<type>DELETE</type>
</action>
</actions>
<id>32774</id>
<self>
<href>/api/users/newuser123</href>
<id>newuser123</id>
<rel>self</rel>
<title>newuser123</title>
</self>
<createDate/>
<createdBy>Administrator</createdBy>
<enabled>true</enabled>
<firstName>new</firstName>
<lastModifiedDate/>
<lastName>user</lastName>
<modifiedBy>Administrator</modifiedBy>
<password>*****</password>
<predefined>false</predefined>
<remoteUser>false</remoteUser>
<roles>
<href>/api/roles/ROLE_ADMIN</href>
<id>ROLE_ADMIN</id>
<rel>roles</rel>
<title>Predefined Admin Role</title>
</roles>
<roles>
<href>/api/roles/ROLE_USER</href>
<id>ROLE_USER</id>
<rel>roles</rel>
<title>Predefined User Role</title>
</roles>
<userName>newuser123</userName>
</user>

Users 367
Retrieve Users
Use the GET method to retrieve a user in RulePoint.

GET Request in JSON Format


Generate a GET request. For example, the following GET request retrieves a user in a RulePoint application:
GET http://localhost:8080/rulepoint/api/users
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

GET Response in JSON Format


Returns the user object and response code 200 OK. Returns the error object if an error occurs.
{
"total": 2,
"count": 2,
"items": [
{
"id": "32768",
"self": {
"rel": "self",
"href": "/api/users/testuser",
"title": "testuser",
"id": "testuser"
},
"actions": [
{
"rel": "update",
"href": "/api/users/",
"type": "PUT"
},
{
"rel": "delete",
"href": "/api/users/testuser",
"type": "DELETE"
}
],
"lastModifiedDate": "2013-09-18T11:17:25+05:30",
"createDate": "2013-09-18T11:17:25+05:30",
"createdBy": "Administrator",
"userName": "testuser",
"password": "*****",
"firstName": "test",
"middleInitial": "\n \n ",
"lastName": "user",
"emailAddress": "\n \n ",
"jabberAddress": "\n \n ",
"roles": [
{
"rel": "roles",
"href": "/api/roles/test",
"id": "test"
}
],
"enabled": true,
"predefined": false,
"remoteUser": false
},
{
"id": "1",
"self": {
"rel": "self",
"href": "/api/users/Administrator",
"title": "Administrator",
"id": "Administrator"
},

368 Chapter 6: Sample XML and JSON Requests and Responses


"actions": [
{
"rel": "update",
"href": "/api/users/",
"type": "PUT"
}
],
"lastModifiedDate": "2013-09-17T13:17:10+05:30",
"createDate": "2013-09-17T13:17:10+05:30",
"createdBy": "Informatica Corp.",
"userName": "Administrator",
"password": "*****",
"firstName": "System",
"lastName": "Administrator",
"roles": [
{
"rel": "roles",
"href": "/api/roles/ROLE_ADMIN",
"title": "Predefined Admin Role",
"id": "ROLE_ADMIN"
},
{
"rel": "roles",
"href": "/api/roles/ROLE_USER",
"title": "Predefined User Role",
"id": "ROLE_USER"
}
],
"enabled": true,
"predefined": true,
"remoteUser": false
}
]
}
Response Code : 200 OK

Update Users
Use the GET method to update a user in RulePoint.

GET Request in JSON Format


Generate a GET request. For example, the following GET request updates a user in a RulePoint application:
GET http://localhost:8080/rulepoint/api/users
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>

GET Body in JSON Format


{
"userName": "newuser1",
"password": "newuser1234",
"firstName": "new",
"lastName": "user1111",
"roles": [
{
"rel": "roles",
"href": "/api/roles/ROLE_ADMIN",
"title": "Predefined Admin Role",
"id": "ROLE_ADMIN"
},
{
"rel": "roles",
"href": "/api/roles/ROLE_USER",
"title": "Predefined User Role",

Users 369
"id": "ROLE_USER"
}
],
"remoteUser": false
}

GET Response in JSON Format


Returns the user object and response code. Returns the error object if an error occurs.
{
"id": "98304",
"self": {
"rel": "self",
"href": "/api/users/newuser1",
"title": "newuser1",
"id": "newuser1"
},
"actions": [
{
"rel": "update",
"href": "/api/users/",
"type": "PUT"
},
{
"rel": "delete",
"href": "/api/users/newuser1",
"type": "DELETE"
}
],
"lastModifiedDate": "2013-09-18T18:24:21+05:30",
"createDate": "2013-09-18T18:24:21+05:30",
"modifiedBy": "Administrator",
"createdBy": "Administrator",
"userName": "newuser1",
"password": "*****",
"firstName": "new",
"lastName": "user1111",
"roles": [
{
"rel": "roles",
"href": "/api/roles/ROLE_ADMIN",
"title": "Predefined Admin Role",
"id": "ROLE_ADMIN"
},
{
"rel": "roles",
"href": "/api/roles/ROLE_USER",
"title": "Predefined User Role",
"id": "ROLE_USER"
}
],
"enabled": true,
"predefined": false,
"remoteUser": false
}
Response Code : 204 OK

GET Request in XML Format


Generate a GET request. For example, the following GET request updates a user in a RulePoint application:
GET http://localhost:8080/rulepoint/api/users
Accept: application/xml
Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

370 Chapter 6: Sample XML and JSON Requests and Responses


GET Body in XML Format
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<user>
<enabled>true</enabled>
<firstName>new</firstName>
<lastName>user1111</lastName>
<password>userzzz123</password>
<predefined>false</predefined>
<remoteUser>false</remoteUser>
<roles>
<href>/api/roles/ROLE_ADMIN</href>
<id>ROLE_ADMIN</id>
<rel>roles</rel>
<title>Predefined Admin Role</title>
</roles>
<roles>
<href>/api/roles/ROLE_USER</href>
<id>ROLE_USER</id>
<rel>roles</rel>
<title>Predefined User Role</title>
</roles>
<userName>newuser1</userName>
</user>

GET Response in XML Format


Returns the project object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<results>
<count>1</count>
<items>
<user>
<actions>
<action>
<href>/api/users/</href>
<rel>update</rel>
<type>PUT</type>
</action>
</actions>
<id>1</id>
<self>
<href>/api/users/Administrator</href>
<id>Administrator</id>
<rel>self</rel>
<title>Administrator</title>
</self>
<createDate/>
<createdBy>Informatica Corp.</createdBy>
<enabled>true</enabled>
<firstName>System</firstName>
<lastModifiedDate/>
<lastName>Administrator</lastName>
<password>*****</password>
<predefined>true</predefined>
<remoteUser>false</remoteUser>
<roles>
<href>/api/roles/ROLE_ADMIN</href>
<id>ROLE_ADMIN</id>
<rel>roles</rel>
<title>Predefined Admin Role</title>
</roles>
<roles>
<href>/api/roles/ROLE_USER</href>
<id>ROLE_USER</id>
<rel>roles</rel>
<title>Predefined User Role</title>
</roles>
<userName>Administrator</userName>
</user>

Users 371
<user>
<actions>
<action>
<href>/api/users/</href>
<rel>update</rel>
<type>PUT</type>
</action>
<action>
<href>/api/users/AT_User1</href>
<rel>delete</rel>
<type>DELETE</type>
</action>
</actions>
<id>32773</id>
<self>
<href>/api/users/AT_User1</href>
<id>AT_User1</id>
<rel>self</rel>
<title>AT_User1</title>
</self>
<createDate/>
<createdBy>Administrator</createdBy>
<enabled>true</enabled>
<firstName>Atuser</firstName>
<lastModifiedDate/>
<lastName>Atuserlastname</lastName>
<modifiedBy>Administrator</modifiedBy>
<password>*****</password>
<predefined>false</predefined>
<remoteUser>false</remoteUser>
<roles>
<href>/api/roles/AT_Role2</href>
<id>AT_Role2</id>
<rel>roles</rel>
<title>Role creation for AT</title>
</roles>
<userName>AT_User1</userName>
</user>
</items>
<total>1</total>
</results>
Response Code : 200 OK

Delete Users
Use the DELETE method to delete a user in RulePoint.

DELETE Request in JSON Format


Generate a DELETE request. For example, the following DELETE request deletes a user in a RulePoint
application:
DELETE http://localhost:8080/rulepoint/api/users
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code: 204 No Content

DELETE Request in XML Format


Generate a DELETE request. For example, the following DELETE request deletes a user in a RulePoint
application:
DELETE http://localhost:8080/rulepoint/api/users
Accept: application/xml

372 Chapter 6: Sample XML and JSON Requests and Responses


Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>
Response Code : 204 No Content

Objects Deployment
Use the examples to deploy, undeploy, redeploy, and reassign RulePoint objects.

Deploy Object
Use the POST method to deploy an object in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request deploys an object in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/deploy
Content-Type: application/json
Accept: application/json
Cookie: JSESSIONID=<VALID_SESSION_ID>

POST Body in JSON Format


{
"topologyId": 1,
"itemsToDeploy": [
{
"artifactId": "d4dbfd17-4053-446c-83b8-dda9dc3f48c6",
"groupNames": [
"Default Source Controller"
]
}
]
}

POST Response in JSON Format


Returns the object and response code. Returns the error object if an error occurs.
{
"successful": true,
"txnId": -1333205577,
"dpId": "dff975ab-cf27-45ca-89bc-c3326db69941"
}
Response Code : 200 OK

POST Request in XML Format


Generate a POST request. For example, the following POST request deploys an object in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/deploy
Content-Type: application/xml
Accept: application/xml
Cookie: JSESSIONID=<VALID_SESSION_ID>

POST Body in XML Format


<deploymentRequest>
<itemsToDeploy>

Objects Deployment 373


<item>
<artifactId>1fbafd49-d01e-44aa-9bdf-cc95fe2b4383</artifactId>
<groupNames>
<groupName>Default Source Controller</groupName>
</groupNames>
</item>
</itemsToDeploy>
<topologyId>1</topologyId>
</deploymentRequest>

POST Body in XML Format


Returns the object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<deploymentResult>
<dpId>e2f97336-e371-4dfe-aa35-a9eb3b9a0bce</dpId>
<successful>true</successful>
<txnId>-33133660</txnId>
</deploymentResult>
Response Code: 200 OK

Undeploy Object
Use the POST method to undeploy an object in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request undeploys an object in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/undeploy
Content-Type: application/json
Accept: application/json
Cookie: JSESSIONID=<VALID_SESSION_ID>

POST Body in JSON Format


[
"d4dbfd17-4053-446c-83b8-dda9dc3f48c6"
]

POST Response in JSON Format


Returns the object and response code 200 OK. Returns the error object if an error occurs.
{
"successful": true,
"txnId": 1353518029,
"dpId": "ddd81f2d-9cf1-404e-9185-c34425726799"
}
Response Code: 200 OK

POST Request in XML Format


Generate a POST request. For example, the following POST request undeploys an object in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/undeploy
Content-Type: application/xml
Accept: application/xml
Cookie: JSESSIONID=<VALID_SESSION_ID>

374 Chapter 6: Sample XML and JSON Requests and Responses


POST Body in XML Format
<stringList>
<list>1fbafd49-d01e-44aa-9bdf-cc95fe2b4383</list>
</stringList>

POST Body in XML Format


Returns the object and response code 200 OK. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<deploymentResult>
<dpId>09294cb1-97c8-413f-855d-f5531950b36c</dpId>
<successful>true</successful>
<txnId>-603283379</txnId>
</deploymentResult>
Response Code: 200 OK

Redeploy Object
Use the POST method to redeploy an object in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request redeploys an object in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/redeploy
Content-Type: application/json
Accept: application/json
Cookie: JSESSIONID=<VALID_SESSION_ID>

POST Body in JSON Format


[
"d4dbfd17-4053-446c-83b8-dda9dc3f48c6"
]

POST Response in JSON Format


Returns the object and response code. Returns the error object if an error occurs.
{
"successful": true,
"txnId": 1353518029,
"dpId": "ddd81f2d-9cf1-404e-9185-c34425726799"
}
Response Code : 200 OK

POST Request in XML Format


Generate a POST request. For example, the following POST request redeploys an object in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/redeploy
Content-Type: application/xml
Accept: application/xml
Cookie: JSESSIONID=<VALID_SESSION_ID>

POST Body in XML Format


<stringList>
<list>1fbafd49-d01e-44aa-9bdf-cc95fe2b4383</list>
</stringList>

Objects Deployment 375


POST Body in XML Format
Returns the object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<deploymentResult>
<dpId>56a26fac-eabc-4a63-9184-139cdf7e55ec</dpId>
<successful>true</successful>
<txnId>-2040743049</txnId>
</deploymentResult>
Response Code: 200 OK

Reassign Object
Use the POST method to reassign an object in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request reassigns an object in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/reassign
Content-Type: application/json
Accept: application/json
Cookie: JSESSIONID=<VALID_SESSION_ID>

POST Body in JSON Format


{
"topologyId": 1,
"itemsToDeploy": [
{
"artifactId": "d4dbfd17-4053-446c-83b8-dda9dc3f48c6",
"groupNames": [
"Source Controller2"
]
}
]
}

POST Response in JSON Format


Returns the object and response code. Returns the error object if an error occurs.
{
"successful": true,
"txnId": -1333205577,
"dpId": "dff975ab-cf27-45ca-89bc-c3326db69941"
}
Response Code : 200 OK

POST Request in XML Format


Generate a POST request. For example, the following POST request reassigns an object in a RulePoint
application:
POST http://localhost:8080/rulepoint/api/projects/1/reassign
Content-Type: application/xml
Accept: application/xml
Cookie: JSESSIONID=<VALID_SESSION_ID>

POST Body in XML Format


<deploymentRequest>
<itemsToDeploy>
<item>
<artifactId>1fbafd49-d01e-44aa-9bdf-cc95fe2b4383</artifactId>

376 Chapter 6: Sample XML and JSON Requests and Responses


<groupNames>
<groupName>SC2</groupName>
</groupNames>
</item>
</itemsToDeploy>
<topologyId>1</topologyId>

</deploymentRequest>

POST Body in XML Format


Returns the object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<deploymentResult>
<dpId>71b66b44-6b56-43c3-8df5-aadc4886e0c3</dpId>
<successful>true</successful>
<txnId>-441803971</txnId>
</deploymentResult>
Response Code: 200 OK

Create Event
Use the POST method to publish an event on a deployed topic in RulePoint.

POST Request in JSON Format


Generate a POST request. For example, the following POST request publishes an event in a RulePoint
application:
http://localhost:8080/rulepoint/ui/dashboard/lc/74f182af-54ea-4ddd-9c94-49b44d46267f/
createEvent/1/1
Accept: application/json
Content-Type: application/json
Cookie: JSESSIONID=<VALID SESSION ID>
The createEvent REST call uses a deployed topic ID as part of the request URL.

POST Body in JSON Format


The following example shows the request body, which uses an event map:
{
"eventMap": {
"feed_title": "XYZ quarterly results announced",
"feed_text": "XYZ price goes up by 2%",
"lastPubDate": "2013-10-31 12:35:24 Z"
}
}

POST Response in JSON Format


Returns the response code 200 OK. Returns the error object if an error occurs.

Response Code: 200 OK

POST Request in XML Format


Generate a POST request. For example, the following POST request publishes an event on a deployed topic:
POST http://localhost:8080/rulepoint/ui/dashboard/lc/
74f182af-54ea-4ddd-9c94-49b44d46267f/createEvent/1/1
Accept: application/xml

Create Event 377


Content-Type: application/xml
Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format


The following example shows the request body, which uses an event map:
<createEventDTO>
<eventMap>
<entry>
<key>feed_title</key>
<value>XYZ quarterly results announced</value>
</entry>
<entry>
<key>feed_text</key>
<value>XYZ price goes up by 2%</value>
</entry>
<entry>
<key>lastPubDate</key>
<value>2013-10-31 12:35:24 Z</value>
</entry>
</eventMap>
</createEventDTO>

POST Response in XML Format


Returns the response code 200 OK. Returns the error object if an error occurs.

Response Code: 200 OK

Log In
POST Request in JSON Format
To log in to RulePoint using JSON, you might use the following request header and response on wire:
POST http://invrw28cep14:8080/rulepoint/dtlogin
Content-Type: application/x-www-form-urlencoded
Accept: */*
j_password=Administrator1&j_username=Administrator

POST Response in JSON Format


The login returns the following information:
{
"id": "894b2948-ce82-4e0a-9302-267d3482ae25",
"name": "jmsconnection",
"valid": true,
"self": {
"rel": "self",
"href": "api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25",
"title": "jmsconnection",
"id": "894b2948-ce82-4e0a-9302-267d3482ae25"
},
"actions": [
{
"rel": "update",
"href": "api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25",
"type": "PUT",
"title": "Edit"
},
{
"rel": "delete",

378 Chapter 6: Sample XML and JSON Requests and Responses


"href": "api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25",
"type": "DELETE",
"title": "Delete"
}
],
"acl": {
"rel": "acl",
"href": "api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25/acl",
"title": "acl"
},
"owningProject": {
"rel": "owningProject",
"href": "api/projects/1",
"title": "Default Project",
"id": "1"
},
"type": "connections",
"lastModifiedDate": "2013-08-23T15:17:58+05:30",
"createDate": "2013-08-23T15:17:58+05:30",
"createdBy": "Administrator",
"predefined": false,
"deployable": true,
"deployState": "DRAFT",
"force": false,
"connectionType": "jmsConnection",
"connectionTypeDisplayName": "JMS Connection",
"config": {
"packagePrefixes": "",
"jmsConnectionFactory": "ConnectionFactory",
"location": "tcp://invr28cep46:61616",
"contextFactory": "org.apache.activemq.jndi.ActiveMQInitialContextFactory",
"userName": "",
"password": null
}
}
You can then use the sessionId to make any subsequent REST calls.

Response Code: 200 OK

Log In 379
Chapter 7

RulePoint Pluggable
Authentication Module
This chapter includes the following topics:

• RulePoint Pluggable Authentication Module Overview, 380


• RulePoint Security, 380
• Defining an Authentication Contract, 382

RulePoint Pluggable Authentication Module Overview


Pluggable Authentication Module (PAM) provides RulePoint system administrators or application developers
the flexibility and control to set up an application authentication module without the need to rebuild
RulePoint.

You can use PAM to perform the following tasks:

• Provide flexibility and control to build a custom RulePoint authentication.


• Implement multiple applications with an authentication and authorization module without the need to
rebuild RulePoint.

RulePoint Security
Authentication in spring security is based on Authentication Manager, which is the main interface that
provides authentication services in Spring Security. Use spring security to implement RulePoint security.

You can plug in one or more Authentication Provider implementations in Authentication Manager. The
Authentication Provider implementation is mainly responsible to validate a user and build a complete identity
for a validated user. The components of the Authentication Provider framework manage sessions, login, and
logout.

Spring provides support to extend and plug Authentication Provider. You can override or customize the
Authentication Provider for RulePoint, so that you can integrate RulePoint with different authentication
providers, such as CAS, openID, and SiteMinder.

RulePoint runs in hybrid mode and includes configurations for both the local DB provider and the LDAP
provider. You can create, enable, or disable LDAP in RulePoint and it will not require you to restart RulePoint.

380
The flexible, extensible design of spring security makes it possible to customize the supported security
providers. The spring security project provides a library of classes for Authentication Provider
implementations, supporting classes for filter implementations, and configuration examples.

The following files located at the <RULEPOINT_HOME>/design/webapps/rulepoint/WEB-INF/spring directory


contain the security configurations for authentication and authorization:

• security_authentication.xml
• security_authorization.xml

The files are in standard spring applicationContext xml format and additionally contain the elements from
the specific spring security namespace. The files are included in the contextConfigLocation context-param
in the web.xml file and loaded as other components of spring.

All REST endpoints are secured by spring security. When you perform an action through the user interface or
through the REST APIs, the underlying ReST layer authenticates each request with the employed
authentication mechanism.

Account Management
Use the default Database Provider to perform account management.

If you want to use a different provider, you can create proxy users in the system. For example, you can create
remote users for LDAP. The proxy users are read-only and provide a convenient placeholder to associate
roles. If you update the proxy users, the user details in RulePoint will not be updated.

Authorization Management
RulePoint includes twenty system-defined privileges, which form the basis of authorization.

You can create roles in RulePoint that can contain one or more privileges. You can then assign the roles to
users, irrespective of the type of authentication provider that is responsible for the user authentication. After
a user successfully logs in to RulePoint, spring creates a security context for the user. The security context
contains an authentication object that corresponds to the user, and includes a list of privileges assigned to
the user through the associated role.

You can map LDAP groups to a role created within RulePoint. All users who belong to the LDAP group will
have this role. Privileges determine the actions you can perform for a RulePoint object. For example, a user
can have create or view privileges. Permissions determine user access to actions for a particular instance of
an object.

RulePoint has an ACL system that is implemented by the spring ACL system, where you can include both
users and roles in the object ACLs. You can perform all the required authorization-related actions in
RulePoint. The authorization module is ApplicationProvider agnostic and does not require extension or
customization.

Authentication Management
Authentication management is implemented using spring security.

To implement a different authentication module, see the development guides maintained by spring security.
For more information, see the Spring Security documentation.

RulePoint Security 381


Session Management
You can manage an HTTPs session in RulePoint to track whether a user is logged into the system.

However, there is no external notification to an LDAP or any external system that keeps track when the user
is logged into the system.

Password Management
Only database users can change passwords and enforce password complexity, but are not allowed to expire
or retrieve forgotten passwords.

If LDAP is configured, LDAP validates the username and password. The LDAP server locks the user account,
if necessary.

Defining an Authentication Contract


You can use any authentication provider of spring security to enable authentication in RulePoint.

Oracle Access Manager, SiteMinder, and J2EE container are some examples for pre-authenticated
authentication providers for spring security. The general procedure for enabling developing and enabling
authentication using these providers is the same.

Develop and Enable Oracle Access Manager Authentication Plugin


on RulePoint
To enable authentication for a user who is authenticated outside RulePoint use Oracle Access Manager.

1. Create the OAMAuthenticationFilter.java and PAUserDetailsServiceImpl.java java classes.


2. Package the two java classes in a jar and place the jar in the following location:
<RULEPOINT_HOME>/design/webapps/rulepoint/WEB-INF/lib
3. Edit the existing security_authentication.xml to specify the authentication provider class and
method.
4. Save the security_authentication.xml file as security_authentication_OAM.xml in the following
location:
$RULEPOINT_HOME/design/webapps/rulepoint/WEB-INF/spring
5. Replace security_authentication.xml with security_authentication_OAM.xml in the web.xml file at
<RULEPOINT_HOME>/design/webapps/rulepoint/WEB-INF/.
6. Restart the design-time instance in RulePoint.

OAMAuthenticationFilter.java
The following code shows you how to create the OAMAuthenticationFilter.java class:
package com.informatica.cep.design.custom.application.security.web;

import java.util.Arrays;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

382 Chapter 7: RulePoint Pluggable Authentication Module


import javax.servlet.http.HttpSession;

import org.springframework.security.core.Authentication;
import
org.springframework.security.web.authentication.preauth.PreAuthenticatedCredentialsNotFou
ndException;
import
org.springframework.security.web.authentication.preauth.RequestHeaderAuthenticationFilter
;
import org.springframework.util.Assert;

import com.informatica.cep.design.application.security.entities.DTUser;

/**
* supports multiple request headers and onAuthenticationSuccessHandler to put the
currentLoggedInUser in Session
* @author suyadav
*
*/
public class OAMAuthenticationFilter extends RequestHeaderAuthenticationFilter {

//principal name can be in any one of these headers


private List<String> principalRequestHeaders =
Arrays.asList("REMOTE_USER","HTTP_LOGIN","HTTPS_LOGIN","LOGIN");
private boolean exceptionIfHeaderMissing = true;

@Override
protected Object getPreAuthenticatedPrincipal(HttpServletRequest request) {
String principal = null;

for(String currHdr:principalRequestHeaders){
principal = request.getHeader(currHdr);

if(principal == null){
logger.warn("Failed to find request header "+currHdr);
}else{
logger.debug((new StringBuilder()).append("Found user id:
").append(principal).toString());
break;
}
}
if (principal == null && exceptionIfHeaderMissing) {
throw new
PreAuthenticatedCredentialsNotFoundException(principalRequestHeaders
+ " header not found in request.");
}

return principal;
}
//this method override will be unnecessary if we in CurrentSessionInfoController we
pick details from SecurityContextHolder

@Override
protected void successfulAuthentication(HttpServletRequest request,
HttpServletResponse response, Authentication authResult) {
super.successfulAuthentication(request, response, authResult);
DTUser currUser = (DTUser)authResult.getPrincipal();
HttpSession currSess = request.getSession(false);
currSess.setAttribute("loggedInUser", currUser);
}
public List<String> getPrincipalRequestHeaders() {
return principalRequestHeaders;
}

public void setPrincipalRequestHeaders(List<String> principalRequestHeaders) {


Assert.notEmpty(principalRequestHeaders, "principalRequestHeaders must not be
empty or null");
this.principalRequestHeaders = principalRequestHeaders;
}

@Override

Defining an Authentication Contract 383


public void setExceptionIfHeaderMissing(boolean exceptionIfHeaderMissing) {
super.setExceptionIfHeaderMissing(exceptionIfHeaderMissing);
this.exceptionIfHeaderMissing = exceptionIfHeaderMissing;
}
}

PAUserDetailsServiceImpl
The following code shows you how to create the PAUserDetailsServiceImpl.java class:
package com.informatica.cep.design.custom.application.security.web;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

import com.informatica.cep.design.application.security.repo.DTUserRepo;

public class PAUserDetailsServiceImpl implements UserDetailsService {

private Logger logger = Logger.getLogger(PAUserDetailsServiceImpl.class);

@Autowired
private DTUserRepo userRepo;

@Override
public UserDetails loadUserByUsername(String username) throws
UsernameNotFoundException {
UserDetails ud =
userRepo.findLocalUserByUserNameForAuthentication(normalize(username));
if(ud == null)
throw new BadCredentialsException("Username :"+username+" not found in
Rulepoint");
return ud;
}

//this can be used in the main code as well that way we will not require this
special class just for this
private String normalize(String arg)
{
logger.debug((new StringBuilder()).append("normalize in
").append(arg).toString());
if(arg.indexOf('=') != -1)
arg = arg.substring(arg.indexOf('=') + 1);
logger.debug((new StringBuilder()).append("normalize out
").append(arg).toString());
return arg;
}

security_authentication_OAM.xml
The following code shows you an example of the security_authentication_OAM.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Application context containing authentication, channel
- security and web URI beans.
-
- Only used by "filter" artifact.
-
-->

384 Chapter 7: RulePoint Pluggable Authentication Module


<b:beans xmlns="http://www.springframework.org/schema/security"
xmlns:b="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://
www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/security http://
www.springframework.org/schema/security/spring-security-3.1.xsd">

<http security="none" pattern="/**/*.html" />


<http security="none" pattern="/css/**" />
<http security="none" pattern="/images/**" />
<http security="none" pattern="/js/**" />
<http security="none" pattern="/help/en/**" />
<http security="none" pattern="/userguide/en/**" />

<http realm="DT Realm" entry-point-ref="restEntryPoint" access-decision-manager-


ref="dtAccessDecisionMgr" disable-url-rewriting="false" create-session="always">
<intercept-url pattern="/" access="IS_AUTHENTICATED_ANONYMOUSLY"/>
<intercept-url pattern="/index.html" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<intercept-url pattern="/**" access="IS_AUTHENTICATED_FULLY" />

<custom-filter position="PRE_AUTH_FILTER" ref="oamFilter" />


<!-- <form-login authentication-success-handler-
ref="restSessionInfoOnAuthenticationHandler" authentication-failure-handler-
ref="restLoginExceptionHandler" login-processing-url="/dtlogin" /> -->
<!-- <http-basic/> -->
<logout logout-url="/dtlogout" success-handler-ref="dtLogoutHandler" />
<!-- <remember-me /> -->
</http>

<b:bean id="restSessionInfoOnAuthenticationHandler"
class="com.informatica.cep.design.application.security.web.SessionInfoOnAuhtenicationSucc
essHandler"/>
<b:bean id="dtPwdEnc"
class="org.springframework.security.crypto.password.StandardPasswordEncoder" />

<authentication-manager alias="dtAuthProvider">
<authentication-provider ref="preauthAuthProvider"/>
</authentication-manager>

<!-- for pre-auth - start -->


<b:bean id="oamFilter"

class="com.informatica.cep.design.custom.application.security.web.OAMAuthenticationFilter
">
<b:property name="authenticationManager" ref="dtAuthProvider" />
</b:bean>

<b:bean id="preauthAuthProvider"

class="org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthentica
tionProvider">
<b:property name="preAuthenticatedUserDetailsService">
<b:bean id="userDetailsServiceWrapper"

class="org.springframework.security.core.userdetails.UserDetailsByNameServiceWrapper">
<b:property name="userDetailsService" >
<b:bean
class="com.informatica.cep.design.custom.application.security.web.PAUserDetailsServiceImp
l"/>
</b:property>
</b:bean>
</b:property>
</b:bean>

<!-- for pre-auth - end -->

Defining an Authentication Contract 385


<b:bean id="restEntryPoint"
class="org.springframework.security.web.authentication.Http403ForbiddenEntryPoint"/>

<b:bean id="restLoginExceptionHandler"
class="com.informatica.cep.design.application.security.web.Http401ExceptionHandler"/>

<b:bean id="dtAccessDecisionMgr"
class="org.springframework.security.access.vote.AffirmativeBased">
<b:constructor-arg>
<b:list>
<b:bean class="org.springframework.security.access.vote.AuthenticatedVoter"/>
<b:bean class="org.springframework.security.access.vote.RoleVoter">
<b:property name="rolePrefix" value="PRIV_"/>
</b:bean>
</b:list>
</b:constructor-arg>
</b:bean>

<b:bean id="dtLogoutHandler"
class="com.informatica.cep.design.application.security.web.NonRedirectingLogoutSucessHand
ler"/>

<!-- Automatically receives AuthenticationEvent messages -->


<b:bean id="loggerListener"
class="org.springframework.security.authentication.event.LoggerListener"/>

</b:beans>

386 Chapter 7: RulePoint Pluggable Authentication Module


Appendix A

HTTP Request and Response


Attributes
This appendix includes the following topics:

• Request and Response Attributes Overview, 387


• Common Request and Response Attributes, 387
• Topic Attributes, 389
• Source Attributes, 389
• Connection Attributes, 392
• Analytic Attributes, 394
• Responder Attributes, 395
• Response Attributes, 397
• Deployment Attributes, 398

Request and Response Attributes Overview


This appendix provides the HTTP request and response attributes of the REST calls for RulePoint objects,
users, and deployment options.

The appendix provides a brief description of the common attributes across all the REST calls and also lists
the attributes specific for each resource type.

Common Request and Response Attributes


The following table describes the common HTTP request and response attributes of the REST calls:

Attributes Description

id Unique identifier of the object.

name The name of the object

387
Attributes Description

valid The current status of the object.

self URI reference of the object.

actions Array of all the actions, for example, deploy, update, or delete, that you can perform on the
object and the related URIs.

acl A list of permissions attached to an object or project. The acl associated to an object
consists of the user ID, the read, write, execute, or deny permissions, and the grant or deny
access rights to that particular object or project.

description Description of the object

owningProject The link to the project that contains the object.

type The object type.

lastModifiedDate The timestamp when the object was last modified.

createDate The timestamp when the object was created.

createdBy The user who created the object.

deployState Specifies whether the object can be deployed.

The current state of the object, for example, deployed, needs_deployment, or draft state.

force Force saves an invalid rule or template. If you set the value to true, if the rule or template
compilation fails, that rule or template is force saved as an invalid rule or template.

marshaller An object such as a source or responder that holds the marshaller class name and properties.

marshallerClassname The fully qualified classname of the marshaller.

marshallerProperties A comma-separated list of key-value pairs that are passed to the marshaller.

connection A link to the connection that is referred by the source or responder.

Note: A link is a group of attributes that point to an object.

388 Appendix A: HTTP Request and Response Attributes


Topic Attributes
The following table describes the HTTP request and response attributes of the REST calls for a topic:

Attributes Description

expiresIn The event expiry time in milliseconds

responderAccess The properties of events (either Named or All properties) in the topic that the responder must
access to.

properties The property set of an event that a source publishes to a topic.

rules The link to the array of rules that refer to the object.

responders Array of responders referring to this topic.

templates Link to array of templates that have a reference to this topic.

Source Attributes
The tables list the HTTP request and response attributes to call a REST API for different types of RulePoint
sources.

SQL Source
The following table describes the HTTP request and response attributes of the REST calls for an SQL source:

Attributes Description

fetchSize Number of rows to fetch.

sql The SQL query to run against the target database.

updateSql The UPDATE statement for each record extracted from the query and published to RulePoint.

bufferResult Determines whether to maintain a buffer of the result sets to publish to the topic. Used only
when defining a SQL source service.

markerId The name to assign to the marker. This is the batch name that the sever associates with all
published events.

parameters The parameters to use in the SQL query.

propertyMetadataMap The unique name-value pairs of static metadata or additional information about this service
that becomes part of the event properties.

transactionSize The frequency to update the parameters with data from the most recently processed records.

Topic Attributes 389


JMS Source
The following table describes the HTTP request and response attributes of the REST calls for a JMS source:

Attributes Description

clientAcknowledgeMode Specifies the acknowledgement mode for non-transacted sessions, such as Auto
Acknowledge, Client Acknowledge, or Acknowledge.

clientId Client identifier to identify the souce.

destination Name of the Queue or Topic on the JMS Provider.

messageSelector Criteria for filtering message header or message properties, to limit which JMS messages
RulePoint receives.

subscriptionName Durable subscription name.

RSS Reader Source


The following table describes the HTTP request and response attributes of the REST calls for an RSS Reader
Source:

Attributes Description

username The user name to access the specified URL if the URL requires authentication.

mostRecentEventDate Only feeds with pubDate after this will be read.

markerId The name to assign to the marker.

propertyMetadataMap The unique name-value pairs of static metadata or additional information about this service
that becomes part of the event properties.

url The URL for the RSS news feed.

password The password associated with the user name required to access the specified URL.

URL Monitoring Source


The following table describes the HTTP request and response attributes of the REST calls for a URL
monitoring source:

Attributes Description

markerId The name to assign to the marker.

propertyMetadataMap The unique name-value pairs of static metadata or additional information about this service
that becomes part of the event properties.

url The URL of the web page to connect.

390 Appendix A: HTTP Request and Response Attributes


Web Page Monitoring Source
The following table describes the HTTP request and response attributes of the REST calls for a web page
monitoring source:

Attributes Description

markerId The name to assign to the marker.

propertyMetadataMap The unique name-value pairs of static metadata or additional information about this service
that becomes part of the event properties.

url The URL of the web page to connect.

Web Service Source


The following table describes the HTTP request and response attributes of the REST calls for a web service
source:

Attributes Description

serviceName Service to list the operations to run.

operation The WSDL operation that you want to run.

inputParameters List of parameters for your WSDL operation.

xpathExpr If the operation returns a result, the type of output that the Web Service expects. The output
types include an XML document or the result of the application of an XPath expression that
you provide.

markerId The name to assign to the marker. This is the batch name that the sever associates with all
published events.

propertyMetadataMap The unique name-value pairs of static metadata or additional information about this service
that becomes part of the event properties.

Source Attributes 391


Connection Attributes
The tables list the HTTP request and response attributes to call REST APIs for the supported RulePoint
connections.

SQL Connection
The following table describes the HTTP request and response attributes of the REST calls for an SQL
connection:

Attributes Description

type Connections.

connectionType The type of connection.

acquireRetryAttempts A limit for the number of times that RulePoint attempts to acquire a connection from the
database before giving up. If the value is less than or equal to zero, RulePoint makes an
indefinite number of attempts to fetch a connection.

acquireRetryDelay The delay between two retry attempts.

driverClass The JDBC driver class for establishing connection to the database.

jdbcString The JDBC connection URL.

username The database user name to log in to the target database.

password Password to log in to the target database.

maxPoolSize The maximum number of connections that are maintained in the connection pool.

minPoolSize Minimum number of connections to hold in the connection pool.

initialPoolSize The initial size of the connection pool.

checkoutTimeout The timeout duration in milliseconds for acquiring connection to the database.

acquireIncrement The number of connections to acquire incrementally.

retryCount The number of connection retry attempts that RulePoint should make.

retryDelay The amount of time, in milliseconds, to wait between connection attempts.

loginTimeOut Log in timeout, in seconds.

392 Appendix A: HTTP Request and Response Attributes


Email Connection
The following table describes the HTTP request and response attributes of the REST calls for an email
connection:

Attributes Description

port The port number to connect to the SMTP server.

username If required by the SMTP server, the SMTP server user name.

retryCount The number of connection retry attempts that RulePoint should make.

retryDelay The amount of time, in milliseconds, to wait between connection attempts.

server The fully qualified domain name of the SMTP server that is used to send outbound email from RulePoint.

password If required by the SMTP server, the password associated with the SMTP server username.

JMS Connection
The following table describes the HTTP request and response attributes of the REST calls for a JMS
connection:

Attributes Description

connectionType JMS connection.

location The location of the naming service and port on which to connect.

contextFactory The JMS provider specific initial JNDI context factory implementation for connecting to the
JNDI service. This value is a fully qualified class name of the factory class that creates the
initial context.

jmsConnectionFactory The name of the object in the JNDI server that enables the JMS Client to create JMS
connections.

packagePrefixes A colon-delimited list of package prefixes to use when loading URL context factories. These
are the package prefixes for the name of the factory class that will create a URL context
factory.

userName The authentication user name.

password The password for the authentication user name.

Web Service Connection


The following table describes the HTTP request and response attributes of the REST calls for a web service
connection:

Attributes Description

userNameSpace User name space.

retryCount The number of connection retry attempts that RulePoint should make.

Connection Attributes 393


Attributes Description

retryDelay The amount of time, in milliseconds, to wait between connection attempts.

password The password associated with the Web Service user name.

wsdlDuration The amount of time in seconds that the WSDL is retained in a cache.

url The URL of the WSDL file that contains the operations that you want to execute.

loginName The Web Service user name for Web Service authentication.

Analytic Attributes
The following table describes the HTTP request and response attributes of the REST calls for an SQL
analytic:

Attributes Description

operation The Web Services operation to run.

evaluationRequired Specifies whether the result of the analytic is part of conditional evaluation within a rule.

parameterList List of parameters for the selected Web Services operation.

xpathExpr If you specify an XPath expression in the analytic, you get either a single value or a list of many
text values in return. If you do not specify any XPath expression, you get the entire XML
document in return.

serviceName The name of the Web Services analytic. This must be a unique name.

cacheDuration The amount of time, in seconds, to retain the WSDL results in a cache for the provided
parameters.

394 Appendix A: HTTP Request and Response Attributes


Responder Attributes
The tables list the HTTP request and response attributes to call REST APIs for the supported RulePoint
responders.

RTAM Responder
The following table describes the HTTP request and response attributes of the REST calls for an RTAM
responder:

Attributes Description

to The user name of the user who would receive the alert.

body The body of the alert.

subject The subject of the alert.

priority The priority to place on the RTAM alert.

channels A semicolon-delimited list of channels to deliver the alert to.

header The header information for the alert, which the user can view in RTAM.

actions A semicolon-delimited list of comma-delimited name-link pairs for actions to show in the RTAM interface
for this alert.

groups A group address to receive the Response message as defined by your RTAM administrator.

metadata Additional information or metadata.

Email Responder
The following table describes the HTTP request and response attributes of the REST calls for an email
responder:

Attributes Description

to A comma-delimited list of email addresses to which RulePoint sends the response.

body The body of the email response.

replyTo A comma-delimited list of email addresses to send replies to the email response.

subject The subject of the email response.

sentDate The date that you want to appear as the email send date.

bcc A comma-delimited list of email addresses to send the responses to as a blind copy.

from The email address from which the email response must originate.

Responder Attributes 395


Attributes Description

contentType The content type of the email response.

cc A comma-delimited list of email addresses to send the responses to as a copy.

JMS Responder
The following table describes the HTTP request and response attributes of the REST calls for a JMS
responder:

Attributes Description

body The body of the JMS response message.

retryCount The number of retries.

priority Priority of the message.

retryDelay Delay between two consecutive retries.

deliveryMode Persistent or Non-Persistent modes of delivering the message. Valid values would be 1 for non-
persistent mode, 2 for persistent mode.

params The parameters to use in the SQL query.

timeToLive The message expiry time.

destination The JMS destination to which the message has to be sent. Prefix a topic name with "topic/".

Web Service Responder


The following table describes the HTTP request and response attributes of the REST calls for a web service
responder:

Attributes Description

operation Operations defined within the WSDL file.

inputParameters A comma-delimited list of name-value pairs provided to the Web Service.

serviceName Name of the responder. The responder name must be unique.

396 Appendix A: HTTP Request and Response Attributes


Response Attributes
The tables list the HTTP request and response attributes to call REST APIs for the supported RulePoint
responses.

SQL Response
The following table describes the attributes in the HTTP request and response content in an SQL response:

Attributes Description

sql The SQL query to run.

params Parameters to be passed to the query.

Email Response
The following table describes the attributes in the HTTP request and response content in an email response:

Attributes Description

to A comma-delimited list of email addresses to send the response.

body The body of the email response.

replyTo A comma-delimited list of email addresses to send email response replies.

subject The subject of the email response.

sentDate The date that you want to appear as the email send date.

bcc A comma-delimited list of email addresses to send a blind copy of the response.

from The email address from which the email response originates.

contentType The content type of the email response.

cc A comma-delimited list of email addresses to send a copy of the response.

JMS Response
The following table describes the attributes in the HTTP request and response content in a JMS response:

Attributes Description

body Message body.

retryCount The number of retries to be made

priority Priority of the message.

retryDelay Delay between two consecutive retries.

Response Attributes 397


Attributes Description

deliveryMode Persistent or Non-Persistent modes of delivering the message. Valid values would be 1 for non-
persistent mode, 2 for persistent mode.

params Message parameters.

timeToLive The message expiry time.

destination The JMS destination to which the message has to be sent. Prefix a topic name with "topic/"

Web Service Response


The following table describes the attributes in the HTTP request and response content in a web service
response:

Attributes Description

operation Operations defined within the WSDL file.

inputParameters A comma-delimited list of name-value pairs provided to the Web Service. The operation and
parameters that you list must be defined in the WSDL.

serviceName Name of the responder. The responder name must be unique.

Deployment Attributes
The following table describes the attributes in the HTTP request and response content for deploy and
reassign objects:

Attributes Description

topologyId The ID of the topology in use.

itemsToDeploy An array of objects that you want to deploy along with the corresponding deployment groups.

artifactId Unique identifier of the object that you want to deploy.

groupNames An array of deployment groups to which you want to deploy the object.

successful Whether the action, deploy, undeploy, or redeploy is successful.

txnId The transaction ID of the particular action.

dpId The deployment ID for a set of objects.

Note: For undeploy and redeploy RulePoint objects, you send an array of the object IDs.

398 Appendix A: HTTP Request and Response Attributes


Index

A DELETE method (continued)


deleting RTAM response 318
analytic service deleting SQL responder 214
creating 24 deleting SQL response 275
annotation deleting SQL source 125
service 14, 15 deleting template 345
service property 15, 16 deleting template rule 354
deleting topic 63
deleting URL monitoring source 152

C deleting user 372


deleting web page monitoring source 160
connection service deleting web service method 105
creating 21 deleting web service responder 240
create deleting web service response 302
analytic service 24 deleting web service source 171
connection service 21
custom service 12
listener source service 20
marshaller service 26
E
responder service 26 error codes
schedulable source service 19 REST API 46
custom service
API overview 18
building jar file 13
creating 12, 13
G
jar file structure 13 GET method
prerequisites 13 retrieving analytic 360
custom service classes retrieving project 50
annotations 14 retrieving responder 202
marking 14 retrieving rules 354
service annotation 14 retrieving SQL connection 68
service property annotation 14 retrieving SQL response 267
retrieving SQL source 111
retrieving topic 57

D retrieving user 368


updating user 369
date and time values
REST API 40
DELETE method
delete SQL connection 84
H
deleting dynamic schedule 194, 198 HTTP request and response
deleting email connection 91 analytic attributes 394
deleting email responder 223 attributes 387
deleting event generator source 181 common attributes 387
deleting event transformer responder 248 connection attributes 392
deleting event transformer response 309 deployment attributes 398
deleting file input source 189 overview 387
deleting file output responder 255 responder attributes 395
deleting file output response 325 response attributes 397
deleting JMS connection 98 source attributes 389
deleting JMS responder 233 topic attributes 389
deleting JMS response 295
deleting JMS source 134
deleting projects 54
deleting RSS Reader source 143
deleting RTAM responder 264

399
J O
Java Adapter for REST API object ID
.zip file components 29 REST API 41
creating a RulePoint Application 30
editing the configuration file 30
Overview 28
prerequisite 28
P
running a sample file 30 POST method
sample code 30 creating an event 377
setting the classpath 30 creating dynamic schedule 195
JSON and XML request and response creating email connection 85
analytics 360 creating email responder 215
connections 64 creating email response 276
dynamic schedule 195 creating event generator source 171
email connection 85 creating event transformer responder 241
email responder 215 creating event transformer response 303
email response 276 creating file input source 182
event generator source 171 creating file output responder 249
event transformer responder 241 creating file output response 318
event transformer response 303 creating JMS connection 92
file input\ source 182 creating JMS responder 224
file output responder 249 creating JMS response 288
file output response 318 creating JMS source 125
JMS connection 92 creating marshaller 325
JMS responder 224 creating projects 48
JMS response 288 creating RSS Reader source 135
JMS source 125 creating RTAM responder 256
marshaller 325 creating RTAM response 310
objects deployment 373 creating SQL connection 64
projects 48 creating SQL responder 199
responders 199 creating SQL response 264
responses 264 creating SQL source 106
RSS Reader source 135 creating static schedule 191
RTAM responder 256 creating template 334
RTAM response 310 creating template rule 345
rules 345 creating topic 54
schedule 190 creating URL monitoring source 144
sources 106 creating user 365
SQL connection 64 creating web page monitoring source 152
SQL responder 199 creating web service connection 99
SQL response 264 creating web service responder 233
SQL source 106 creating web service response 296
static schedule 190 creating web service source 161
template 334 deploying objects 373
topics 54 logging into RulePoint 378
URL monitoring source 144 reassigning objects 376
users 365 redeploying objects 375
web page monitoring source 152 undeploying objects 374
web service connection 99 PUT method
web service responder 233 update topic 61
web service response 296 updating dynamic schedule 196
web service source 161 updating email connection 88
updating email responder 219
updating email response 280, 284

L updating event generator source 176


updating event transformer responder 244
listener source service updating event transformer response 306
creating 20 updating file input source 186
updating file output responder 252
updating file output response 321

M updating JMS connection 95


updating JMS responder 228
marshaller service updating JMS response 292
creating 26 updating JMS source 130
updating marshaller 329
updating project 52
updating RSS Reader source 139

400 Index
PUT method (continued) response 378
updating RTAM responder 260 REST API
updating RTAM response 314 calls 35
updating SQL connection 80 object ID 41
updating SQL responder 211 overview 35
updating SQL response 272 requests and responses 45
updating SQL source 120 URL 35
updating static schedule 192 REST APIs
updating template 339 date and time values 40
updating template rule 349 error codes 46
updating URL monitoring source 148 error objects 45
updating web page monitoring source 156 guidelines 46
updating web service connection 102 return lists in JSON 37
updating web service responder 237 return lists in XML 37
updating web service response 299 return list
updating web service source 166 REST API 37
RulePoint interface
overview 10

R RulePoint services 12

request body
REST API 36
request header
S
elements 36 schedulable source service
format 36 creating 19
request object SDK
JSON format 37 pluggable services 12
responder service source service 18
creating 26

Index 401

You might also like