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.
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.
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)
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:
Thereafter, RSpace will be able to access the
x-total-count header and display the results with pagination.