RestResource Annotation

The @RestResource annotation is used at the class level and enables you to expose an Apex class as a REST resource.

These are some considerations when using this annotation:

URL Guidelines

URL path mappings are as follows:

The rules for mapping URLs are:

The URL for a namespaced classes contains the namespace. For example, if your class is in namespace abc and the class is mapped to your_url, then the API URL is modified as follows: https://instance.salesforce.com/services/apexrest/abc/your_url/. In the case of a URL collision, the namespaced class is always used.

© Copyright 2000–2012 salesforce.com, inc. All rights reserved.
Various trademarks held by their respective owners.