Can you please let us know which API you are trying to test in sandbox? Thanks.
Sandbox is populated with limited sample data. When you make an API request in sandbox, you will get a canned response back. Sandbox testing is typically used for understanding the API and its interface. I do not believe what you are trying to do will work in sandbox. However, you can certainty test your use case in the certification environment.