[SalesForce] Approval Process on Salesforce using RESTful API

I was reading this idea were it says:

Happy to announce that Metadata API and Change Sets for Approval
Processes will indeed be released in Summer '13.

I was trying:

XXX.salesforce.com/services/data/v27.0/query/?q=select+Id+from+Approval
XXX.salesforce.com/services/data/v27.0/sobjects/Approval/

and seems being working.

Questions

  1. Can I query pending approval and update their status (to Approved/Rejected) through the rest API ?
  2. Should I query or update any other "Approval process" object in order to complete an approval/rejection ?

Best Answer

As far as i remember there are no specific standard REST API to carry approval process.

Having said above one way to achieve this functionality is use apex approval process classes and methods and then use restful apex to form custom REST API's .

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_process.htm

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_rest_code_sample_basic.htm

The combination of both apex approval processing classes and Restful apex can be used to achieve your requirements.The links above is helpful to get started on this

Related Topic