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 Topics

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

0 COMMENTS

We’d like to hear from you!