Skip to content

Bug: Get article version file list using article version files endpoint#136

Open
HafeezOJ wants to merge 5 commits into
mainfrom
128-bug-only-the-first-10-files-are-retrieved-in-datasets-with-more-than-10-files
Open

Bug: Get article version file list using article version files endpoint#136
HafeezOJ wants to merge 5 commits into
mainfrom
128-bug-only-the-first-10-files-are-retrieved-in-datasets-with-more-than-10-files

Conversation

@HafeezOJ

@HafeezOJ HafeezOJ commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Description

The file list in the article version details returned by the article details endpoint can contain up to 10 files, and there is no way to retrieve the file list for prior versions of an article if the article has more than one version. This is due to a bug in an update released by Figshare in September, 2025. Figshare has since rolled back the article version details endpoint to include a list of all the files in an article.

Figshare also released an endpoint (/articles/{article_id}/versions/{version_id}/files) to obtain a specific article version's file list, which can be paginated to retrieve all the files in an article. This PR uses the article version file list endpoint to retrieve a list of all the files in an article.

See #128

Documentation Update

  • I have updated README.md and other relevant documentation
  • No documentation update is needed

Implementation Notes

Uses /articles/{article_id}/versions/{version_id}/files

@HafeezOJ HafeezOJ linked an issue Jun 16, 2026 that may be closed by this pull request
1 task
@HafeezOJ HafeezOJ self-assigned this Jun 16, 2026
@HafeezOJ HafeezOJ marked this pull request as ready for review June 16, 2026 23:04
@HafeezOJ HafeezOJ requested a review from zoidy June 16, 2026 23:04
Comment thread figshare/Article.py
Comment on lines +471 to +473
if retries > self.retries:
break
return article_version_files

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that if the max number of retries are exceeded, the code will return a partial list of article_version_files?

Comment thread figshare/Article.py
Comment on lines +477 to +478
if retries > self.retries:
break

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the max number of retries are exceeded, this code will break out of the outer loop and the function returns nothing. Is that right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Only the first 10 files are retrieved in datasets with more than 10 files

2 participants