Deploy Using REST

You can use the Metadata REST API with all deployments, either via the new deployRequest REST resource or via the Salesforce CLI.

Who: You need to have the Modify Metadata permission (in beta) or the Modify All Data permission to perform deployments, including those using Metadata REST API for Deploy.

Why: By default, the Salesforce CLI uses SOAP for deployments. Deployments using REST aren’t bound by the 39 MB .zip file size limit that applies to SOAP deployments. The limit for the number of components that are uncompressed into an unzipped folder after upload is the same for both SOAP and REST deployments.

How: You can enable the Metadata REST API for Deploy in the Salesforce CLI by using a CLI runtime configuration value. For more about setting CLI runtime configuration values, see the Salesforce DX Developer Guide.

To enable the Metadata REST API for Deploy beta feature:
sfdx force:config:set restDeploy=true

After Metadata REST API for Deploy is enabled for the Salesforce CLI, deployments initiated using the mdapi:deploy or source:push commands use REST.

For more information about using Metadata API’s deployRequest resource, see the Metadata API Developer Guide.