Let’s say that you have a container running, and it serves as a base to to serve metadata for your research software encyclopedia. It runs an interactive dashboard and that’s great, but you really need programmatic access to the repositories taxonomy, and criteria. How might you do that?
The Application Programming Interface
The dashboard also exposes a simple Restful API to the database! After you start the dashboard:
$ rse start
If you look at the bottom of the table, there is a small link to view the tasks api.
API Views
- Api Index (root)
- List Repositories
- List Repositories by Parser
- List Single Repository
- List Criteria
- List Taxonomy
Index
/api
The first page you go to is the index, which shows the pattern for endpoints that exist.
List Repositories
/api/repos
You can quickly see a listing of all repositories in the encyclopedia:
List Repositories by Parser
/api/repos/parser/[name]
Or a listing based on the parser (e.g., GitHub)
List Single Repository
/api/repos/[uid]
If you adjust the url (/api/repos/<uid>
) to specify a particular repository, you’ll see it’s exported metadata:
List Criteria
/api/criteria
You can also view a listing of all criteria:
List Taxonomy
/api/taxonomy
or a flattened list of categories in the taxonomy:
If you’d like to see any other endpoints added, please open an issue.