Hello everyone, for the last few days I have been trying to access the Suite API without success.
I did all the steps in the documentation and I managed to access the authentication path correctly, that’s where I got the token from, but the only paths that work for me are the ones offered by the swagger.json file (which can’t even be read in the swagger app), otherwise the paths that the documentation offers don’t work.
I’ve tried ‘module’, ‘modules’, ‘account’, ‘accounts’ but none of them work.
I don’t know what I am doing wrong, I would appreciate if you could help me, with suggestions, with a better guide or with any other help, thank you very much.
I’m using version 7.11.10 running in Apache2 Ububntu, with HTTPS
The method for accessing a counts should look like this {{suitecrm.url}}/V8/module/Accounts/
Give that a go and let me know if you have any success, there is a chance the pathing you are using for suitecrm.url is incorrect therefore could you provided an example of what yours looks like?
Try switching to a GET and try “/Api/V8/module/Accounts”, it is case sensitive on my Ubuntu/Apache2 test setup based on the redirects in the .htaccess file. You also may want to go to the Repair section in the admin panel and run “Rebuild .htaccess file”. I literally just got my access token this morning and saw your post and just tried your path and it didn’t work for me until I changed the case. I am running SuiteCRM 7.11.10 on an Ubuntu VM using Apache2 and Mysql. I set this up to attempt to troubleshoot getting the API to work in my IIS and MS SQL install.
Hmm, sounds like something else is going on… have you done the composer install or composer upgrade from your “/var/www/Path-to-SuiteCRM”? Mine is just in /var/www/html folder so I just changed directory to that folder and ran sudo composer install or composer upgrade depending on if I had run the install yet.
Just to confirm, from the Authorisation tab your able to get a token? If you are the connection is there, just something wrong with the way your paths are configured i would think.
Try this;
What happens when you add a ? on the end of that path? do you get any response?
For example https://your-domain.com/Api/V8/module/Accounts/?
Hitting the URL you provided it appears the .htaccess is configured correctly and is taking action on incoming requests. That lastly leaves me with the API not being configured correctly. Have you used the API before with this instance and if so did you encounter any issues?
I’m not too sure then I’ve been using both the 7.10 and 7.11 latest plus the hotfix branch for testing the API recently and have encountered no issues.
I’m using the following setup, could you let me know yours;
Host: Ubuntu 18.04
Container: Ubuntu 16.04
Service: Apache2 utilising PHP 7.2
Database: Mariadb 10.2
Please note i’m using Docker for the containerised instance which is appropriately configured to allow inbound and outbound traffic
I’m also using Postman to request the access token and make the get requests