Newer Version Available

This content describes an older version of this product. View Latest

When to Use Tooling API

Tooling API facilitates the development of any organization-based user interface or user experience that requires create, read, update, or delete operations to Salesforce metadata. By contrast, Metadata API facilitates the migration of Salesforce metadata from one organization to another.

For example, to complete the following tasks, use the Tooling API:

Manage working copies of Apex classes and triggers and Visualforce pages and components.
Use ApexClassMember, ApexTriggerMember, ApexPageMember, ApexComponentMember, and MetadataContainer .
Manage working copies of static resource files.
Use StaticResource.
Check for updates and errors in working copies of Apex classes and triggers and Visualforce pages and components.
ContainerAsyncRequest
Commit changes to your organization.
Use ContainerAsyncRequest.
Set heap dump markers.
Use ApexExecutionOverlayAction
Overlay Apex code or SOQL statements on an Apex execution.
Use ApexExecutionOverlayAction.
Execute anonymous Apex.
For sample code, see SOAP Calls and REST Resources.
Generate log files for yourself or for other users.
Set checkpoints with TraceFlag
Access debug log and heap dump files.
Use ApexLog and ApexExecutionOverlayResult.
Manage custom fields on custom objects.
Use CustomField.
Access code coverage results.
Use ApexCodeCoverage, ApexOrgWideCoverage, and ApexCodeCoverageAggregate.
Execute tests, and manage test results.
Use ApexTestQueueItem and ApexTestResult.
Manage validation rules and workflow rules.
Use ValidationRule and WorkflowRule.