REST API V8 for Bitnami Container Version

I’ve spend hours trying to make the REST Api V8 to work on a Docker Setup with the Bitnami container.
Finally I got it running at it was actually in the end quite easy. I would like to share the outcome with all of you the help other struggling with the same issue.
From the official Documentation only the part with the keys is relavant for the bitnami container. All the rest is already setup it should be.

In the last step of the cert creation. Make sure that you use the correct user.
In my case the user from the bitnami setup is daemon.
So use the following line to set the ownership for the key:

sudo chown daemon:daemon p*.key

The second part which drove me nuts was the actual endpoint URL:

For the bitnami setup you need to use {{suitecrm.url}}/legacy/Api/access_token.

If you are using an ssl reverse proxy. Make sure us also add the API endpoint correctly there.

3 Likes

Would be great to add this to the docs, for all users to get a better experience when they start with the REST API v8 on the Bitnami docker containers.

1 Like

You and I were making the same discoveries and suffering through the same headaches at the same time. I came to the exact conclusions as you. The /legacy/ piece was a big one as I couldn’t figure out why I was getting a 404 when I’d gone through all the rest of the steps (as well as determining the daemon: daemon magic). The documentation on suitecrm’s site is woefully lacking. And why the product wouldn’t just install with APIs functional out of the box is beyond my ability to comprehend.

I can explain.

The documentation is a kind of wiki, and it is maintained by the community. But no one added this to the docs, so it’s missing.

You could suggest an edit.

JSON-API doc

The thing is that this only applies to the setup via Docker with the Bitnami container. The changes which have been made are from Bitnami and not from suiteCRM. If you follow the suiteCRM setup, then the Rest API would work as expected.
Unfortunately this is not documented on the Bitnami side either. At least not that I found something.

1 Like

Looks like this is 2 issues.

  1. Set ownership of the key files used by the API to match the username Suite uses to run, in the Bitnami docker container, daemon.
  2. Would the API URL issue with the Suite 8 Bitnami docker container be that it is missing the Apache RewriteRule in the .htaccess file, located in the Suite 8 base directory? So you have to go to the API URL by including the /legacy/ in the URL, which will use the /legacy/.htaccess file?