Enable /api-docs/

Hi,
I would like to know how to enable /api-docs/ in my site
https://herwingrodriguez.website/api-docs/

Please can you help me to solve this issue?
Thanks for your support

1 Like

Hi,
I found this information: https://github.com/edx/api-doc-tools/blob/master/docs/adding.rst

Unfortunately, I not found any file that has been mentioned there.
Also, I found this info https://github.com/axnsan12/drf-yasg
But I not sure if is necessary to install
pip install -U drf-yasg

I really appreciate your support to find this solution.
I saw that you have it in your demo
https://demo.openedx.overhang.io/api-docs/

Regards,

Hi @herwingrodriguez,
I would like to help you, but not sure how, unfortunately.
I just tried to install new instance on my local computer, and on cloud, and it works. I mean I can se Swagger (/api-docs/) on both side.

– Which tutor version are you using ?
– And can you check logs, please ?

$ tutor local logs --tail=100

I believe, that’s don’t need any extra settings, all Juniper, maybe others comes with swagger ?
Because as you see above, I didn’t do anything extra…

@herwingrodriguez It looks like you are running Ironwood (tutor < 10.0.0). You should upgrade to Juniper to get the API docs endpoint.

Hi @regis thanks you very much for your help and support, I tried to upgrade tutor but I receive the following message.

sudo curl -L “https://github.com/overhangio/tutor/releases/download/v10.4.0/tutor-$(uname -s)_$(uname -m)” -o /usr/local/bin/tutor
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 642 100 642 0 0 2406 0 --:–:-- --:–:-- --:–:-- 2404
Warning: Failed to create the file /usr/local/bin/tutor: Text file busy
0 34.8M 0 16360 0 0 38070 0 0:16:00 --:–:-- 0:16:00 38070
curl: (23) Failed writing body (0 != 16360)

May I know what could be the issue?
Thanks

Hi @regis

I am sorry If I did not explain all the steps in my last message.

  1. I made the backup using these commands
    tutor local stop
    sudo rsync -avr “$(tutor config printroot)”/ /tmp/tutor-backup/

  2. I used this command" tutor local upgrade --from=ironwood, but I received the following error.
    Usage: tutor local [OPTIONS] COMMAND [ARGS]…
    Try “tutor local -h” for help.

Error: No such command “upgrade”.

May I know If I am doing something wrong?

Are you running the AWS Tutor AMI? If yes, you need to stop the tutor-webui service prior to upgrading. This service is using the tutor binary:

sudo systemctl stop tutor-webui

Then, download the latest tutor release. (sudo curl...) You will then be able to upgrade to Juniper (tutor local upgrade...) and restart the tutor-webui service (sudo systemctl stop tutor-webui).

Hi @regis

Thanks for all your help and support.
I made all the process and I could upgrade Open edX
The URL: https://herwingrodriguez.website/api-docs/ is available right now.

The template is working properly.
The unique issue that I have right now is that for some reason the content is not available, I mean the courses.
If you click on a course, you will see the message: PAGE NOT FOUND.
What could be the issue?

I copied all the information from the CLI (Terminal), you can see all here.

Regards,

It’s difficult to say. All I see is that you are running Tutor as root, which is not recommended at all, as described in the warning message. You must follow the troubleshooting instructions to figure out what the exact issue really is: Troubleshooting — Tutor documentation