Refer to the comments within the script for more information on the json structure in which data has to be send in the API call for sharing a request.The script to do this is available here.
Execution steps:
1. Download and copy the script file into the \Manageengine\ServiceDesk\integration directory.
2. Update the protocol , servername and portnumber use to access ServiceDesk and the technician api key in the script file.
3. Configure the script under the Admin -> Custom Triggers . Provide the path of the request json file as the input to the script.