0

I know it's possible to make Apex class methods available as a REST service with annotations. I also know it's possible to make a call to an external web service from an Apex class. Can I combine the two?

Example: I create an Apex class with REST methods. The REST Apex methods within that class in turn calls another third-party web service, gets data, and my Apex REST class returns the results from the third-party web service. I'm trying to wrap the third-party REST call in my Apex class, i.e., make Salesforce the middleman.

1 Answer 1

2

Yes, you can perform a callout from an Apex REST service. An Apex REST transaction has the normal synchronous limits (100 callouts per transaction, 120 seconds total callout time, 6MB maximum response size). However, you cannot recursively call Salesforce (including other Apex REST services) from Apex REST.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .