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 Event Generator Source

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", "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", "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> <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> <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> <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

0 COMMENTS

We’d like to hear from you!