aiidateam / aiida-restapi

AiiDA Web API for data queries and workflow management.
https://aiida-restapi.readthedocs.io
MIT License
9 stars 7 forks source link

📚 DOCS: Tutorial on Launching a WorkChain #31

Closed flavianojs closed 2 years ago

flavianojs commented 2 years ago

Introduces an example in the Tutorial section on how to launch a WorkChain through the REST API. This example was adapted from the GSOC 2021 Report by Ninad Bhat.

ltalirz commented 2 years ago

Thanks for the fixes @flavianojs , as well as for pointing out the authentication issue over slack.

The easiest steps for authentication are:

  1. Go to http://127.0.0.1:8000/docs
  2. Click on "Authorize"
  3. Use username "johndoe@example.com" and password "secret"
  4. Log in

You can now use the Swagger Javascript client to send requests to the API (which we should probably add as the first way of doing things in the tutorial).

What this does is it will add a Authorization: Bearer eyJhbGciOiJIUzI1NiIs... header to all requests.

You can also authenticate from the python API but let's not include that in the tutorial.

ltalirz commented 2 years ago

@flavianojs Are you still going to add the bit on the authentication or should I go ahead and merge this?

flavianojs commented 2 years ago

@flavianojs Are you still going to add the bit on the authentication or should I go ahead and merge this?

Thanks, Leo. Give me one day or two.

flavianojs commented 2 years ago

Hi @ltalirz, would you have a look at it now? Cheers.