privacyIDEA provides an easy and intuitve REST API. Authentication to this API is done using JWT.  The documentation is created using Sphinx.

You can view it here.

You may use httpie to talk to the API via the command line. A basic example would be the following:

Get your authorization token (JWT)

http – verify no POST https://privacyidea.local/auth username=admin password=privacyidea

List tokens for user myuser in realm myrealm

http – verify no GET https://privacyidea.local/token/ Authorization:YOURJWT realm=myrealm user=myuser