Users must be authenticated to searchrefiner before using the tools and APIs. Configuration of administrators can be done via editing the configuration items in config.json, as explained in setup instructions.

For command-line and programmatic API usage, a cookie authentication token must be acquired. An example of this token acquisition using curl can be performed as follows:

curl -X POST -v searchrefiner.url/account/api/login -F 'username=example' -F 'password=12345'

The authentication cookie token will be set in the response header if the username and password are correct:

< Set-Cookie: user=sdfdfg5325==|53462342362|48798fg8229991288fhfnaasd3819t51; <<truncated>>

(obviously fake cookie)

Now when using the API, requests can be made like so:

curl -X POST --cookie "user=sdfdfg5325==|53462342362|48798fg8229991288fhfnaasd3819t51" localhost:4853/api/query2cqr -F 'query=(neck[Title] AND cancer[Abstract])' -F 'lang=pubmed'

Last update at 2019-05-07 04:44:01 +0000

Revision a269613879cbb4f5f3ad54452c9b6c3f33ebde65