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

Update Email Connection

Use the PUT method to update an email connection in RulePoint.

PUT Request in JSON Format

Generate a PUT request. For example, the following PUT request updates an email connection in a RulePoint application:
PUT http://localhost:8080/rulepoint/api/projects/1/connections/bba20936-201a-4d3c-afad-33c76fb9366b Accept: application/json Content-Type: application/json Cookie: JSESSIONID=<VALID SESSION ID>

PUT Body in JSON Format

{ "name": "emailconnection", "connectionType": "emailConnection", "valid": true, "config": { "port": "25", "username": null, "retryCount": "3", "retryDelay": "1000", "server": "mail.mycompany.com", "password": null } }

PUT Response in JSON Format

Returns the email connection object and response code 200 OK. Returns the error object if an error occurs.
{ "id": "bba20936-201a-4d3c-afad-33c76fb9366b", "name": "emailconnection", "valid": true, "self": { "rel": "self", "href": "api/projects/1/connections/bba20936-201a-4d3c-afad-33c76fb9366b", "title": "emailconnection", "id": "bba20936-201a-4d3c-afad-33c76fb9366b" }, "actions": [ { "rel": "update", "href": "api/projects/1/connections/bba20936-201a-4d3c-afad-33c76fb9366b", "type": "PUT", "title": "Edit" }, { "rel": "delete", "href": "api/projects/1/connections/bba20936-201a-4d3c-afad-33c76fb9366b", "type": "DELETE", "title": "Delete" } ], "acl": { "rel": "acl", "href": "api/projects/1/connections/bba20936-201a-4d3c-afad-33c76fb9366b/acl", "title": "acl" }, "owningProject": { "rel": "owningProject", "href": "api/projects/1", "title": "Default Project", "id": "1" }, "type": "connections", "lastModifiedDate": "2013-09-11T17:44:42+05:30", "createDate": "2013-08-07T17:49:28+05:30", "createdBy": "Administrator", "predefined": false, "deployable": true, "deployState": "DRAFT", "force": false, "connectionType": "emailConnection", "connectionTypeDisplayName": "Email Connection", "config": { "port": "25", "username": "", "retryCount": "3", "retryDelay": "1000", "server": "mail.informatica.com", "password": null }, "responders": [ { "href": "api/projects/1/responders/51ba1457-5112-4e70-99f1-fe94af5ddea3", "title": "emailresponder", "objectType": "responders", "id": "51ba1457-5112-4e70-99f1-fe94af5ddea3" } ] }
Response Code : 200 OK

PUT Request in XML Format

Generate a PUT request. For example, the following PUT request updates an email connection in a RulePoint application:
PUT http://localhost:8080/rulepoint/api/projects/1/connections/894b2948-ce82-4e0a-9302-267d3482ae25 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"?> <connection> <name>MyEmailConnection</name> <description>An Email Connection</description> <type>connections</type> <config> <entry> <key>port</key> <value>25</value> </entry> <entry> <key>username</key> <value/> </entry> <entry> <key>retryCount</key> <value>3</value> </entry> <entry> <key>retryDelay</key> <value>5000</value> </entry> <entry> <key>server</key> <value>mail.informatica.com</value> </entry> </config> <connectionType>emailConnection</connectionType> </connection>

PUT Response in XML Format

Returns the email connection object and response code. Returns the error object if an error occurs.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <connection> <acl> <href>api/projects/1/connections/446f972d-d3ea-4d77-98f8-84816ed4abcb/acl</href> <rel>acl</rel> <title>acl</title> </acl> <actions> <action> <href>api/projects/1/connections/446f972d-d3ea-4d77-98f8-84816ed4abcb</href> <rel>update</rel> <title>Edit</title> <type>PUT</type> </action> <action> <href>api/projects/1/connections/446f972d-d3ea-4d77-98f8-84816ed4abcb</href> <title>Delete</title> <type>DELETE</type> </action> </actions> <id>446f972d-d3ea-4d77-98f8-84816ed4abcb</id> <links/> <name>MyEmailConnection</name> <owningProject> <href>api/projects/1</href> <id>1</id> <rel>owningProject</rel> <title>Default Project</title> </owningProject> <self> <href>api/projects/1/connections/446f972d-d3ea-4d77-98f8-84816ed4abcb</href> <id>446f972d-d3ea-4d77-98f8-84816ed4abcb</id> <rel>self</rel> <title>MyEmailConnection</title> </self> <valid>true</valid> <createDate/> <createdBy>Administrator</createdBy> <deployState>DRAFT</deployState> <deployable>true</deployable> <description>An Email Connection</description> <force>false</force> <lastModifiedDate/> <predefined>false</predefined> <type>connections</type> <config> <entry> <key>port</key> <value>25</value> </entry> <entry> <key>username</key> <value/> </entry> <entry> <key>retryCount</key> <value>3</value> </entry> <entry> <key>retryDelay</key> <value>5000</value> </entry> <entry> <key>server</key> <value>mail.informatica.com</value> </entry> </config> <connectionType>emailConnection</connectionType> <connectionTypeDisplayName>Email Connection</connectionTypeDisplayName> </connection>
Response Code : 200 OK

0 COMMENTS

We’d like to hear from you!