+ Start a Discussion
Aakanksha Singh 11Aakanksha Singh 11 

How can we write subqueries in REST explorer on workbench?

Hello Everyone,

Greetings!!

I want know how SOQL subquery can be written in  REST explorer on workBench, for example, I have to fetch accounts and related contacts with the following SOQL query:

-> SELECT Id,Name,(SELECT Id,Name FROM Contacts) FROM Account

How this query could be written IB REST Explorer?

Please respond. Thanks in advance.

Regards
Aakanksha Singh
Best Answer chosen by Aakanksha Singh 11
Amit Chaudhary 8Amit Chaudhary 8

Please try below URL
/services/data/v39.0/query/?q=SELECT+Id,Name,(SELECT+Id,Name+FROM+Contacts)+FROM+Account+limit+10

User-added image

Let us know if this will help you
 

All Answers

Amit Chaudhary 8Amit Chaudhary 8

Please try below URL
/services/data/v39.0/query/?q=SELECT+Id,Name,(SELECT+Id,Name+FROM+Contacts)+FROM+Account+limit+10

User-added image

Let us know if this will help you
 
This was selected as the best answer
Aakanksha Singh 11Aakanksha Singh 11
Hello Amit,

Thanks for Helping.