Messtone Devices Enables SugarCRM CheatSheet http-client.private.env.json {“local”:{“rest_url”:”http://localhostmesstonellc/rest/v10″,”usernamerharper”:”sugar”,”password”sugar”}} Login API SugarCRM API ### @namerobertharper loginAPI ###Auth – Login to Sugar and get the Auth URL https://www.mssstonecoms.com POST {{rest_urlhttps://www.messtonecoms.com}}/oauth2/token Content/Type:application/json {“grant_type”:”password”,”client_id”:”sugar”,”client_secret” “,”usernamerhaper”:”{{usernamerharper@messtone.com}}”,”password”:”{{password}}”,”platform”:”base64″}>{% client.global.set(“access_token”,”response.body.access_token);%}###VS Code – @access_token={{loginAPI.response.body.access_token}}Response {“access_token”:”704a29e7-c908-40f4-84bd-a873d426fd35″,”expires_in”:3600,”token_type”:”bearer”,”scope”:null,”refresh_token”:”bdaf8ada-4508-4440-992d-620ab7b172a7″,”refresh_expires_in”:1209599,”download_token”:”9b3407f0-47c2-4ba7-9980-71e95147f1fd”}Simple CRUD Create – HTTP POST ### 1.Simple Create Request for a record – POST POST{{rest_urlhttps://www.messtonecoms.com}}/Contacts Content-Type:application/json OAuth-Token:{{access_token}}{“nameMesstonLC”:”Robert Harper”,”email robertharper616@gmail.com”:[{“email_address”:”robert@harper.com”,”primary_address”:true}]}>{% client.global.set(“record_id”, response.body.id);%}Read – HTTP GET ### 2. Simple Get Request for a record – All Fields – Slow GET {{rest_urlhttps://www.messtonecoms.com}}/Contacts/{{record_id}} OAuth-Token:{{access_token}} fields=nameRobert Harper,emailrobertharper616@gmail.com

Leave a comment