SuiteCRM 8 accessing V8 API

Hi guys,

looking for a step by step guide on getting APIs working on SuiteCRM 8. I have tried following

JSON API :: SuiteCRM Documentation including using the postman API collection just getting a “Page not found” error.

has anyone been able to the V8 APIs working with SuiteCRM 8?

If you’re starting API work with SuiteCRM 8, you should use the new GraphQL API.

Or are you trying to get previous v8 API work to operate correctly in SuiteCRM 8?

hi pgr,

I was trying to get the previous v8 API working that exists in the public/legacy/Api directory; we trying to move off SuiteCRM 7.x to SuiteCRM 8 and we have a number of integrations at the moment that we just wanted to switch over.

Is there some documentation on how to use GraphQL?

Ok, if you’re talking about existing code, then you should just stick with what you have and try to get it to work.

… but I’m afraid I can’t be much help to you with your original issue, I hope someone else can help us here…

Regarding GraphQL I don’t think there is any documentation yet, but I do have a working example of how to do custom entry-point through SuiteCRM 8’s GraphQL API. And there are many examples inside the code:unlike the previous API’s, which were meant just for external integration, the new GraphQL API is for that, but additionally it is a layer that is involved also with every UI interaction in the new UI. So, once you know what to look for, you find plenty of samples in the core code.

Hi @jegans,

We have added to code to try to support retro-compatibility on that area.

Have you tried to point the v8 API requests to the root? like
https://your-domain/Api/V8/module/Accounts/ (or similar)

Was there a solution to this - we are also getting this “Page not found” error.

+1 on this one! I’m in version 7, Using the V8 api. I can get a password grant and a token but any query returns “not found”. I was able to get this returned:

/Api/V8/meta/modules

Not sure what I’m doing wrong or if there is a bug.

The Suite 8 - V8 API works very well here.

The first request goes usually to:

http://example.com/legacy/Api/access_token

Body:
{
    "grant_type": "client_credentials",
    "client_id": "123456-7d68-32b9-553f-677fd18a0ee7",
    "client_secret": "ASecurePasswordSecret"
}

It returns the bearer token and then next request would be against the modules / endpoints:

http://example.com/legacy/Api/V8/module/YOUR_MODULE/123456-e972-b8ff-bede-6724bf59f1c2

I believe, I had “not found” before as well and the issue was related to NGINX + redirects / subdir rules.
On Apache, so far it was running out of the box with mod_rewrite in place.

2 Likes

I’m working in Version 7. There were two issues.

  1. the access_token url is different from request url:
    …Api/access_token

requests go to:
…Api/V8/Module/{module name}

So confusing!!!

Also you have to setup proper rules in .htaccess to route to endpoint!!! It does say this in the docs but it’s not super clear and not highlighted like “do this or it won’t work!!”

Anyway thanks. I’ve now got it working.