How to Create a Public RESTful Web Service on a Force.com Site

Trey AroseSalesforce, Technical TipsLeave a Comment

How to Create a Public RESTful Web Service on a Force.com Site

In the following tutorial we make a simple RESTful Web Service on a Force.com site. So lets get started, we will first create a Apex class by navigating to Your Name | Setup | Develop | Apex Classes | New Below is the  Apex code, @RestResource(urlMapping=’/myservice’) global class MyService { @HttpGet global static String doGet() { String name = RestContext.request.params.get(‘name’); return ‘Hello ‘+name; } } Now the next step is to make this Apex class accessible via Public URL. Navigate to Your Name | Setup | Develop | Sites   Click the name of the site you want to control. … Read More