The Remote Matching Service (RMS) provides centralized search services to applications like a web-based administration client.
RMS is also capable of supporting large search data pools.
The RMS server runs as web application and exposes its services via a REST API which can be consumed by applications that are coded in standard development languages, such as Java, C++, or C#, and that are also compatible with HTTP Web services, to send and receive data from RMS Server.
However this documentation doesn't always link to the return types that are used for requests.
The types are mentioned in the description - please check the Data Model
section
for details on the referenced type.
In order to connect to RMS Server, append RMS/service to server base URL. For example the base address to communicate with the RMS server will look similar to:
"http://{serverName}:{PortNumber}/RMS/service"
Most calls require authentication. Authentication information is passed in the HTTP header. Two types of authentication are supported:
POST /session/username
. This creates a session with a unique id that
is returned and needs to be passed to subsequent calls using X-CPTMS-Session
.
RequestConnect.Address = "http://{serverName}:{PortNumber}/RMS/service/session/{UserName}"; RequestConnect.Content = Password; Response sessionId = client.SendPost(RequestConnect);
X-RMS-User
header to the request that contains
the name of the internal user account. Add a X-RMS-Time
header to the request that contains the current time
in the ISO 8601 format. Add a X-RMS-Timehash
header to the request that contains a Base64 encoding of
the account password and the time. To generate the timehash first a SHA256 hash must be created from a string that
contains the account password plus a space character plus the current time in the ISO 8601 format. Once the SHA256 hash has been generated
the value can then be encoded in the Base64 format. The time must not differ by more than 5 minutes from the server time.
It is recommended that you use the server time which can be retrieved by calling GET /server/time
.
httpClient.DefaultRequestHeaders.Add ("X-RMS-User", "AccountName");
string ServerTime = GetServerTime();
httpClient.DefaultRequestHeaders.Add ("X-RMS-Time", serverTime);
byte[] hash = Compute256Hash("AccountPassword" + " " + serverTime);
string base64 = Convert.ToBase64String(hash);
httpClient.DefaultRequestHeaders.Add ("X-RMS-Timehash", base64);
To check for a session a call can be made to GET session/current
.
The session id is passed in the header X-CPTMS-Session
.
client.DefaultRequestHeaders.Add ("X-CPTMS-Session", sessionId); RequestCurrentSession.Address = "http://{serverName}:{PortNumber}/RMS/service/session/current"; Response currentSessionInfo = client.SendGet(RequestCurrentSession);
The result structure of the session/current
API method is as described below:
name | data type | description |
---|---|---|
userName | string | Name of the user that is logged in |
sessionId | string | Id of the active session |
status | string | not_authenticated, not_authorized, expired, logged_in |
roles | array of string | |
type | number | Type of session: 0 = not logged in, 1 = technical account, 2 = user account, 3 = user account/SSO |
{ "userName" : "...", "sessionId" : "...", "status" : "...", "roles" : [ "...", "..." ], "type" : 12345 }
In order to pull record data from a database a Datasource configuration is required. To create or update a Datasource use the
method POST /datasource
. You will need to provide the following pieces of required information, a name for the configuration, the type of connection, the driver class, and a JDBC URL.
There are two included driver classes you can use by default:
com.microsoft.sqlserver.jdbc.SQLServerDriver
oracle.jdbc.driver.OracleDriver
jdbc:sqlserver://host:port;databaseName=databaseName;responseBuffering=adaptive;selectMethod=cursor;
jdbc:oracle:thin:@host:port:sid
{ name: "Datasource Name" type: "MSSQL" driverClass: "com.microsoft.sqlserver.jdbc.SQLServerDriver" jdbcUrl: "sqlserver://hostUI:1433;databaseName=databaseUI;responseBuffering=adaptive;selectMethod=cursor;" }
To create a Search Index a unique name and a SeachIndexCfg
object are required, see the documentation about the datatype for more information.
With the object created use the method POST /index/{name}/
where the name is the unique name of the index.
client.DefaultRequestHeaders.Add ("X-CPTMS-Session", sessionId); RequestCreateIndex.Address = "http://{serverName}:{PortNumber}/RMS/service/index/{name}"; RequestCreateIndex.Content = SearchIndexCfg.toJson() Response createIndexResponse = client.SendPost(RequestCreateIndex);
Search operations can be done by using created search indexes. There are two types of search options available, i.e - candidate search and best search.
Query
object are required. See the documentation about the datatype for more information. With the object created use the method
POST /index/{name}/record/candidates
where the name is the unique name of the index.
client.DefaultRequestHeaders.Add ("X-CPTMS-Session", sessionId); RequestCandidateSearch.Address = "http://{serverName}:{PortNumber}/RMS/service/index/{name}/record/candidates"; RequestCandidateSearch.Content = Query.toJson() Response candidateSearchResponse = client.SendPost(RequestCandidateSearch);
DocumentQuery
object are required. See the documentation about the datatype for more information. With the object created use the method
POST /index/{name}/record/best
where the name is the unique name of the index.
client.DefaultRequestHeaders.Add ("X-CPTMS-Session", sessionId); RequestBestSearch.Address = "http://{serverName}:{PortNumber}/RMS/service/index/{name}/record/best"; RequestBestSearch.Content = Query.toJson() Response bestSearchResponse = client.SendPost(RequestBestSearch);
To create a Duplicate Report for an index the method POST /report/duplicates/{IndexName}/detection
is used. This will start the process that creates the duplicate report.
If an index does not exist with the provided name a 404
error is returned.
Once a duplicate report has been started the progress can be checked by using GET /report/duplicates/{IndexName}
. The complete percentage is returned as a decimal between 0 and 1.
This can be called multiple times in order to retrieve an updated percentage value.
When the duplicate report has finished generating, the GET /report/duplicates/{IndexName}/hits
method can be used to retrieve the results.
The page
and the pageSize
parameters of this call can help tailor the amount of results returned.
The full report can also be downloaded as a CSV or an Excel document using the report/duplicates/{IndexName}/csv
or report/duplicates/{IndexName}/xls
respectively.
Example
client.DefaultRequestHeaders.Add("X-CPTMS-Session", sessionId); RequestDuplicateReport.Address = "http://{serverName}:{PortNumber}/RMS/service/report/duplicates/{indexName}/detection"; client.SendPost(RequestDuplicateReport); ReportStatus response; do { //Create a pause to limit the amount of requests to the server RequestReportStatus.Address = "http://{serverName}:{PortNumber}/RMS/service/report/duplicates/{indexName}"; response = client.SendGet(RequestReportStatus); } while (response.currentStatus.Equals("in_progress")); if (response.currentStatus.Equals("completed")) { if (response.numHits > 0) { //get the duplicates RequestDuplicates.Address = "http://{serverName}:{PortNumber}/RMS/service/report/duplicates/{indexName}/hits?page=1&pageSize=25"; Listhits = client.SendGet(RequestDuplicates); } }
To create an Internal user the method POST /user/internal/{UserName}
is used where {UserName} is the name of the user which would be passed as input.
The password also needs to be passed in the Request payload section.
The password needs to meet few requirement criteria in order to successfully create an internal user. Depending on cases those criteria not met an 401
(Unauthorized) error is returned
along with an error code in the X-CPTMS-ErrorCode
section of the Response Header.
There can be several error codes as follows depending on which requirements the password does not meet.
PWD001 - Empty Username or Password
PWD002 - Username appearing in Password
PWD003 - The application (i.e. RMS/Remote Matching Service) or the company name appearing in Password
PWD004 - The length of the password less than 12 or more than 30 characters.
PWD005 - Not having a Upper case character in Password
PWD006 - Not having a Lower case character in Password
PWD007 - Not having a number in Password
PWD008 - Not having a special character (!@#$%^&*()=+_- or a space) in Password
PWD009 - Having 3 or more consecutive characters in Password
PWD0010 - Having the frequently used common words in Password
**Following is the list of forbidden frequently common words in the password considered as of now:
{ 123456 sunshine qwerty123 princess !@#$%^&* charlie 654321 donald Password Football welcome iloveyou iloveu admin abc123 aa123456 }
Unauthorized requests without authentication headers or with an incorrect password receive 403 as the response code.
Attempts to access a resource that does not exist, generates a 404 response code.
All other errors usually produce a 5xx response code.
Current released version is RMS 2.1.1
For more details on the version history, please refer to the product Release Notes - https://docs.hyland.com/Portal_Public/Products/en/Remote_Matching_Service.htm
The resources use a data model that is supported by a set of client-side libraries that are made available on the files and libraries page.
There is a WADL document available that describes the resources API.
name | path | methods | description |
---|---|---|---|
DuplicateDetectionService |
|
|
Manages the creation of reports about potential duplicate records and provides access to results. |
JDBCDataSourceService |
|
|
Management of JDBC data sources.
JDBC data sources can be referenced when configuring a record source of type "JDBC" for a field. |
SearchIndexService |
|
|
Manages projects, fields and associated search indexes. Provides the search functionality.
To perform a search request, use either |
ServerInstanceService |
|
|
Manages the available server instances |
SystemService |
|
|
Manages general system settings. |
type | description |
---|---|
AssaScoringSettings | Scoring Configuration for the ASSA Verifier |
Column | Configuration of a column. This provides information about whether or not a column is searchable or whether it is used as filter. |
ColumnScoringSettings | Scoring settings for a single column.
This is only used for record verifier scoring. This is not relevant for candidate search. |
DocumentQuery | Query for finding records in an index that appear on a given document.
This type of query triggers two searches :
|
DumpStatus | Status information about the dump of the content of a search index to a file. |
DuplicateRecordCandidate | Result information about a matching record. |
DuplicateRecordDetectionTask | Wrapper object for containing the criteria to detect the duplicate data in the index's record source. |
EnhancedJDBCDataSourceCfg | Enhancement of JDBCDataSourceCfg that include user name and password - required for testing a connection. |
FieldScore | Field scoring information |
Filter | Filter object consists a key-value pair , used for filtering in queries at the time of candidate or best search. |
IndexerStatus | Status information about the last rebuild or recreate action on an index. |
JDBCDataSourceCfg | Configuration of a JDBC data source that can be used for a JDBCRecordIndexer |
LocalizedSystemMessage | A system message represents an important information or error message related to the status of the system itself or a component of the system. |
NotificationSettings | Configuration settings for email notification |
NotificationType | Refers the type of notification for rebuild status or server availability. |
PerformanceStatistics | Provides statistics for a given period of time. |
Query | Full query object controls most of the settings for an individual search request. |
QueryResultSet | Collection of results for a single record. |
RecordScoringSettings | Scoring configuration for RecordVerifier. |
ReportSettings | Configures the creation of reports for third party reporting tools. |
ReportStatus | Status of a previous or ongoing report creation. |
SMTPAccount | Configuration for using an SMTP server to send mails. |
ScoringSettings | Parent and abstract scoring configuration which can be used either for
AssaScoringSettings or RecordScoringSettings implementation.
|
SearchIndexCfg | Configuration settings for a Search Index. |
SearchIndexCfgSummary | Configuration summary instance for a search index. |
SearchIndexStatus | Status information about a single search index |
SearchResult | Result information about a matching record. |
ServerInstanceCfg | Configuration information about a registered server instance. |
TextReference | It references a section within a document text. |