Let's say I need to perform complex SOQL Query and there is unable to use GET with queryParams. Is it possible to use POST with query script inside the body? If so could anybody provide a simple example?

1 Answer 1


Yes, you can use the composite request API.

The URL for this is /services/data/v50.0/composite.

Example Payload

  "compositeRequest": [{
    "method": "GET",
    "url": "/services/data/v50.0/query?q=select+id+from+account",
    "referenceId": "query1"

You can also use this to bundle multiple queries in to a single request, as well as other operations, like DML or describe calls.

Feel free to read more in the documentation.

You must log in to answer this question.

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