mayan-api_client not working with Mayan 3.1.9

When things doesn't work as they should.
Post Reply
Bastian
Posts: 7
Joined: Tue Dec 04, 2018 6:18 pm

mayan-api_client not working with Mayan 3.1.9

Post by Bastian » Fri Mar 08, 2019 2:17 pm

Hi all,

I cannot get the mayan api client to connect to my Mayan server.
When I try to connect to the server like given here:

https://pypi.org/project/mayan-api_client/

I always get a slumber.exceptions.HttpNotFoundError: Client Error 404: http://192.168.0.100:8000/docs/api-docs/

That error seems to be true, because I can't get the api-docs as well when I open the URL using the browser.

Also when I go to System > Tools > API Documentation (Swagger) and API Documentation (ReDoc) show no documentation.
ReDoc remains on a "Loading" page and Swagger tells me: Internal Server Error: Failed to load API definition.
Why are they missing and how can I add them?

I've installed Mayan in a LXC using the direct deployment guide from

https://docs.mayan-edms.com/chapters/deploying.html

I'm running it in a Ubuntu 18.04 LXC Container

Any help is appreciated.

Regards
Bastian

User avatar
rosarior
Posts: 194
Joined: Tue Aug 21, 2018 3:28 am

Re: mayan-api_client not working with Mayan 3.1.9

Post by rosarior » Tue Mar 12, 2019 5:00 am

Hi,

the library we use to create the API made big changes it broke backwards compatibility. We haven't had the opportunity to rewrite the API client library. However in series 3.X we changed the API to be based around resources and not apps so the URLs are very predictable and repeatable. This makes Python API client irrelevant and can be replaced easily with the Requests library (http://docs.python-requests.org/en/master/).

I'm leaning towards archiving the API client project and instead focus on adding examples snippets using Requests.

Bastian
Posts: 7
Joined: Tue Dec 04, 2018 6:18 pm

Re: mayan-api_client not working with Mayan 3.1.9

Post by Bastian » Tue Mar 12, 2019 12:54 pm

Hi and thanks for your reply.

Ok, so I'll try to setup a connection between our CRM and Mayan purely on the requests library.

Best regards,
Bastian

Post Reply