When querying the Salesforce ContentVersion object and including the VersionData field in your SELECT statement, the API returns only one record at a time rather than the standard default of up to 500 records per query call.
Why Only One Record Is Returned
The Salesforce API documentation states that when using the Query API, you may receive fewer than the default 500 records in a QueryResult if the rows are wide — which is the case when retrieving base64-encoded content stored in the VersionData field.
How to Retrieve All Records
To retrieve all ContentVersion records when querying VersionData, use the following approach:
After receiving the initial QueryResult, check the done property:
done is true, all records have been returned.done is false, there are more records to retrieve.When done is false, call queryMore using the queryLocator value returned in the initial QueryResult. Continue calling queryMore until done is true.
In Workbench, this behavior is represented by the "More" button that appears after the first result set — clicking it is the equivalent of calling queryMore.
Query:
Select id,VersionData, Title, Description, FileType,ContentUrl, PathOnClient, ContentSize, TagCsv, Owner.Name, VersionNumber from ContentVersion
000385709

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.