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

Create File Output Response

Create File Output Response

Use the POST method to create a File Output response in RulePoint.

POST Request in JSON Format

Generate a POST request. For example, the following POST request creates a file output response in a RulePoint application.
POST http://localhost:8080/rulepoint/api/projects/1/responses Accept: application/json Content-Type: application/json Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in JSON Format

{ "name": "MyFileOutputResponder_Response", "valid": true, "force": false, "responder": { "rel": "self", "href": "api/projects/1/responders/be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe", "title": "MyFileOutputResponder", "id": "be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe" }, "config": { "contents": "RulePoint FileOUt response", "filename": "response.txt", "mode": "append" } }

POST Response in JSON Format

Returns the File Output response object and response code 201 OK. Returns the error object if an error occurs.
{ "id": "c792b088-5f99-4b4b-9b28-b02d2c618edb", "name": "MyFileOutputResponder_Response", "self": { "rel": "self", "href": "api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb", "title": "MyFileOutputResponder_Response", "id": "c792b088-5f99-4b4b-9b28-b02d2c618edb" }, "actions": [ { "rel": "update", "href": "api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb", "type": "PUT", "title": "Edit" }, { "rel": "delete", "href": "api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb", "type": "DELETE", "title": "Delete" } ], "acl": { "rel": "acl", "href": "api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb/acl", "title": "acl" }, "owningProject": { "rel": "owningProject", "href": "api/projects/1", "title": "Default Project", "id": "1" }, "type": "responses", "valid": true, "lastModifiedDate": "2013-09-26T15:14:58+05:30", "createDate": "2013-09-26T15:14:58+05:30", "createdBy": "Administrator", "predefined": false, "deployable": true, "deployState": "DRAFT", "force": false, "responseType": "fileOutput", "responseTypeDisplayName": "File Responder", "responder": { "rel": "responder", "href": "api/projects/1/responders/be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe", "title": "MyFileOutputResponder", "id": "be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe" }, "multithreaded": false, "config": { "contents": "RulePoint FileOUt response", "filename": "response.txt", "mode": "append" } }
Response Code: 201 Created

POST Request in XML Format

Generate a POST request. For example, the following POST request creates a file output response in a RulePoint application.
POST http://localhost:8080/rulepoint/api/projects/1/responses Accept: application/xml Content-Type: application/xml Cookie: JSESSIONID=<VALID SESSION ID>

POST Body in XML Format

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response> <name>MyFileOutputResponder_Response</name> <type>responses</type> <config> <entry> <key>contents</key> <value>RulePoint FileOUt response</value> </entry> <entry> <key>filename</key> <value>response.txt</value> </entry> <entry> <key>mode</key> <value>append</value> </entry> </config> <responder> <href>api/projects/1/responders/be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe</href> <id>be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe</id> <rel>responder</rel> <title>MyFileOutputResponder</title> </responder> <responseType>fileOutput</responseType> </response>

POST Response in XML Format

Returns the file output 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/c792b088-5f99-4b4b-9b28-b02d2c618edb/acl</href> <rel>acl</rel> <title>acl</title> </acl> <actions> <action> <href>api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb</href> <rel>update</rel> <title>Edit</title> <type>PUT</type> </action> <action> <href>api/projects/1/responses/c792b088-5f99-4b4b-9b28-b02d2c618edb</href> <rel>delete</rel> <title>Delete</title> <type>DELETE</type> </action> </actions> <id>c792b088-5f99-4b4b-9b28-b02d2c618edb</id> <name>MyFileOutputResponder_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/c792b088-5f99-4b4b-9b28-b02d2c618edb</href> <id>c792b088-5f99-4b4b-9b28-b02d2c618edb</id> <rel>self</rel> <title>MyFileOutputResponder_Response</title> </self> <createDate/> <createdBy>Administrator</createdBy> <deployState>DRAFT</deployState> <deployable>true</deployable> <force>false</force> <lastModifiedDate/> <predefined>false</predefined> <type>responses</type> <valid>true</valid> <config> <entry> <key>contents</key> <value>RulePoint FileOUt response</value> </entry> <entry> <key>filename</key> <value>response.txt</value> </entry> <entry> <key>mode</key> <value>append</value> </entry> </config> <multithreaded>false</multithreaded> <responder> <href>api/projects/1/responders/be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe</href> <id>be6d395e-e8c2-4bb5-8d3f-1aa359dc5bbe</id> <rel>responder</rel> <title>MyFileOutputResponder</title> </responder> <responseType>fileOutput</responseType> <responseTypeDisplayName>File Responder</responseTypeDisplayName> <templates /> <rules /> </response>
Response Code : 201 Created

0 COMMENTS

We’d like to hear from you!