Add total file count to GetDatasetFiles use case
GPortas opened this issue · comments
Overview of the Feature Request
As for the Dataset previews, the GetDatasetFiles should be extended to return the total file count, which is necessary for pagination.
We should follow the same implementation as for DatasetPreviewSubset.
This feature depends on: IQSS/dataverse#10202
What kind of user is the feature intended for?
- Use case consumer
What inspired the request?
What existing behavior do you want changed?
GetDatasetFiles use case to include total file count
Any brand new behavior do you want to add to Dataverse?
None
Any open or closed issues related to this feature request?
Waiting. This feature depends on: IQSS/dataverse#10202
The issue to extend the API is already merged but I can't get the totalCount from the API using curl "http://localhost:8000/api/datasets/306/versions/1.0/files"
I'm using the docker image with the unstable tag
(base) melina@MacBook-Air-de-Melina dataverse-frontend % curl "http://localhost:8000/api/datasets/306/versions/1.0/files"
{"status":"OK","data":[{"description":"This is an example file","label":"blob","restricted":false,"version":1,"datasetVersionId":92,"dataFile":{"id":307,"persistentId":"","filename":"blob","contentType":"text/plain","friendlyType":"Plain Text","filesize":57,"description":"This is an example file","storageIdentifier":"local://18d13201d79-f33543ee5372","rootDataFileId":-1,"md5":"5637c04c37f35b4be92821acd86dbfba","checksum":{"type":"MD5","value":"5637c04c37f35b4be92821acd86dbfba"},"tabularData":false,"creationDate":"2024-01-16","publicationDate":"2024-01-16","fileAccessRequest":true}},{"description":"This is an example file","label":"blob-1","restricted":false,"version":1,"datasetVersionId":92,"dataFile":{"id":308,"persistentId":"","filename":"blob-1","contentType":"text/plain","friendlyType":"Plain Text","filesize":60,"description":"This is an example file","storageIdentifier":"local://18d13201e70-7f03666e8155","rootDataFileId":-1,"md5":"b32c0efc5ac0d40146c9657dc1212d42","checksum":{"type":"MD5","value":"b32c0efc5ac0d40146c9657dc1212d42"},"tabularData":false,"creationDate":"2024-01-16","publicationDate":"2024-01-16","fileAccessRequest":true}},{"description":"This is an example file","label":"blob-2","restricted":false,"version":1,"datasetVersionId":92,"dataFile":{"id":309,"persistentId":"","filename":"blob-2","contentType":"text/plain","friendlyType":"Plain Text","filesize":40,"description":"This is an example file","storageIdentifier":"local://18d13202011-d3d812463373","rootDataFileId":-1,"md5":"5ebb5c1c15e5f8163f2a76efba6fd109","checksum":{"type":"MD5","value":"5ebb5c1c15e5f8163f2a76efba6fd109"},"tabularData":false,"creationDate":"2024-01-16","publicationDate":"2024-01-16","fileAccessRequest":true}}]}%