Hey,
Can you share the output format of the REST API?
Below can be 1 of the methods:
Use web activity to get the result of REST API and leveraging the web activity output, you can use If activity with @empty() expression to check whether the output is present or empty.
If empty then ignore else leverage Copy activity