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

Example

Example

To retrieve the current active session of the user using the JSON format, you might use the following request header and response on wire:
GET http://localhost:8080/rulepoint/api/sessionInfo Accept: application/json Content-Type: application/json Cookie: JSESSIONID=<VALID SESSION ID>
The server returns the following information:
{ "sessionId": "5F0B092410A9CFFC8049F9EA816E40BD", "loggedInUserName": "Administrator", "loggedInUserDisplayName": "Administrator", "loggedInUserPrivileges": [ "PRIV_CREATE_CONNECTION", "PRIV_CREATE_SOURCE", "PRIV_VIEW_RESPONSE", "PRIV_VIEW_TEMPLATE", "PRIV_CREATE_TEMPLATE", "PRIV_SUPER_USER", "PRIV_VIEW_WATCHLIST", "PRIV_CREATE_PROJECT", "PRIV_VIEW_ANALYTIC", "PRIV_CREATE_RESPONDER", "PRIV_CREATE_RESPONSE", "PRIV_CREATE_WATCHLIST", "PRIV_VIEW_TOPIC", "PRIV_VIEW_SOURCE", "PRIV_CREATE_RULE", "PRIV_VIEW_CONNECTION", "PRIV_VIEW_RESPONDER", "PRIV_CREATE_ANALYTIC", "PRIV_CREATE_TOPIC", "PRIV_VIEW_RULE" ], "loggedInUser": { "rel": "loggedInUser", "href": "/api/users/Administrator", "type": "GET", "title": "Administrator" }, "self": { "rel": "self", "href": "/api/sessionInfo", "type": "GET" }, "sessionTimeout": 1800, "loggedInUserPreference": { "userName": "Administrator", "userPrefData": "{}", "actions": [ { "rel": "update", "href": "/api/users/Administrator/userPreference", "type": "PUT" } ] } }
To retrieve the current active session of the user using the XML format, you might use the following request header and response on wire:
GET http://localhost:8080/rulepoint/api/sessionInfo Accept: application/xml Content-Type: application/xml Cookie: JSESSIONID=<VALID SESSION ID>
The server returns the following information:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <session-info> <loggedInUser> <href>/api/users/Administrator</href> <rel>loggedInUser</rel> <title>Administrator</title> <type>GET</type> </loggedInUser> <loggedInUserDisplayName>Administrator</loggedInUserDisplayName> <loggedInUserName>Administrator</loggedInUserName> <loggedInUserPreference> <actions> <href>/api/users/Administrator/userPreference</href> <rel>update</rel> <type>PUT</type> </actions> <userName>Administrator</userName> <userPrefData>{}</userPrefData> </loggedInUserPreference> <loggedInUserPrivileges>PRIV_VIEW_RESPONSE</loggedInUserPrivileges> <loggedInUserPrivileges>PRIV_VIEW_TEMPLATE</loggedInUserPrivileges> <loggedInUserPrivileges>PRIV_VIEW_ANALYTIC</loggedInUserPrivileges> <loggedInUserPrivileges>PRIV_SUPER_USER</loggedInUserPrivileges> <loggedInUserPrivileges>PRIV_CREATE_TOPIC</loggedInUserPrivileges> <loggedInUserPrivileges>PRIV_VIEW_RESPONDER</loggedInUserPrivileges> <loggedInUserPrivileges>PRIV_CREATE_ANALYTIC</loggedInUserPrivileges> <loggedInUserPrivileges>PRIV_CREATE_CONNECTION</loggedInUserPrivileges> <loggedInUserPrivileges>PRIV_VIEW_SOURCE</loggedInUserPrivileges> <loggedInUserPrivileges>PRIV_CREATE_WATCHLIST</loggedInUserPrivileges> <loggedInUserPrivileges>PRIV_CREATE_SOURCE</loggedInUserPrivileges> <loggedInUserPrivileges>PRIV_VIEW_WATCHLIST</loggedInUserPrivileges> <loggedInUserPrivileges>PRIV_VIEW_TOPIC</loggedInUserPrivileges> <loggedInUserPrivileges>PRIV_VIEW_RULE</loggedInUserPrivileges> <loggedInUserPrivileges>PRIV_CREATE_RESPONDER</loggedInUserPrivileges> <loggedInUserPrivileges>PRIV_CREATE_PROJECT</loggedInUserPrivileges> <loggedInUserPrivileges>PRIV_CREATE_TEMPLATE</loggedInUserPrivileges> <loggedInUserPrivileges>PRIV_CREATE_RESPONSE</loggedInUserPrivileges> <loggedInUserPrivileges>PRIV_VIEW_CONNECTION</loggedInUserPrivileges> <loggedInUserPrivileges>PRIV_CREATE_RULE</loggedInUserPrivileges> <self> <href>/api/sessionInfo</href> <rel>self</rel> <type>GET</type> </self> <sessionId>6501FDF0D241CF626FB206BC7D3C487D</sessionId> <sessionTimeout>1800</sessionTimeout> </session-info>

0 COMMENTS

We’d like to hear from you!