I'm trying to script sugar via a CURL. I hit the login page then try to post
First the login:
curl -c /tmp/sugar_cookie -d "module=Users&action=Authenticate&return_module=Us ers&return_action=Login&cant_login=&login_module=H ome&login_action=index&login_record=&user_name=ric hard&password=mypassword" my_sugar_url_goes_here
Then I try to post a "Time Tracking" record onto a Case:
curl -c /home/richard/sugar_cookie -d "module=cstmp_Time_Tracking&record=&isDuplicate=fa lse&return_action=DetailView&return_id=timetrackca se002&contact_role=hidden&relate_id=timetrackcase0 02&offset=1&action=Save&assigned_user_id=4dbbe8c6-e445-3fd6-97bc-464e3165d968&assigned_user_name=richard&billable=0 &button=Save&contact=&contact_id_c=&contact_role=& department=Programming&description=&isDuplicate=fa lse&module=cstmp_Time_Tracking&offset=1&record=&re late_id=timetrackcase002&relate_to=cstmp_time_trac king_cases&return_action=SubPanelViewer&return_id= timetrackcase002&return_module=Cases&task=Coding&t ime_tracking_date=2009-09-03&total_hours=8" "https://my_sugar_url_goes_here/index.php"
However I think the authentication is failing for some reason. Is there a more sane way to do this that doesn't require me to learn every inner detail of the SUGAR API? Is there a tutorial for quick/dirty scripting of the sugar web-services via perl or PHP, or Java or similar?
TIA!


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks