Salesforce introduces the new FIELDS() function allowing to do things like this:
SELECT FIELDS(ALL) FROM Account LIMIT 200
Instead of this:
SELECT Id, Name FROM Account LIMIT 200
This seems useful in cases where we'd construct a SOQL call based on a parameter of a function, so that now we don't have to do that. Salesforce gave an explanation of why there is such a function:
Why: In previous versions of SOQL, retrieving fields meant specifying all the names of all the fields you wanted to retrieve. Typically, this required first making an API call to describe the object to get the list of fields (or using the Object Manager) and then laboriously constructing a SOQL query to select all those fields. Further, such a query could exceed the query character limit for large complex queries that retrieve lots of data. The new FIELDS() function lets you select all the fields without knowing their names in advance. This eliminates the need for a round-trip to the server to prepare a SOQL statement, eliminates the need for research and a lot of typing, simplifies query statements, and makes it much easier to explore the shape of your objects.
What I can't get my head around is the use case mentioned: Typically, this required first making an API call to describe the object to get the list of fields (or using the Object Manager) and then laboriously constructing a SOQL query to select all those fields.
Could anyone explain perhaps with an example what is meant by making an API call in this example?