RESTful Web Service APIs
The RESTful Web Services (RWSs) can be discovered via a WADL which is created dynamically whenever the Application Server is running. The location of the WADL is as follows:
<root context>/services/rest/application.wadl
Where <root context> is the Report2Web URL context path. An example of this path would be as follows:
http://<host_name>:<port>/r2w
The complete path to the WADL would then be as follows:
http://r2wserver:8080/r2w/services/rest/application.wadl
The list of available RWSs are categorized and listed below. Accessing the RWS is accomplished by appending the RWS Context to the RWS Name. The following is an example of a fully qualified RWS:
http://r2wserver:8080/r2w/services/rest/rwSearch/doSearch
The list of available RESTful web service types are listed below. Accessing the RWS is accomplished by appending the RWS Context to the RWS Name.
|
Web Service Type |
Context |
|---|---|
|
Catalog |
<root context>/services/rest/rwCatalog/ |
|
Folder |
<root context>/services/rest/rwFolder/ |
|
Publication Profile |
root context>/services/rest/rwPubProfile/ |
|
Search |
<root context>/services/rest/rwSearch/ |
|
Version |
<root context>/services/rest/rwVersion/ |
Authorized Users
Several of the RESTful Web Service APIs have an <authorizedUser> section, which is consistent across Web Services. Both the <password> and <name> (a valid Member ID) must be set and the remaining parameters can be ignored. The password must be AES encrypted and be generated via a Redwood provided encryption function (DLL) which is installed with Report2Web Clients (Burster, Router, etc.). See the section named Password Encryption at the beginning of this document for additional details.
Obtaining the Catalog ID
Several of the RESTful Web Service APIs have an <authorizedUser> section, which is consistent across Web Services. Both the <password> and <name> (a valid Member ID) must be set and the remaining parameters can be ignored. The password must be AES encrypted and be generated via a Redwood provided encryption function (DLL) which is installed with Report2Web Clients (Burster, Router, etc.). See the section named Password Encryption at the beginning of this document for additional details.
Search RESTful Web Services
Accessing individual services is accomplished by appending the RWS Context to the RWS Name. For example:
<root context>/services/rest/rwSearch/doSearch
The table below lists the available web services for searching.
|
RWS Name |
Description |
|---|---|
|
doSearch |
Used for searching for publications |
|
getAllCategories |
Returns all categories for a given catalog |
|
getAllKeywords |
Returns all keywords for a catalog |
|
getVersionsForPublicationFromSearch |
Retrieves the versions of the specified publication |
|
retrieveSearch |
Retrieves more results for an existing search |
doSearch
General Usage Notes
-
Call doSearch first to get the first N search results, then use the XML that it returns to call retrieveSearch to get additional search results.
-
<authorizedUser> See the section titled Authorized Users for details.
-
<catalogId> must be set. You can get the valid Catalog Ids using the rwCatalog/GetAllCatalogs RWS.
-
<start> and <end> are required. They specify which search results are returned. For instance, with values 1 and 20, the first 20 search results will be returned. Call doSearch/retrieveSearch to get more results from the search.
-
<memberId> (equivalent to the user id used on Sign In page in Report2Web) can be the same as the authorizedUser, or it can be a different user. The search results are retrieved based on the content access permitted for the <memberId> specified.
-
<searchCriteria> defines the search. The various parameters are AND-ed together for searching. This means that the Date range must be satisfied, ALL specified Categories and Keywords must be present, ALL specified values must be present, and specified Author, Subject, etc., must match, etc. There are three exceptions to the AND-ing:
-
Based on <dateSearchType>, some combination of these parameters sre used: <days>, <date>, <fromDate>, <toDate>. Valid values for <dateSearchType> are 1, 2 and 3 (described below).
1: The <days> field will tell the server how far back to search, in days. Values can be any positive integer, like 7 or 14 (for week old, two weeks old). A very large number, 9999, would effectively search for decades.
2: Takes a single <date> as parameter.
3: Takes a range – the <fromDate> and <toDate> need to be specified.
-
If <freeText> is specified, then all the remaining <searchCriteria> fields are ignored, including dates and folder, and only the <freeText> is used. The free text is search for in the content of the document itself, as well as in the author, title, subject, and description fields.
-
The user may specify any number of Keyword / Value pairs as part of the Search criteria. In this case, each Keyword / Value pair is OR’d rather than AND’d. There is no support for AND’ing Keyword / Value pairs.
-
Any number of keyword/value pairs can be specified when doing the search
-
Any number of Category values can be specified when doing the search
-
<folder> is the folder ID. To search the whole hive, simply omit the folder ID.
-
<id> is ignored. It can be omitted or set to zero.
-
Optional parameters: If a parameter is not needed, then omit the XML tags for that parameter. For instance, if <freeText> is used in the <searchCriteria>, then all the other <searchCriteria> parameters can be omitted (and are ignored if they are present).
Sample XML Search Request for doSearch
<?xml version="1.0" encoding="UTF-8"?>
<doSearchRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
<name>testuser</name>
</authorizedUser>
<catalogId>1</catalogId>
<end>20</end>
<memberId>81</memberId>
<searchCriteria>
<author>Joe User</author>
<categoryIds>1</categoryIds>
<categoryIds>2</categoryIds>
<content>By Content</content>
<date>2010-01-29T16:26:12.858-05:00</date>
<dateSearchType>1</dateSearchType>
<days>10</days>
<description>By Description</description>
<fileExtensions>pdf</fileExtensions>
<fileName>foo</fileName>
<folderId>1</folderId>
<freeText>Free Text</freeText>
<fromDate>2010-01-29T16:26:12.858-05:00</fromDate>
<id>0</id>
<includeSubFolder>true</includeSubFolder>
<keywordsByName>
<entry>
<key>1</key>
<value>
<item>value1</item>
<item>value2</item>
</value>
</entry>
</keywordsByName>
<subject>By Subject</subject>
<title>By Title</title>
<toDate>2010-01-29T16:26:12.858-05:00</toDate>
</searchCriteria>
<start>1</start>
</doSearchRequest>
Sample XML Keyword Search Request for doSearch
<?xml version="1.0" encoding="UTF-8"?>
<doSearchRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>wachabe</name>
<password>43758ac7a651aa2f327cff72316ca3af03a2ba175f3e46431c2a1c90bdfaa4a9f</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogId>1</catalogId>
<end>20</end>
<memberId>1</memberId>
<searchCriteria>
<author>Joe User</author>
<categoryIds>1</categoryIds>
<categoryIds>2</categoryIds>
<content>By Content</content>
<date>2010-07-07T18:19:27.202-04:00</date>
<dateSearchType>1</dateSearchType>
<days>10</days>
<description>By Description</description>
<fileExtensions>pdf</fileExtensions>
<fileName>foo</fileName>
<folderId>1</folderId>
<freeText>Free Text</freeText>
<fromDate>2010-07-07T18:19:27.202-04:00</fromDate>
<id>0</id>
<includeSubFolder>true</includeSubFolder>
<keywordsByName>
<entry>
<key>FOO</key>
<value>
<item>BAZ</item>
<item>BAR</item>
</value>
</entry>
</keywordsByName>
<subject>By Subject</subject>
<title>By Title</title>
<toDate>2010-07-07T18:19:27.202-04:00</toDate>
</searchCriteria>
<start>1</start>
</doSearchRequest>
Sample XML Result for doSearch
<?xml version="1.0" encoding="UTF-8"?>
<searchResults>
<publicationSearchResults>
<folderPath>/Public/Mark</folderPath>
<hasMultipleVersions>true</hasMultipleVersions>
<publicationId>41</publicationId>
<versionSearchResults>
<author>
</author>
<createDate>2010-02-01T16:15:00-05:00</createDate>
<defaultDocumentId>81</defaultDocumentId>
<description>
</description>
<expirationDate>2010-02-01T16:15:00-05:00</expirationDate>
<filename>JuliusCaesar.txt</filename>
<formatId>3</formatId>
<link>http://localhost/r2w/api/report?C=catalog01&R=81&TOKEN=bWJhcnRvbjpuZXBoaTcz</link>
<subject>
</subject>
<title>JuliusCaesar</title>
<versionId>101</versionId>
</versionSearchResults>
</publicationSearchResults>
<publicationSearchResults>
<folderPath>/Public/Mark</folderPath>
<hasMultipleVersions>false</hasMultipleVersions>
<publicationId>62</publicationId>
<versionSearchResults>
<author>
</author>
<createDate>2010-02-01T16:48:00-05:00</createDate>
<defaultDocumentId>86</defaultDocumentId>
<description>
</description>
<expirationDate>2010-02-01T16:48:00-05:00</expirationDate>
<filename>JuliusCaesar2.txt</filename>
<formatId>3</formatId>
<link>http://localhost/r2w/api/report?C=catalog01&R=86&TOKEN=bWJhcnRvbjpuZXBoaTcz</link>
<subject>
</subject>
<title>JuliusCaesar2</title>
<versionId>106</versionId>
</versionSearchResults>
</publicationSearchResults>
<searchId>185</searchId>
<totalSize>2</totalSize>
</searchResults>
retrieveSearch
General Usage Notes
<searchId> This is returned by doSearch, and indicates the saved search. The search id is unique to this search request. The lifespan of the id is dependent on the appserver’s available memory and uptime.
Sample XML Request for retrieveSearch
<?xml version="1.0" encoding="UTF-8"?>
<retrieveSearchRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
<name>testuser</name>
</authorizedUser>
<catalogId>1</catalogId>
<end>4</end>
<memberId>81</memberId>
<searchId>5</searchId>
<start>1</start>
</retrieveSearchRequest>
getVersionsForPublicationFromSearch
Retrieves the versions of the specified publication that match the search criteria. For instance, there may be 10 versions of a publication, and perhaps only versions 1, 4, and 10 match the criteria. These are the sequence numbers of the matching versions.
Sample XML for getVersionsForPublicationFromSearch
<?xml version="1.0" encoding="UTF-8"?>
<getVersionsForPublicationFromSearchRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
<name>testuser</name>
</authorizedUser>
<catalogId>1</catalogId>
<end>50</end>
<publicationId>312</publicationId>
<searchResultId>8</searchResultId>
<start>1</start>
</getVersionsForPublicationFromSearchRequest>
getVersionMetaData
This API is used in conjunction with the doSearch API. Using the searchResultId, and a corresponding publicationId from the doSearch result set, this API returns all versions of the specified publication from the search along with each version’s metadata.
<apiUrl> is an encrypted URL link to the document that can be used to obtain the document and store locally.
<reportURL> is a URL link to the document. Uses the session’s authentication for verifying access to the document
Sample XML for getVersionMetaData
<?xml version="1.0" encoding="UTF-8"?>
<getVersionMetaDataRequest>
<authorizedUser>
<name>joeuser</name>
<password>AES_ENCRYPTED_PASSWORD</password>
</authorizedUser>
<catalogId>1</catalogId>
<numResults>10</numResults>
<publicationId>3</publicationId>
<searchResultId>6</searchResultId>
</getVersionMetaDataRequest>
Sample XML Response for getVersionMetaData
<versionPropertiess>
<versionProperties>
<actionType>3</actionType>
<apiUrl>http://vmreconauto:10182/r2w/api/report?C=cat1&
R=5&TOKEN=c3lzdGVtc3VwZXJhZG1pbjpudWxs</apiUrl>
<author/>
<description/>
<fileSize>-1</fileSize>
<filename>ABC2</filename>
<hyperlinks>
<entry>
<key>index</key>
<value>http://index.com</value>
</entry>
</hyperlinks>
<latestForPeriod>false</latestForPeriod>
<metadata>
<entry>
<key>Value</key>
<value>200</value>
</entry>
</metadata>
<periodDefinitionId>0</periodDefinitionId>
<publicationDate>2013-04-08T11:08:00-04:00</publicationDate>
<publicationProfile>Default</publicationProfile>
<reportURL>http://vmreconauto:10182/r2w/land?c=cat1&r=5&page=3</reportURL>
<retentionDuration>2</retentionDuration>
<retentionDurationType>ddd</retentionDurationType>
<retentionVersionCount>0</retentionVersionCount>
<subject/>
<title>ABC2</title>
<versionId>7</versionId>
</versionProperties>
</versionProperties>
getAllCategories
This returns the all Categories defined within a given Catalog.
Sample XML Request for getAllCategories
<?xml version="1.0" encoding="UTF-8"?>
<getAllCategoriesRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>joeuser</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogId>1</catalogId>
</getAllCategoriesRequest>
Sample XML Response for getAllCategories
<categories>
<category>
<id>3</id>
<name>FY 2012</name>
<parentid>2</parentid>
<path>/fy 2012</path>
</category>
<category>
<id>4</id>
<name>Period 01</name>
<parentid>3</parentid>
<path>/fy 2012/period 01</path>
</category>
<category>
<id>5</id>
<name>Period 02</name>
<parentid>3</parentid>
<path>/fy 2012/period 02</path>
</category>
<category>
<id>7</id>
<name>FY 2011</name>
<parentid>2</parentid>
<path>/fy 2011</path>
</category>
<category>
<id>8</id>
<name>Period 02</name>
<parentid>7</parentid>
<path>/fy 2011/period 02</path>
</category>
</categories>
getAllKeywords
This returns all keywords for a given Catalog.
Sample XML Request for getAllKeywords
<?xml version="1.0" encoding="UTF-8"?>
<getAllKeywordsRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>joeuser</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogId>1</catalogId>
</getAllKeywordsRequest>
Sample XML Response for getAllKeywords
<keywords>
<keyword>
<id>1</id>
<name>Cost Center</name>
</keyword>
<keyword>
<id>3</id>
<name>Department</name>
</keyword>
<keyword>
<id>2</id>
<name>Report ID</name>
</keyword>
</keywords>
Catalog RESTful Services
The RESTful Web Service (RWS) Context for all items below is:
<root context>/services/rest/rwCatalog/
|
RWS Name |
Description |
|---|---|
|
getAllCatalogs |
Returns the list of all Catalogs (Names and Ids) |
|
getAllCatalogsForUser |
Returns the list of all Catalogs accessible to a specified user |
getAllCatalogs
This returns the list of all Catalogs in the system.
Sample XML Result for getAllCatalogs
<catalogs>
<catalog>
<id>1</id>
<dialect>sqlserver</dialect>
<name>Enterprise</name>
</catalog>
<catalog>
<id>2</id>
<dialect>sqlserver</dialect>
<name>Test</name>
</catalog>
</catalogs>
getAllCatalogsForUser
This returns the list of all Catalogs that the specified user has been given access to.
Sample XML Request for getAllCatalogsForUser
<?xml version="1.0" encoding="UTF-8"?>
<getAllCatalogsForUserRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
<name>joeuser</name>
</authorizedUser>
</getAllCatalogsForUserRequest>
Sample XML Result for getAllCatalogsForUser
<catalogs>
<catalog>
<id>1</id>
<dialect>sqlserver</dialect>
<name>Enterprise</name>
</catalog>
</catalogs>
Folder RESTful Web Services
The RESTful Web Service (RWS) Context for all items below is:
<root context>/services/rest/rwFolder/
|
RWS Name |
Description |
|---|---|
|
getFolderByPath |
Get folder information by folder path |
|
getSubfolderList |
Get a list of subfolders for a given folder |
|
getVersionIdsByPublicationId |
Get version IDs for a publication |
|
createFolder |
Creates a folder |
getFolderByPath
Retrieves folder information for the specified <folderPath>.
Sample request XML for getFolderByPath
<?xml version="1.0" encoding="UTF-8"?>
<getFolderRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>myadmin</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogName>Enterprise</catalogName>
<folderPath>/Finance</folderPath>
</getFolderRequest>
Sample response XML for getFolderByPath:
<folder>
<id>12</id>
<hasChildren>true</hasChildren>
<name>Finance</name>
<parentid>3</parentid>
<path>/Finance</path>
<personalFolder>false</personalFolder>
</folder>
getSubfolderList
Retrieves a list of subfolders for a given <folderPath>.
Sample request XML for getSubfolderList
<?xml version="1.0" encoding="UTF-8"?>
<getFolderRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>myadmin</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogName>Enterprise</catalogName>
<folderPath>/Finance</folderPath>
</getFolderRequest>
Sample response XML for getSubfolderList
<folders>
<folder>
<id>16</id>
<hasChildren>false</hasChildren>
<name>General Ledger</name>
<parentid>12</parentid>
<path>/Finance/General Ledger</path>
<personalFolder>false</personalFolder>
</folder>
<folder>
<id>17</id>
<hasChildren>false</hasChildren>
<name>Accounts Payable</name>
<parentid>12</parentid>
<path>/Finance/Accounts Payable</path>
<personalFolder>false</personalFolder>
</folder>
<folder>
<id>18</id>
<hasChildren>false</hasChildren>
<name>Accounts Receivable</name>
<parentid>12</parentid>
<path>/Finance/Accounts Receivable</path>
<personalFolder>false</personalFolder>
</folder>
</folders>
createFolder
Sample request XML for createFolder
<?xml version="1.0" encoding="UTF-8"?>
<getCreateFolderRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>joeuser</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogId>1</catalogId>
<createFolders>
<id>0</id>
<hasChildren>false</hasChildren>
<parentid>0</parentid>
<path>/Finance/General Ledger</path>
<personalFolder>false</personalFolder>
</createFolders>
</getCreateFolderRequest>
Success response XML for createFolder
<?xml version="1.0" encoding="UTF-8"?>
<folders/>
Version RESTful Web Services
The RESTful Web Service (RWS) Context for all items below is:
<root context>/services/rest/rwVersion/
|
RWS Name |
Description |
|---|---|
|
getProperties |
Get version properties |
|
getFormats |
Get all formats for a catalog |
|
getVersionIdsByPublicationId |
Get version IDs for a publication |
|
getCategories |
Get Categories for a version |
|
getKeywords |
Get Keywords for a version |
|
getUrlByVersionId |
Get the URL for a version |
getProperties
Sample Request XML for getProperties
<getVersionPropertiesRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>joeuser</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogId>1</catalogId>
<memberId>81</memberId>
<versionId>39</versionId>
</getVersionPropertiesRequest>
Sample Response XML for getProperties
<versionProperties>
<actionType>1</actionType>
<author/>
<description/>
<fileSize>-1</fileSize>
<filename>FirstAutoContacts</filename>
<folder>Public</folder>
<hyperlinks/>
<latestForPeriod>false</latestForPeriod>
<metadata/>
<periodDefinitionId>0</periodDefinitionId>
<publicationDate>2013-02-12T14:15:00-05:00</publicationDate>
<publicationProfile>Default</publicationProfile>
<retentionDuration>0</retentionDuration>
<retentionDurationType>YYY</retentionDurationType>
<retentionVersionCount>0</retentionVersionCount>
<subject/>
<title>FirstAutoContacts</title>
</versionProperties>
getFormats
Sample Request XML for getFormats
<getFormatsRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>joeuser</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogName>Enterprise</catalogName>
</getFormatsRequest>
Sample Response XML for getFormats
<formats>
<format>
<id>1</id>
<description>
</description>
<extension>asc</extension>
<imageFilename>txt.gif</imageFilename>
<messagekey>format.asc</messagekey>
<mimeType>text/plain</mimeType>
<priority>12</priority>
</format>
<format>
<id>2</id>
<description>
</description>
<extension>mfd</extension>
<imageFilename>txt.gif</imageFilename>
<messagekey>format.mfd</messagekey>
<mimeType>text/plain</mimeType>
<priority>12</priority>
</format>
<format>
<id>3</id>
<description>
</description>
<extension>txt</extension>
<imageFilename>txt.gif</imageFilename>
<messagekey>format.txt</messagekey>
<mimeType>text/plain</mimeType>
<priority>12</priority>
</format>
. . .
</formats>
getVersionIdsByPublicationId
Sample Request XML for getVersionIdsByPublicationId
<getVersionIdsByPublicationIdRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>dsmith</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogId>1</catalogId>
<memberId>81</memberId>
<publicationId>245</publicationId>
</getVersionIdsByPublicationIdRequest>
Sample Response XML for getVersionIdsByPublicationId
<versionIdsResponses>
<versionIdsResponse>
<value>23</value>
</versionIdsResponse>
<versionIdsResponse>
<value>22</value>
</versionIdsResponse>
<versionIdsResponse>
<value>21</value>
</versionIdsResponse>
<versionIdsResponse>
<value>20</value>
</versionIdsResponse>
<versionIdsResponse>
<value>19</value>
</versionIdsResponse>
<versionIdsResponse>
<value>18</value>
</versionIdsResponse>
</versionIdsResponses>
getCategories
Sample Request XML for getCategories
<getCategoriesRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>dsmith</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogId>1</catalogId>
<memberId>81</memberId>
<versionId>245</versionId>
</getCategoriesRequest>
Sample Response XML for getCategories:
<categories>
<category>
<id>6</id>
<name>def</name>
<parentid>5</parentid>
<path>/abc/def</path>
</category>
<category>
<id>12</id>
<name>there</name>
<parentid>11</parentid>
<path>/hey/there</path>
</category>
</categories>
getKeywords
Sample Request XML for getKeywords
<getKeywordsRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>dsmith</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogId>1</catalogId>
<memberId>81</memberId>
<versionId>245</versionId>
</getKeywordsRequest>
Sample Response XML for getKeywords
<keywords>
<keyword>
<id>2</id>
<name>Report ID</name>
<values>
<id>6</id>
<keywordId>2</keywordId>
<value>ABC123</value>
</values>
</keyword>
<keyword>
<id>3</id>
<name>Department</name>
<values>
<id>7</id>
<keywordId>3</keywordId>
<value>Marketing</value>
</values>
</keyword>
</keywords>
getUrlByVersionId
Sample Request XML for getUrlByVersionId
<getUrlByVersionRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>1</id>
<name>joeuser</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogId>1</catalogId>
<memberId>0</memberId>
<versionId>39</versionId>
</getUrlByVersionRequest>
Sample Response XML for getUrlByVersionId:
<getUrlResponse>
<url>http://localhost:8080/r2w/api/report?C=catalog01&R=43&TOKEN=c211a2hlZTpzYXlkZWI=</url>
</getUrlResponse>
Publication Profile RESTful Web Services
The RESTful Web Service (RWS) Context for all items below is:
<root context>/services/rest/rwPubProfile/
|
RWS Name |
Description |
|---|---|
|
getPubProfileById |
Retrieves Publication Profile by ID |
|
getPubProfiles |
Retrieves Publication Profiles for a Catalog |
|
getPubProfilebyFileName |
Get Publication Profile for a file name based on match rules |
getPubProfileById
Retrieves the details of a Publication Profiles by specified <pubProfileID>.
Sample Request XML for getPubProfileById
<?xml version="1.0" encoding="UTF-8"?>
<getPubProfileRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>myadmin</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogId>1</catalogId>
<catalogName>catalog01</catalogName>
<pubProfileId>1</pubProfileId>
</getPubProfileRequest>
Sample Response for getPubProfileById
<?xml version="1.0" encoding="UTF-8"?>
<pubProfile>
<id>1</id>
<active>true</active>
<dateBased>false</dateBased>
<deleteSource>true</deleteSource>
<description>This is the default profile</description>
<lastModifiedDate>2013-01-03T16:52:57.467-05:00</lastModifiedDate>
<periodRetentionEnabled>false</periodRetentionEnabled>
<periodTypeId>0</periodTypeId>
<profileName>Default</profileName>
<pubExpaction>1</pubExpaction>
<pubGenerationLimit>0</pubGenerationLimit>
<pubPrimaryFormatId>1</pubPrimaryFormatId>
<pubRetentionQty>0</pubRetentionQty>
<pubRetentionUOM>YYY</pubRetentionUOM>
<retentionModified>false</retentionModified>
<timeBased>false</timeBased>
<userId>1</userId>
<versionDefaultAuthor/>
<versionDefaultDescription/>
<versionDefaultTitle>%reportname%</versionDefaultTitle>
<versionSubject/>
</pubProfile>
getPubProfiles
Retrieves details for each Publication Profile within the specified <catalogName>.
Sample Request XML for getPubProfiles
<?xml version="1.0" encoding="UTF-8"?>
<getPubProfilesRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>myadmin</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogName>catalog01</catalogName>
</getPubProfilesRequest>
Sample Response XML for getPubProfiles
<pubProfiles>
<pubProfile>
<id>1</id>
<active>true</active>
<dateBased>false</dateBased>
<deleteSource>false</deleteSource>
<description>This is the default profile</description>
<lastModifiedDate>2013-01-03T16:52:57.467-05:00</lastModifiedDate>
<periodRetentionEnabled>false</periodRetentionEnabled>
<periodTypeId>0</periodTypeId>
<profileName>Default</profileName>
<pubExpaction>1</pubExpaction>
<pubGenerationLimit>0</pubGenerationLimit>
<pubPrimaryFormatId>1</pubPrimaryFormatId>
<pubRetentionQty>0</pubRetentionQty>
<pubRetentionUOM>YYY</pubRetentionUOM>
<retentionModified>false</retentionModified>
<timeBased>false</timeBased>
<userId>1</userId>
<versionDefaultAuthor></versionDefaultAuthor>
<versionDefaultDescription></versionDefaultDescription>
<versionDefaultTitle>%reportname%</versionDefaultTitle>
<versionSubject></versionSubject>
</pubProfile>
<pubProfile>
<id>2</id>
<active>true</active>
<dateBased>false</dateBased>
<deleteSource>false</deleteSource>
<description/>
<lastModifiedDate>2013-01-16T00:00:00-05:00</lastModifiedDate>
<periodRetentionEnabled>false</periodRetentionEnabled>
<periodTypeId>0</periodTypeId>
<profileName>Test</profileName>
<pubExpaction>0</pubExpaction>
<pubGenerationLimit>0</pubGenerationLimit>
<pubPrimaryFormatId>4</pubPrimaryFormatId>
<pubRetentionQty>0</pubRetentionQty>
<pubRetentionUOM>yyy</pubRetentionUOM>
<retentionModified>false</retentionModified>
<timeBased>false</timeBased>
<userId>1</userId>
<versionDefaultAuthor>test</versionDefaultAuthor>
<versionDefaultDescription/>
<versionDefaultTitle>%reportname%</versionDefaultTitle>
<versionSubject/>
</pubProfile>
</pubProfiles>
getPubProfileByFileName
Retrieves the Publication Profile details for a file name based on match rules.
Sample Request XML for getPubProfileByFileName
<?xml version="1.0" encoding="UTF-8"?>
<getPubProfileByFileNameRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>myadmin</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogName>catalog01</catalogName>
<fileName>FirstAutoContacts</fileName>
</getPubProfileByFileNameRequest>
Sample Response XML for getPubProfileByFileName
<pubProfile>
<id>1</id>
<active>true</active>
<dateBased>false</dateBased>
<deleteSource>true</deleteSource>
<description>This is the default profile</description>
<lastModifiedDate>2013-01-03T16:52:57.467-05:00</lastModifiedDate>
<periodRetentionEnabled>false</periodRetentionEnabled>
<periodTypeId>0</periodTypeId>
<profileName>Default</profileName>
<pubExpaction>1</pubExpaction>
<pubGenerationLimit>0</pubGenerationLimit>
<pubPrimaryFormatId>1</pubPrimaryFormatId>
<pubRetentionQty>0</pubRetentionQty>
<pubRetentionUOM>YYY</pubRetentionUOM>
<retentionModified>false</retentionModified>
<timeBased>false</timeBased>
<userId>1</userId>
<versionDefaultAuthor/>
<versionDefaultDescription/>
<versionDefaultTitle>%reportname%</versionDefaultTitle>
<versionSubject/>
</pubProfile>
Security RESTful Web Services
The RESTful Web Service (RWS) Context for all items below is:
<root context>/services/rest/rwSecurity/
|
RWS Name |
Description |
|---|---|
|
login |
Login to Report2Web |
|
setContentAccess |
Sets the Content Access for one or more folders |
|
addMembers |
Adds one or more Members to Report2Web |
|
createMembers |
AES Encrypted Password |
|
removeContent |
Removes Content Access |
|
logout |
Logs out of Report2Web and invalidates the session |
|
addGroupMemberships |
Add Members to an existing group |
|
authorizeMember |
Checks to see if a Member is enabled for a Catalog |
|
getAvailableMembers |
Retrieves all Members of a Catalog |
|
setMemberRole |
Sets the Role for a Member |
login
Logs the specified <userId> into Report2Web.
Sample Request XML for login
<?xml version="1.0" encoding="UTF-8"?>
<loginRequest>
<catalogId>1</catalogId>
<domain>local</domain>
<password>AES_ENCRYPTED_PASSWORD</password>
<userId>joeuser</userId>
</loginRequest>
Sample Response XML for login
<?xml version="1.0" encoding="UTF-8"?>
<authorizedUser>
<catalogName>MyCatalog</catalogName>
<currentDelegate>false</currentDelegate>
<email>joeuser@mycompany.com</email>
<fullName>Joe User</fullName>
<id>9</id>
<name>joeuser</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>35184372088831</permissionflags>
<permissionflagsHex>1fffffffffff</permissionflagsHex>
<roleid>1</roleid>
<type>1</type>
</authorizedUser>
setContentAccess
For the specified <member>, specifies the Content Access for one or more folders as defined within the <path>. Valid Content Access <access> values are r (Read), c (Change) and f (Full Control).
Sample Request XML for setContentAccess
<?xml version="1.0" encoding="UTF-8"?>
<getContentAccessRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>theadmin</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogId>1</catalogId>
<contentAccess>
<access>f</access>
<folder>
<id>0</id>
<hasChildren>false</hasChildren>
<parentid>0</parentid>
<path>/Finance</path>
<personalFolder>false</personalFolder>
</folder>
<includeSubfolders>false</includeSubfolders>
<member>
<authSource>0</authSource>
<domain>my.domain.com</domain>
<enabled>false</enabled>
<id>0</id>
<name>joeuser</name>
<success>false</success>
<type>1</type>
</member>
</contentAccess>
</getContentAccessRequest>
Sample Success response XML for setContentAccess
<?xml version="1.0" encoding="UTF-8"?>
<contentAccesses/>
Sample Failed response XML for setContentAccess
In the sample below, failed responses are shown when the specified member does not exist as well as when the specified folder does not exist.
<?xml version="1.0" encoding="UTF-8"?>
<contentAccesses>
<contentAccess>
<access>f</access>
<failedResponse>Unable to find member: joeuser1 to set content access.</failedResponse>
<folder>
<id>0</id>
<hasChildren>false</hasChildren>
<parentid>0</parentid>
<path>/Finance</path>
<personalFolder>false</personalFolder>
</folder>
<includeSubfolders>false</includeSubfolders>
<member>
<authSource>0</authSource>
<domain>local</domain>
<enabled>false</enabled>
<id>0</id>
<name>joeuser1</name>
<success>false</success>
<type>1</type>
</member>
</contentAccess>
<contentAccess>
<access>f</access>
<failedResponse>Unable to find folder: /Finance1 to set content access.</failedResponse>
<folder>
<id>0</id>
<hasChildren>false</hasChildren>
<parentid>0</parentid>
<path>/Finance1</path>
<personalFolder>false</personalFolder>
</folder>
<includeSubfolders>false</includeSubfolders>
<member>
<authSource>0</authSource>
<domain>local</domain>
<enabled>false</enabled>
<id>0</id>
<name>joeuser</name>
<success>false</success>
<type>1</type>
</member>
</contentAccess></contentAccesses>
addMembers
Adds one or more specified members to Report2Web. Valid <type> values are 1 (User) and 2 (Group).
Sample Request XML for addMembers
<?xml version="1.0" encoding="UTF-8"?>
<getAddMembersRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>myadmin</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogId>1</catalogId>
<addMembers>
<authSource>0</authSource>
<domain>my.domain.com</domain>
<enabled>false</enabled>
<id>0</id>
<name>joeuser</name>
<role>
<id>1</id>
<description>Primary site administrator for R2W</description>
<name>common.text.Super.Administrator</name>
<permissionflags>8796093022207</permissionflags>
</role>
<success>false</success>
<type>1</type>
</addMembers>
<addMembers>
<authSource>0</authSource>
<domain>my.domain.com</domain>
<enabled>false</enabled>
<id>0</id>
<name>Support Group</name>
<role>
<id>7</id>
<description>My Custom Role</description>
<name>My Custom Role</name>
<permissionflags>8796093022207</permissionflags>
</role>
<success>false</success>
<type>2</type>
</addMembers>
</getAddMembersRequest>
Sample Success Response XML for addMembers
<?xml version="1.0" encoding="UTF-8"?>
<members/>
Sample Failed Response XML for addMembers
In the sample below, a failed response is shown when the specified member cannot be found within LDAP.
<members>
<member>
<authSource>0</authSource>
<domain>local</domain>
<enabled>false</enabled>
<failedResponse>Failed to add Member: joeuser [Error: Can not find the member in LDAP.]</failedResponse>
<id>-1</id>
<name>joeuser</name>
<role>
<id>1</id>
<description>Primary site administrator for R2W</description>
<name>common.text.Super.Administrator</name>
<permissionflags>8796093022207</permissionflags>
</role>
<success>false</success>
<type>1</type>
</member>
</members>
createMembers
Creates one or more application members within Report2Web.
Sample Request XML for createMembers
<?xml version="1.0" encoding="UTF-8"?>
<getCreateMembersRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>myadmin</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogId>1</catalogId>
<createMembers>
<authSource>2</authSource>
<catalog>
<id>1</id>
<dialect>sqlserver</dialect>
<name>catalog01</name>
</catalog>
<domain>local</domain>
<email>restwsmember100@restws.com</email>
<enabled>true</enabled>
<fullName>restws member100</fullName>
<id>0</id>
<name>testuser</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<role>
<id>1</id>
<description>Primary site administrator for R2W</description>
<name>common.text.Super.Administrator</name>
<permissionflags>8796093022207</permissionflags>
</role>
<success>false</success>
<type>1</type>
</createMembers>
<createMembers>
<authSource>0</authSource>
<catalog>
<id>1</id>
<dialect>sqlserver</dialect>
<name>catalog01</name>
</catalog>
<enabled>true</enabled>
<fullName>restws member200</fullName>
<id>0</id>
<name>restwsmember200</name>
<password>AES_ENCRYPTED_PASSWORD/password>
<role>
<id>1</id>
<description>Primary site administrator for R2W</description>
<name>common.text.Super.Administrator</name>
<permissionflags>8796093022207</permissionflags>
</role>
<success>false</success>
<type>2</type>
</createMembers>
</getCreateMembersRequest>
Sample Response XML for createMembers
<?xml version="1.0" encoding="UTF-8"?>
<members/>
removeContentAccess
Removes existing Content Access.
Sample Request XML for removeContentAccess
<?xml version="1.0" encoding="UTF-8"?>
<getContentAccessRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>dsmith</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogId>1</catalogId>
<contentAccess>
<access>f</access>
<folder>
<id>0</id>
<hasChildren>false</hasChildren>
<parentid>0</parentid>
<path>/say-f</path>
<personalFolder>false</personalFolder>
</folder>
<includeSubfolders>false</includeSubfolders>
<member>
<authSource>0</authSource>
<domain>my.domain.com</domain>
<enabled>false</enabled>
<id>0</id>
<name>joeuser</name>
<success>false</success>
<type>1</type>
</member>
</contentAccess>
<contentAccess>
<access>r</access>
<folder>
<id>0</id>
<hasChildren>false</hasChildren>
<parentid>0</parentid>
<path>/say-r</path>
<personalFolder>false</personalFolder>
</folder>
<includeSubfolders>true</includeSubfolders>
<member>
<authSource>0</authSource>
<domain>my.domain.com</domain>
<enabled>false</enabled>
<id>0</id>
<name>joeuser</name>
<success>false</success>
<type>2</type>
</member>
</contentAccess>
</getContentAccessRequest>
Sample Response XML for removeContentAccess
<?xml version="1.0" encoding="UTF-8"?>
<contentAccesses/>
logout
Logs the specified user out of Report2Web and invalidates the session.
Sample Request XML for logout
<?xml version="1.0" encoding="UTF-8"?>
<logoutRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>joesuer</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogId>1</catalogId>
<memberId>81</memberId>
</logoutRequest>
Sample Response XML for logout
No XML is returned in body of response.
addGroupMemberships
Adds members to an existing application Group.
Sample Request XML for addGroupMemberships
<?xml version="1.0" encoding="UTF-8"?>
<getAddGroupMembershipsRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>myadmin</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogId>1</catalogId>
<addMembers>
<authSource>0</authSource>
<domain>my.domain.com</domain>
<enabled>false</enabled>
<id>0</id>
<name>joeuser</name>
<success>false</success>
<type>0</type>
</addMembers>
<addMembers>
<authSource>0</authSource>
<domain>my.domain.com</domain>
<enabled>false</enabled>
<id>0</id>
<name>sallyuser</name>
<success>false</success>
<type>0</type>
</addMembers>
<targetGroup>
<authSource>0</authSource>
<domain>local</domain>
<enabled>false</enabled>
<id>0</id>
<name>restwsmember12</name>
<success>false</success>
<type>0</type>
</targetGroup>
</getAddGroupMembershipsRequest>
Sample Response XML for addGroupMemberships
<?xml version="1.0" encoding="UTF-8"?>
<members/>
authorizeMember
Checks to see if a Member is enabled for a Catalog.
Sample Request XML for authorizeMember
<?xml version="1.0" encoding="UTF-8"?>
<authorizeMemberRequest>
<member>
<authSource>0</authSource>
<catalog>
<id>1</id>
<dialect>sqlserver</dialect>
<name>catalog01</name>
</catalog>
<enabled>false</enabled>
<id>1</id>
<name>joeuser</name>
<success>false</success>
<type>0</type>
</member>
</authorizeMemberRequest>
Sample Response XML for authorizeMember
<?xml version="1.0" encoding="UTF-8"?>
<authorizeMemberResponse>
<authorize>true</authorize>
</authorizeMemberResponse>
getAvailableMembers
Retrieves all Members of a Catalog.
Sample Request XML for getAvailableMembers
<?xml version="1.0" encoding="UTF-8"?>
<getAvailableMembersRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>dsmith</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogId>1</catalogId>
<memberType>1</memberType>
</getAvailableMembersRequest>
Sample Response XML for getAvaialbleMembers
<?xml version="1.0" encoding="UTF-8"?>
<members>
<member>
<authSource>2</authSource>
<catalog>
<id>1</id>
<dialect>sqlserver</dialect>
<name>catalog01</name>
</catalog>
<domain>local</domain>
<email>SuperAdmin@changeme.com</email>
<enabled>true</enabled>
<failedResponse>SuperAdmin System Member</failedResponse>
<id>1</id>
<name>systemsuperadmin</name>
<role>
<id>1</id>
<description>Primary site administrator for R2W</description>
<name>common.text.Super.Administrator</name>
<permissionflags>35184372088831</permissionflags>
</role>
<success>false</success>
<type>1</type>
</member>
<member>
<authSource>2</authSource>
<catalog>
<id>1</id>
<dialect>sqlserver</dialect>
<name>catalog01</name>
</catalog>
<domain>local</domain>
<email>CatalogAdmin@changeme.com</email>
<enabled>true</enabled>
<failedResponse>CatalogAdmin System Member</failedResponse>
<id>2</id>
<name>systemcatalogadmin</name>
<role>
<id>2</id>
<description>Primary catalog administrator</description>
<name>common.text.Catalog.Administrator</name>
<permissionflags>35184372072415</permissionflags>
</role>
<success>false</success>
<type>1</type>
</member>
</members>
setMemberRole
Sets the Role for a Member
Sample Request XML for setMemberRole
<?xml version="1.0" encoding="UTF-8"?>
<getSetMemberRoleRequest>
<authorizedUser>
<currentDelegate>false</currentDelegate>
<id>0</id>
<name>dsmith</name>
<password>AES_ENCRYPTED_PASSWORD</password>
<permissionflags>0</permissionflags>
<roleid>0</roleid>
<type>0</type>
</authorizedUser>
<catalogId>1</catalogId>
<members>
<authSource>0</authSource>
<domain>my.domain.com</domain>
<enabled>false</enabled>
<id>0</id>
<name>mlam</name>
<success>false</success>
<type>1</type>
</members>
<members>
<authSource>0</authSource>
<domain>my.domain.com</domain>
<enabled>false</enabled>
<id>0</id>
<name>Sales</name>
<success>false</success>
<type>2</type>
</members>
<role>
<id>1</id>
<description>Primary site administrator for R2W</description>
<name>common.text.Super.Administrator</name>
<permissionflags>8796093022207</permissionflags>
</role>
</getSetMemberRoleRequest>
Sample Response XML for setMemberRole
<?xml version="1.0" encoding="UTF-8"?>
<members/>