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

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

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

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

0 COMMENTS

We’d like to hear from you!