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 Web Page Monitoring Source

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 } }

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

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

0 COMMENTS

We’d like to hear from you!