- Use @RestResource annotation in class
- Define URL mapping on class level
- wild character * can use
- URL mapping is case sensitive
- apex class defined as global
- can’t have multiple method with same annotation
- Use below annotation in methods
- httpget-No parameter
- httpPOST
- httpPUT
- httpPATCH
- httpDelete-No parameter
- Allowed Return type and parameter
- Apex primitive type
- sObject
- List or Map of apex primitive or sObjectType
- User defined type
- All http methods should be declared as static
Leave a comment