mayan-api_client not working with Mayan 3.1.9

Anything concerning integration via the REST API
Post Reply
Bastian
Posts: 12
Joined: Tue Dec 04, 2018 6:18 pm

mayan-api_client not working with Mayan 3.1.9

Post by Bastian »

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
Developer
Developer
Posts: 522
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: mayan-api_client not working with Mayan 3.1.9

Post by rosarior »

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: 12
Joined: Tue Dec 04, 2018 6:18 pm

Re: mayan-api_client not working with Mayan 3.1.9

Post by Bastian »

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

User avatar
rosarior
Developer
Developer
Posts: 522
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: mayan-api_client not working with Mayan 3.1.9

Post by rosarior »

We added some initial examples using Requests: https://gitlab.com/mayan-edms/mayan-edm ... rs/api.rst

These should be available in the normal address (docs.mayan-edms.com) once the release of version 3.1.10 is complete (which should happen in the next few hours).

Post Reply