API Client Code Examples
In order to show the capabilities or our API and demonstrate user cases requiring multiple API calls, we are developing rich language bindings and example code on our open-source Github repository.
Currently we have generated example client code using Python, Bash, Groovy and Java but we welcome suggestions for other languages or examples from our users.
Python Examples
Our Python API project is hosted on GitHub here.
This project contains a client which helps calling RSpace APIs and some example Python scripts. With rspace-client 2.6.0 the library features a PyFilesystem API for accessing RSpace Gallery files and RSpace Inventory attachments.
The examples of client code include:
- A basic query to list documents
- Iterating over pages of results
- Searching using advanced and simple queries
- Retrieving document content
- Getting attached files
The examples use the rspace_client package which provides an abstraction over lower-level libraries and is compatible with both Python 2 and Python 3.
The client package is available both on the GitHub site and the Python packages website here: https://pypi.org/project/rspace-client/
Sync Jupyter Notebooks with the RSpace Python Client
RSpace Python Client v2.6.2 and above can sync Jupyter Notebooks with RSpace, adding them as attachments to RSpace documents. See Sync Jupyter Notebooks with the RSpace Python Client on how to install and use this feature.
Groovy Examples
Our Groovy API project is hosted on GitHub here.
The examples of Groovy client code include:
- A basic query to list documents
- Iterating over pages of results
- Searching using advanced and simple queries
- Retrieving document content
- Getting attached files
Other examples
Further examples can be found on our community project page on GitHub.