I've been experimenting with a build script to generate a scratch org based on a Devhub that uses external API calls.
Ideally this script would
- Build the scratch org and add Remote Site Settings for APIs
- Push Code to the scratch org
- Call APIs in testing, etc...
Based on my research, this may not be a feature available; but I was curious if anyone knew a workaround.
Here's a basic project-scratch-def.json:
{
"orgName": "Scratch Org",
"language": "en_US",
"sourceOrg": "00DXXXXXXXXXXXXX",
"features": ["EnableSetPasswordInApi"],
"settings": {
"lightningExperienceSettings": {
"enableS1DesktopEnabled": true
},
"mobileSettings": {
"enableS1EncryptedStoragePref2": false
},
"securitySettings": {
"passwordPolicies": {
"minimumPasswordLifetime": false
}
},
"remoteSiteSetting": {
"fullName": "APINAME",
"url": "https...",
"isActive": true
}
}
}
I've tried placing remoteSiteSetting[s] in multiple places just to see if I get a hit.
It is listed in the Metadata here.
Anyone have any thoughts?