The Complete Salesforce API Landscape
The Complete Salesforce API Landscape
Categorized architecture, strict use cases, and rapid-recall patterns for technical interviews.
To ace a Salesforce Architect or Developer interview, you must look past basic API definitions. You need to know why you would choose one API over another based on data volumes, transaction boundaries, and system constraints. Here is your quick-revision blueprint.
API Landscape At-A-Glance
- Core Data APIs: For standard CRUD operations on CRM records (REST, SOAP, Bulk 2.0, Pub/Sub, Composite).
- Custom Development APIs: For exposing custom Apex backend logic (Apex REST, Apex SOAP).
- Metadata & Tooling APIs: For modifying platform structures, configurations, and CI/CD operations.
- Specialized UI & Sub-System APIs: Tailored for frontend frameworks, UI data bundles, and specific clouds (GraphQL, UI API, Connect REST).
Core Data APIs
REST API (Synchronous)
Lightweight HTTP-based framework interacting with individual rows via JSON or XML payloads.
| Use Case: | Real-time, lightweight web or mobile application integrations. |
| Benefits: | Easy to test, natively handles JSON, stateless, highly scalable for small transactional loads. |
SOAP API (Synchronous)
Rigid, strongly typed, contract-based framework utilizing strictly XML payloads and WSDL files.
| Use Case: | Legacy system integrations or high-security financial middleware tracks. |
| Benefits: | Strict type safety via WSDL mapping prevents runtime data schema format mismatches. |
Bulk API 2.0 (Asynchronous)
High-throughput background loading framework designed to digest raw CSV text streams.
| Use Case: | Data warehouse syncs, initial system migrations, large data backups. |
| Benefits: | Bypasses standard transaction limits, automatically fragments files up to 150 million rows daily. |
Pub/Sub API (Event-Driven / gRPC)
Bi-directional, event-driven architecture streaming Platform Events and CDC via HTTP/2 channels.
| Use Case: | Real-time replication pipelines or loosely coupled messaging middleware setups. |
| Benefits: | High performance via binary Apache Avro formats; eliminates heavy custom REST polling loops. |
Composite API (Synchronous)
Orchestration engine packing up to 25 separate execution threads inside a single HTTP roundtrip.
| Use Case: | Deep hierarchical inserts (Parent-Child-Grandchild operations) in one transaction. |
| Benefits: | Saves API limits drastically by passing outputs from step A dynamically into step B as inputs. |
Custom Development APIs
Apex REST & Apex SOAP APIs
Custom exposed web services crafted using @RestResource or webservice global modifiers in Apex code.
| Use Case: | Exposing custom server-side validation or combining multi-object actions that standard endpoints can't handle. |
| Benefits: | Enforces complex, customized server-side logic and validation before any record changes are applied. |
Metadata & Tooling APIs
Metadata API vs. Tooling API
Structural control endpoints interacting with environment configuration schemas, layouts, and system customization files.
| Use Case: | Metadata: Core deployments / DevOps pipelines. Tooling: IDE development, code editors, granular log retrievals. |
| Benefits: | Automates deployment management; Tooling API provides fine-grained, fast access to smaller configuration slices. |
Specialized UI & Sub-System APIs
GraphQL API & UI API
Client-side UI engines built to fetch data alongside context layout rules simultaneously.
| Use Case: | Powering Lightning Web Components (LWC), custom web portals, and performance-optimized mobile layouts. |
| Benefits: | GraphQL avoids over-fetching data by returning exactly the fields requested in a single call. UI API matches user permissions automatically. |
Connect REST API
Specialized programmatic layer mapping back to cloud features like Chatter feeds, Experience sites, and Commerce features.
| Use Case: | Building customized social networking layers, B2B commerce shopping experiences, or custom frontends for CMS. |
| Benefits: | Returns responses pre-formatted for human reading (e.g., parses Chatter text links automatically). |
⏱️ Pre-Interview Flash Recap
- Use Bulk API 2.0 when data exceeds 50,000 records.
- Use Composite API instead of looping standard REST API calls to avoid hitting request rate limits.
- Choose GraphQL API for mobile applications to reduce data usage and network payloads.
- Remember that Metadata API operates on structural configurations, while the Tooling API runs faster on smaller metadata subsets.
Comments
Post a Comment