How do I post data from Drupal 9 when a content is created, post data to Drupal 7 hosted in a different server to create node content.
In Drupal7, I have enabled services module and created a resource to create login session, accept json data and creates node content. This is working fine when I test from POSTMAN.
I am new to Drupal 8/9 and not sure how to post json data to D7. Please could anyone suggest?
so far, i have created a custom module in D9 and have added additional custom_form_submit where I can add code to post data once the node is submitted.
I need to login to D7, grab token, post data to D7 to create node in D7, then logout from D7.
Or can the login process be handled separately via sysadmin configurations like proxy/firewall settings? Both D7 and D9 are hosted in separate servers but in same organisation cloud.
[updated]
Our current D7 app has a lot of custom features used internally within our organisation and externally. We are in the process of migrating the app to D9 prioritising externally accessible features and to keep D7 as legacy system for internal use. We only need 5 fields in ONE cck in D9 to be stored in real time in D7 to continue using D7.
The 5 fields include integer, date&time and list fields. I have tried to maintain the cck and field machine names SAME in both D7 and D9 sites. The rest of the fields in this cck are very different in both sites.