function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Bill DodsonBill Dodson 

Can I create a Professional Edition Scratch Org without API Enabled

Hello,

When I create a Professional Edition scratch org without specifying the API feature it gets created with API enabled by default.  Is there any way to create a Professional Edition org without API enabled?  I am trying to test a managed package that passed security review and I want to insure API access works in PE orgs without the API feature.  Any help greatly appreciated.  Thanks.
ANUTEJANUTEJ (Salesforce Developers) 
Hi Bill,

I found the below link wherein it states on the configurable values while creating a scratch org:

https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_def_file_config_values.htm

I hope this helps and in case if this was helpful for your scenario can you please choose this as the best answer so that it can be used by others in the future.

Regards,
Anutej
Bill DodsonBill Dodson
Hi Anutej,

Thanks for posting.  I should have mentioned I have already gone through the SFDX documentation.  The documentaiton implies if you specify Professional and do not have API specified in the feature section project-scratch-def.json then you should get a scratch org without API enabled.  However, that is not the case.  It creates a PE org with API enabled.

Here is my project-scratch-def.json file:
{
  "orgName": "Scratch Org",
  "edition": "Professional",
  "hasSampleData": true
}
Here is the command line I use:
sfdx force:org:create -s -f config/project-scratch-def.json -a TestOrg -v DevHub
The result is a Professional Edition scratch org WITH API enabled?  What I am trying to create is PE org without API featre enabled.  So if anyone can help create PE org with no API greatly appreciated thanks.