Ricgraph REST API
You can use the Ricgraph REST API to get data from Ricgraph, or to execute predefined queries in Ricgraph and Ricgraph Explorer, in such a way that your code is not dependent on any Ricgraph code. It allows you to programmatically get items from Ricgraph, as an alternative to using the user interface Ricgraph Explorer.
This will only work if someone has provided a Ricgraph instance, which you can access over the web. For example, you can use the Open Ricgraph demo server. This is the easiest method. Read Use the Ricgraph REST API below to find its REST API server.
Alternatively, you can run Ricgraph on your own computer or on a cloud service such as SURF Research Cloud. Or someone else can host it for you or for a community of users.
The Ricgraph REST API returns results in a JSON format. It uses the OpenAPI standard. Read more about REST (representational state transfer), or read more about API (application programming interface).
On this page, you can learn more about:
- Installation of the Ricgraph REST API.
- Use the Ricgraph REST API.
- Ricgraph REST API endpoint documentation.
- Generate the Ricgraph REST API documentation page.
1 Installation of the Ricgraph REST API
You can skip this section if you plan to use the Open Ricgraph demo server.
The Ricgraph REST API is part of Ricgraph Explorer. Read how to start Ricgraph Explorer. Depending on your needs, you might also want to read:
2 Use the Ricgraph REST API
A call to a REST API consists of a hostname or IP address, sometimes a port number, the path /api/, followed by a REST API endpoint. For example, in
http://127.0.0.1:3030/api/person/search?value=John+Doe
127.0.0.1 is the IP address, 3030 is the port number, http://127.0.0.1:3030/api is the path to the REST API server, /person/search is the endpoint, value the name of a query parameter to the REST API, and John+Doe the value for the query parameter.
You can find the REST API server of the Open Ricgraph demo server by going to the page Pilot project Open Ricgraph demo server. That page lists the link to the Open Ricgraph demo server. Click on it and then click the button “REST API doc” in the top bar. On the next page, in the left column, click on “API servers”. Use that value instead of http://127.0.0.1:3030/api above.
Ricgraph Explorer provides documentation for the REST API. It lists the various endpoints and parameters, and you can try out each endpoint with values for parameters as you like. To do this, click the “REST API doc” button in the top bar of Ricgraph Explorer. The figure below shows this button.
3 Ricgraph REST API endpoint documentation
Read the Ricgraph REST API documentation page. This page is automatically generated from the OpenAPI YAML specification file.
4 Generate the Ricgraph REST API documentation page
Please read Create the Ricgraph REST API documentation.
