Table of Contents

Search

  1. Preface
  2. RulePoint Interfaces
  3. RulePoint Services
  4. Custom Service API
  5. Java Adapter for REST API
  6. RulePoint REST API
  7. Sample XML and JSON Requests and Responses
  8. RulePoint Pluggable Authentication Module
  9. HTTP Request and Response Attributes

Developer Guide

Developer Guide

Update a 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 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" }, "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> <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/> <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
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>

0 COMMENTS

We’d like to hear from you!