As of version 1.41 a RESTful API has been developed for RSpace. This provides RSpace users with scripted access to search, review and retrieve data in RSpace which in turn enables you to integrate RSpace into their existing workflows with ease.
The RSpace API enables programmatic search and retrieval methods for your documents. There are multiple GET methods for files and documents allowing for in-depth searches, the retrieval of complete documents and their metadata and the processing of data contained in forms. There are also POST methods to create new content and upload files. The API is being continually expanded.
RSpace uses API Keys for the authorisation and authentication. You can generate your API key in RSpace as follows:
- Login to RSpace and go to the ‘My RSpace’ page
- Click on the ‘My Profile’ tile
- Under the ‘Manage API key’ header, click on the ‘Regenerate key’ button
- A pop up box will appear asking you to enter your RSpace login password
- Type your password and click ‘OK’
- If you look under the ‘Manage API key’ header, you will see your API key has been generated
- You may hide the key from view by clicking the ‘Hide Key’ link next to your key
Swagger documentation for the RSpace API is available at “http://<rspace_instance>/public/apiDocs” (https://community.researchspace.com/public/apiDocs for community users).
This documentation not only shows examples of requests you may with to make, it also allows for the running or real requests on your version of RSpace, following API key authentication.
To authenticate your key and use Swagger to explore the API do the following:
- Go to the Swagger documentation for your instance of RSpace. This may be accessed by clicking on the ‘See API Documentation’ link in your RSpace profile, or alternatively at http://<rspace_instance>/public/apiDocs (for Community RSpace this is at https://community.researchspace.com/public/apiDocs )
- Click the ‘Authorise’ button at the top right of the Swagger page that opens
- A pop-up box will appear asking for your API key
- Enter your current API key into the box provided and click ‘Authorize’
- You are now able to run requests via the Swagger interface
We recommend you keep your API key private.
You may regenerate your API key at any time by clicking on the ‘Regenerate Key’ button. When your new key is generated, the old key will become invalidated.
To block API access altogether you can simply click on the ‘Revoke Key’ button, to delete the API key.