Loading tutorials
@RestResource class with a urlMapping. It covers how Salesforce picks a method to run for each HTTP verb, what each annotation expects, and which mistakes cause errors.4 min read@RestResource and how handler methods get @HttpGet or @HttpPost. It also assumes you know what an HTTP request looks like: a method, a URI, headers, and an optional body.6 min readRestContext.request. This chapter shows where each kind of input lives and how to read it safely. It also covers what to do when the caller sends someth5 min read@RestResource class with @HttpGet and @HttpPost methods, and that you know RestContext.request and RestContext.response. It also assumes you are co5 min read@RestResource class (covered in earlier chapters), know what a bearer token is, and are familiar with profiles and permission sets.7 min read@RestResource class with @HttpGet and @HttpPost handlers, and that you know profiles, permission sets and sharing rules at a basic level. By the end you should be able to explain what an Apex REST service enforces by default and what it does not. You shoul6 min read@IsTest methods, and that you know the AccountRestService resource from earlier chapters. It also assumes you know how SOQL, DML and HTTP status codes work. Here you will test REST handlers without making an HTTP call, cover the error paths, an5 min read@RestResource class7 min read@RestResource class, map HTTP methods with @HttpGet, @HttpPost and the other annotations, and return status codes. It also assumes you know basi7 min read@RestResource class with @HttpGet and @HttpPost methods and read the request through RestContext. It also assumes you know SOQL, DML, and the basics of Apex tests. Here you will see how governor limits apply to a REST call and how to design endpoints tha7 min read