Inquiry Regarding GoFast API Integration and webhook
-
Hello,
I trust this message finds you well.I am currently engaged in integrating the Gofast API and Alfresco API for file transfers within the Odoo platform.
However, I've encountered limitations with the current version of the GoFast API, as the responses are quite basic and lack in-depth insights compared to the Alfresco API.I am reaching out to inquire whether there are plans to enhance the GoFast API in upcoming versions, aligning it more closely with the functionalities of the Alfresco API.
Specifically, I am interested in collaborating to expand the endpoints related to Alfresco, such as creating different workspaces and facilitating the transmission of documents while capturing their Alfresco ID.Additionally, I have noticed that the webhook developed for the integration between Odoo and GoFast in the past is currently not functional in the community edition.
I would appreciate clarification on whether this is intentional or if there is an aspect that needs attention.Thank you for your time and consideration.
Kind Regards,
Victor. -
Hello @Victor_TEOS
GoFAST API and Alfresco API can work complementarily, depending of your objectives.
Alfresco API is the best to use to work on a file level, create folders, retrieve list of files, ..
While GoFAST API is the best to use when you want to work with collaboration or administration features of the platform.For your example, creating a collaborative space and managing the members can only be done using GoFAST API.
Then you can use the Alfresco CMIS API to navigate within the files, post document, get documents, list folders etc..
We're constantly making the API evolve so don't hesitate to share with us what could be missing
For the webhook module, it is currently not available in the community edition but should be available soon. (cc. @allan.muzeya), we'll keep you informed !
Have a great day !
-
Hello @jlemangarin,
I appreciate the valuable insights you've shared regarding the API of Gofast. However, I've encountered a concern that I believe could enhance the functionality of the API, particularly for our ongoing integration efforts.
The API, designed for basic interaction with Drupal’s Organic Groups, employs a PUT request to create collaborative spaces. Here are the details:
API Endpoint:
PUT: /api/space/spaceRequest Header:
- Content-Type: application/json
Request Body:
- gid*: Parent space node number
- title*: New space title
- body: Home page content (HTML format)
Response:
- Header:
- Content-Type: application/json
- Body:
- gid: Number of the space created
While the API successfully returns the Gofast ID (
gid
) of the created space, I've observed that obtaining the Alfresco ID for administrative manipulation (Subjective) takes at least 30 seconds and is not instantaneous.Considering the requirements of our integration, I'd like to suggest the possibility of enhancing this API to include the Alfresco ID in its response. This addition would greatly facilitate a more comprehensive manipulation of the created space on a deeper level.
I believe such an improvement would significantly contribute to the effectiveness and efficiency of our integration. Thank you for considering this suggestion.
Best regards,
Victor. -
Hello @Victor_TEOS
We are absolutely able to return the full node (including the Alfresco reference) instead of only the node ID (gid) if needed, but just to be sure what would be the usage for you to have the Alfresco reference of the space ?
Just want to make sure it is not for example to manage the space members as this is done using the nid/gid, not the Alfresco Reference.
Have a great day !
-
Hello @jlemangarin,
This setup is crucial for obtaining the Alfresco ID using the space's name, enabling further manipulation of the space, such as creating subspaces and adding documents and templates.
As you're aware, GoFast lacks an API that allows the retrieval of a space's ID based on its name. Therefore, we are leveraging the Alfresco API to obtain the space IDs. Currently, if the API output includes the Alfresco ID, it removes the need to wait for 30 seconds or more to retrieve it from Alfresco. Integrating the Alfresco ID directly into the output of the aforementioned API call would significantly enhance efficiency for us in this phase.
Kind Regards,
Victor. -
Thank you for your answer !
This setup is crucial for obtaining the Alfresco ID using the space's name, enabling further manipulation of the space, such as creating subspaces
To create a subspace, you don't need the Alfresco ID (Which we call Reference or Alfresco Reference) but the Node/Group ID (nid,gid), using the 'gid' parameter to specify the parent space in the PUT: /api/space/space API.
and adding documents and templates
Having the Alfresco Reference for this case could only be useful if you want to use the CMIS protocol, if you use GoFAST API with the POST: /api/node/node endpoint or WebDAV API, what you need is the path of the space/directory
As you're aware, GoFast lacks an API that allows the retrieval of a space's ID based on its name.
Yes there is no API providing the direct ability to give a string and get a space if it exists, however thhere is an autocomplete API providing the close same feature. Please look at the GET: /api/node/autocomplete endpoint.
it removes the need to wait for 30 seconds or more to retrieve it from Alfresco
Please note that because of an Alfresco limitation currently, you may still have to wait a few moment after you have created a space (<1min) before you can put content in it. This is because the Alfresco permissions are retrieved from our internal LDAP every minute.
Have a great day !
-
Hi @jlemangarin,
Waiting for a short duration before adding information is very okay for me. However, I'd like to propose a modification that would significantly enhance our code efficiency in our ongoing integration project.
Currently, I have a function that creates spaces using the GoFast API. After calling the
api/space/space
endpoint and obtaining the GID, I retrieve and return it. Subsequently, another function is invoked to query the Alfresco API and check if the space has been successfully created. The Alfresco ID is then returned, facilitating future manipulations of the folder.If it's feasible to include both the Gofast ID and Alfresco ID in the initial response, it would greatly simplify the process. This way, I can efficiently retrieve and store both IDs simultaneously, allowing for a brief delay before populating the space.
Thanks a lot.
Victor. -
Anyway it could be useful to return the entire node instead of just the gid so I'll reference this in our internal tracker : GOFAST-11382
I'll tell you when it can be done, if you are working in Community I can also give you the patch to apply when it is done
-
Hello @jlemangarin
Yes, I am actually working on the community edition; the development will be very helpful. Also, any idea when the webhooks will be added to the community too? I mean, the webhook that was developed for the GoFast Odoo integration? It will be nice to see it working in the community edition too. Thank you for your quick responses; they were really helpful.Kind Regards,
Victor.