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
Nabeel Munir 9Nabeel Munir 9 

how to make sure that endpoint is accessible from apex class?

How does apex makes callouts to external system? how do i know that the enpoint that is specified in apex class is accessible?
Greg HGreg H
My first thought is to verify that the top level domain of the endpoint is added as a remote site within the Org. Search for "Remote Site Settings" in Setup.

Another option is using named credentials to make your callout. A named credential doesn't require the remote site settings. More details can be found in the developer guide: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_named_credentials.htm
-greg