netlify / netlify/open-api

/sites/site_id/files endpoint does not respect pagination

Open
#257 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
323
Forks
133
Avg merge
2d 8h
Merged PRs (30d)
2

Description

According to the documentation, requests that return multiple items are paginated and should return pagination info on the response header. However, when querying endpoint

/sites/site_id/files?page=1&per_page=10

I always get all items returned and the link header is absent. In contrast

/sites?page=1&per_page=10

works as expected and a link header is returned. As the files endpoint may return huge lists, pagination is really needed. I hope this can be fixed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the implementation or specification entry point for the /sites/site_id/files endpoint and compare it with /sites, which already handles pagination. Review the linked Netlify pagination documentation and reproduce the request with page=1 and per_page=10. Done means the files endpoint limits returned items and provides the expected pagination link header.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.