Download Dataset with POST Access and signedUrl not incrementing download count
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
Downloading a zip of a dataset from the Modern UI isn't triggering an increment of the download count.
It can be reproduced by making the same API calls as the UI, below.
What steps does it take to reproduce the issue?
-
create a dataset with a file and publish it
-
Check that the download count:
curl -sS
-H "X-Dataverse-key: $API_TOKEN"
"$SERVER/api/v1/datasets/$DATASET_ID/download/count" | jq . -
Do a post to get the signed URL
SIGNED_URL="$(
curl -sS -X POST
-H "X-Dataverse-key: $API_TOKEN"
"$SERVER/api/v1/access/dataset/$DATASET_ID?format=original"
| tee /tmp/dataverse-signed-url.json
| jq -r '.data.signedUrl'
)"
echo "$SIGNED_URL"
-
Use the signed url to download the file:
curl -fL
-o /tmp/dataset.zip
"$SIGNED_URL" -
Check the download count again, it isn't incremented:
curl -sS
-H "X-Dataverse-key: $API_TOKEN"
"$SERVER/api/v1/datasets/$DATASET_ID/download/count" | jq .
-
When does this issue occur?
From the Modern UI, downloading zip file from a dataset -
Which page(s) does it occurs on?
Dataset page -
What happens?
download count is not incremented -
To whom does it occur (all users, curators, superusers)?
all -
What did you expect to happen?
should increment count
Which version of Dataverse are you using?
Any related open or closed issues to this bug report?
Screenshots:
No matter the issue, screenshots are always welcome.
To add a screenshot, please use one of the following formats and/or methods described here:
Are you thinking about creating a pull request for this issue?
Help is always welcome, is this bug something you or your organization plan to fix?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the POST /api/v1/access/dataset/$DATASET_ID?format=original request and then downloading its signedUrl, comparing the download count before and after. Trace the access and download-count entry points used by the Modern UI; done means the count increments for this dataset ZIP download.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100