PyRAT Integration

This integration is only available to users on an Enterprise instance of RSpace.

PyRAT

PyRAT is a web-based animal colony management system. This integration enables you to browse and filter PyRAT, and to import records from PyRAT as tables into your RSpace notebook.

There is some initial, one-time setup required. Permission must be obtained from Scionics, the makers of Pyrat. supportATscionics.com. They will issue a client ID. This client ID, and the URL of the Pyrat instance must then be set on RSpace server deployment.properties file. Either Research Space can perform this, or an on-premises RSpace administrator. Details of the properties are in the RSpaceConfiguration.md configuration document included with RSpace distribution.

Configuration

Getting set up is quick and easy. In order to use PyRAT, make sure an administrator has configured RSpace to use PyRAT and has set it as 'Available' in the System->Configuration panel.

1. You will need a personal access token, which you can request from your PyRAT admin:

2. Now, in RSpace, go to Apps Page and enter your key, enable the App, and save. After you've saved, the App panel should look like this:

You can update your token at any time by entering a new value and clicking 'update'.

Using PyRAT from RSpace

You can access PyRAT from the text editor toolbar.

Clicking the button opens a paginated listing of entries (some columns are redacted for privacy):

You can filter results and also choose which columns to display:

To insert data into RSpace, select the desired rows using the checkboxes, then 'Insert'. A table will be added to RSpace text field with the visible columns.

Troubleshooting

PyRAT server domain certificate (RSpace version 1.96.1, or later)

From version 1.96, RSpace fetches data from via PyRAT via the RSpace server rather than directly from the browser. This has the advantage of preventing the CORS issues described above but requires that the RSpace server trust the certificate of the PyRAT server. If the integration is not working, then a system administrator should consult the server logs. If there is message akin to the following then consult the guide on domain certificates.

I/O error on GET request for "$PYRAT_SERVER/api/v2/version": PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

CORS (RSpace version 1.96.0 or older)
Most reliable way to solve CORS issue is upgrading RSpace to version 1.96.1, or later.

If you see an error message relating to CORS or pagination label that looks like this

then your PyRAT server has not be adequately configured for integration with RSpace. We make a cross-origin request directly from the RSpace application to the PyRAT server and as such the PyRAT server must allow cross-origin requests. Furthermore, it must also allow us to access the custom HTTP headers that describe the number of results in the search query. It is for this reason we recommend that the PyRAT server be configured to respond with the HTTP header of:

access-control-expose-headers: *

Thereafter, RSpace will be able to access the x-total-count header and display the results with pagination.


How did we do?


Powered by HelpDocs (opens in a new tab)