Apex Integration Services
AccountManager.apxc @RestResource(urlMapping='/Accounts/*/contacts') global with sharing class AccountManager { @HttpGet global static Account getAccount() { RestRequest request = RestContext.request; // grab the caseId from the middle of the URL String accountId = request.requestURI.substringBetween('Accounts/','/contacts'); Account result = [SELECT Id, Name, (Select Id, Name from Contacts) FROM Account WHERE Id = :accountId]; return result; } } AccountManagerTest @IsTest private class AccountManagerTest { @isTest static void testGetContactsByAccountId() { ...