REST API Developer Guide

REST API Developer Guide

REST API Developer Guide Version 53.0, Winter ’22 @salesforcedocs Last updated: September 9, 2021 © Copyright 2000–2021 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark of salesforce.com, inc., as are other names and marks. Other marks appearing herein may be trademarks of their respective owners. CONTENTS Chapter 1: REST API . 1 What Is REST API? . 2 API Compatible Editions and Development Environments . 2 REST Resources and Requests . 3 REST API Architecture . 4 Compression Headers . 5 Conditional Request Headers . 6 Send REST Requests with cURL . 8 Authorization Through Connected Apps and OAuth 2.0 . 9 Perform Cross-Origin Requests from Web Browsers . 10 Valid Date and DateTime Formats . 11 API End-of-Life . 11 Chapter 2: Quick Start . 12 Quick Start Prerequisites . 13 Step One: Set Up Authorization . 14 Step Two: Walk Through the Sample Code . 14 Using Workbench . 19 Chapter 3: Examples . 21 Getting Information About My Organization . 22 List Available REST API Versions . 22 List Organization Limits . 23 List Available REST Resources . 26 Get a List of Objects . 26 Get an Image from a Rich Text Area Field . 27 Get a List of Objects If Metadata Has Changed . 28 Working with Object Metadata . 28 Retrieve Metadata for an Object . 29 Get Field and Other Metadata for an Object . 30 Get Object Metadata Changes . 31 Working with Records . 31 Create a Record . 32 Update a Record . 33 Delete a Record . 34 Get Field Values from a Standard Object Record . 34 Get Field Values from an External Object Record by Using the Salesforce ID . 35 Get Field Values from an External Object Record by Using the External ID Standard Field . 35 Contents Retrieve a Record Using an External ID . 36 Insert or Update (Upsert) a Record Using an External ID . 37 Traverse Relationships with Friendly URLs . 41 Get Attachment Content from a Record . 45 Get a List of Deleted Records Within a Given Timeframe . 46 Get a List of Updated Records Within a Given Timeframe . 47 Delete Lightning Experience Event Series . 47 Working with Searches and Queries . 49 Execute a SOQL Query . 49 Execute a SOQL Query that Includes Deleted Items . 51 Get Feedback on Query Performance . 52 Search for a String . 53 Get the Default Search Scope and Order . 56 Get Search Result Layouts for Objects . 57 View Relevant Items . 59 Insert or Update Blob Data . 61 Working with Recently Viewed Information . 66 View Recently Viewed Records . 67 Mark Records as Recently Viewed . 67 Managing User Passwords . 68 Manage User Passwords . 68 Working with Approval Processes and Process Rules . 70 Get a List of All Approval Processes . 71 Submit a Record for Approval . 71 Approve a Record . 72 Reject a Record . 72 Bulk Approvals . 73 Get a List of Process Rules . 74 Get a Particular Process Rule . 75 Trigger Process Rules . 75 Using Event Monitoring . 76 Describe Event Monitoring Using REST . 77 Query Event Monitoring Data with REST . 78 Get Event Monitoring Content from a Record . 79 Download Large Event Log Files Using cURL with REST . 79 Delete Event Monitoring Data . 80 Query or View Hourly Event Log Files . 81 Using Composite Resources . 83 Execute Dependent Requests in a Single API Call . 83 Update an Account, Create a Contact, and Link Them with a Junction Object . 86 Update a Record and Get Its Field Values in a Single Request . 87 Upsert an Account and Create a Contact . ..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    332 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us