url = f"{instance_url}/services/data/{version}/tooling/query"
params = {
"q": "SELECT Id, SubscriberPackageId, SubscriberPackage.NamespacePrefix, SubscriberPackage.Name,SubscriberPackage.Description,SubscriberPackageVersion.PublisherName,SubscriberPackageVersion.Name, SubscriberPackageVersion.MajorVersion, SubscriberPackageVersion.MinorVersion,SubscriberPackageVersion.Description,SubscriberPackageVersion.Id, SubscriberPackageVersion.IsManaged,SubscriberPackageVersion.IsBeta,SubscriberPackageVersion.PatchVersion,SubscriberPackageVersion.InstallValidationStatus,SubscriberPackageVersion.IsDeprecated,SubscriberPackageVersion.IsPasswordProtected,SubscriberPackageVersion.IsSecurityReviewed,SubscriberPackageVersion.PostInstallUrl,SubscriberPackageVersion.ReleaseNotesUrl,SubscriberPackageVersion.ReleaseState,SubscriberPackageVersion.IsOrgDependent,SubscriberPackageVersion.BuildNumber,SubscriberPackageVersion.Dependencies,SubscriberPackageVersion.Profiles,SubscriberPackageVersion.CspTrustedSites FROM InstalledSubscriberPackage ORDER BY SubscriberPackageId"
}
response = requests.get(url, headers=auth_obj.get("headers"), params=params)
For this SOQL i am getting the following error:
{"message":"An unexpected error occurred. Please include this ErrorId if you contact support: 1483921004-509561 (733720480)","errorCode":"UNKNOWN_EXCEPTION"}
Tried using Tooling Query API v51, v56 and v62 yet same result. However on the developer console the following query worked
SELECT Id,SubscriberPackage.Id, SubscriberPackage.NamespacePrefix, SubscriberPackage.Name, SubscriberPackageVersion.Id, SubscriberPackageVersion.Name, SubscriberPackageVersion.MajorVersion, SubscriberPackageVersion.MinorVersion, SubscriberPackageVersion.PatchVersion, SubscriberPackageVersion.BuildNumber FROM InstalledSubscriberPackage ORDER BY SubscriberPackageld
simple_salesforce
does it for you salesforce.stackexchange.com/questions/381371/…