Migrating API v4.1 Integration to SuiteCRM 8.5.1 (V8 or GraphQL)

Hello there

I’m encountering issues migrating a critical portion of our business integration to SuiteCRM 8.5.1. The integration relies on API v4.1, which appears to have compatibility problems in our installation.

Could someone please assist me in migrating this integration to either SuiteCRM’s V8 API or GraphQL?

Here’s the relevant code snippet:

$set_document_revision_parameters = array(
				"note" => array(
					'id' => $id_document_crm,
					'file' => $base64,
					'filename' => $fileName,
					'revision' => $revision_new

$set_document_revision_result = 
				@@id_document_revision = $set_document_revision_result->id;

Note that API v4 should still work in v8. So it might be better for you to just work on fixing the specific problem you’re facing, before attempting a full migration to GraphQL (which I would advise, but maybe you don’t have to rush it).

Hey pgr

I appreciate your response. I’m curious about shifting to GraphQL, but I’m struggling to find or enable the /api/graphql endpoint in my setup im migrating from 7.14.3 to 8.5 to 8.5.1 . Any chance you could help me locate it or enable it?

Additionally, any tips or resources on how to begin the migration process from API v4 to GraphQL would be greatly appreciated.

If you have a working v8, you have a working GraphQL endpoint, because everything in v8 goes through the API, the entire app goes through that (unlike in v7, where the API was only for external access, for integrations).

There isn’t much documentation on this, but there are some tips here

and something about custom endpoints here:

Hi i have been investigating this days about the topic and on git i found the solution of how to upload the document on the V8 api( Update the V8 Api to allow for upload of documents similar to notes by Mac-Rae · Pull Request #8910 · salesagility/SuiteCRM (github.com)).

And i’ve come across another issue. What if I need to perform a document revision? Upon reviewing the code, I noticed that the revision parameter is hardcoded to 1 during document upload. Additionally, when attempting to use the DocumentRevision module as suggested in this post, I found that it doesn’t allow for document uploads directly from that module via the API.

Do you have any ideas where this how do i asasociate a new document to an existing one creating a revision via api or database at this point whatever will work for me?

I don’t have specific ideas, no, because I’ve never used this.

But I guess you have two alternative paths:

  • fix API code to expand it, make it do what you need it to do (it’s all open-source), and contribute to the main product
  • create a custom API endpoint that does what you need using PHP and SuiteCRM bean objects. This is easiest and gives you infinite customization possibilities.

Your link takes me to API v8 code, are you sure you don’t want to go with GraphQL? I would definitely recommend GraphQL for any new custom code that is aimed at SuiteCRM v8…