Hello there,
I am currently testing the API of Dolibarr. It has some calls that might be helpful, but could have more. What I came here for is to ask about the “GET mos” call.
When I try this call on the explorer of my site it gives me the following:
This is a test server on V15.0.2, were there are over 100 MOs in the system.
What is the problem here?
Hope you can help explain.
I believe those parameters should give me the 10 first mos according to the rowid.
I have, as mentioned before, over 100 MOs in the DB, so I am dumbfounded how that call can’t find anything.
But maybe I am misunderstanding something. If so, please teach me
Hello,
was off for a while.
I tried it and with out commenting lines 182-185 and it gave me a 200 reponse. When I commented it back in it gave me again the 404 response. When commenting out line 182-184 it give me the following:
My assumption is that there is a problem with how the API accesses the MariaDB database, but only for MOs which is weird.
Will look further into it, try to post updates if I find something.
Thank you for the response, it gave me a new viewpoint to look at.
If you have something else, I am looking forword to hearing about it.
I did insert line 186 (return $sql) and commented lines 182-185 out. That was the first try. That gave me a 200 response code, but no repsonse body.
Then I tried line 185 and 186 (return $obj_ret return $sql), lines 182-184 where commented out. The outcome is seen in my picture.
It did give me a 200 response code, but an empty response body. This means somehow the API can not get my MOs.
it is not possible to select the entity from the “Dolibarr REST API Explorer”
On the other hand in the API request via php curl it is necessary to send the id of the entity in the header in the same way as the API key: