SciCatProject/backend-v3

Question / Doc : What is the endpoint to get a list of all exiting keywords?

Closed this issue · 3 comments

Summary

What is the api-endpoint I should use to receive a list of exiting keywords?

I would like to get a list of exiting keywords through the api, similar to the list that is shown in the frontend search-box when trying to filter by keyword (see screenshot). Clearly it is possilbe it is just not clear to me how to get it.

Current Behaviour

Looking at the api-doc I couldn't figure out what is the right api-endpoint to receive a list of exiting keywords.

Extra Details

grafik

As far as I know, there is no such API endpoint. Instead I think you would need to query a list of datasets, filter the keywords and from that assemble a list of the found keywords.

Or you could use the Datasets/fullfacet API endpoint, which returns the count for all the facets of the selected datasets. Since the keywords are part of the standard "facets" you get a structure like this:{
"keywords": [
{
"_id": "sls",
"count": 78
},
{
"_id": "blabla",
"count": 1
}
]

Thanks @stephan271! The Datasets/fullfacet to the job for me!