Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination parameters required #157

Merged
merged 3 commits into from
May 20, 2023
Merged

Pagination parameters required #157

merged 3 commits into from
May 20, 2023

Conversation

sbecker59
Copy link
Owner

@sbecker59 sbecker59 commented Feb 18, 2023

Statuspage is making important performance-based changes to the authenticated REST API by enforcing pagination for a specific set of endpoints. If you have an existing integration with our REST API, you may need to make changes to your REST API calls to accommodate these changes, so please read on to understand the details.

Which endpoints are affected?

What's changing?

As of Aug 31, 2022, all GET requests made to the above endpoints accept the following pagination parameters, which are both initially optional:

  • page - Page offset to fetch
  • per_page - Number of results to return per page (note: for backward compatibility, /pages/{page_id}/subscribers will continue to use the limit query parameter)

These parameters will instruct the REST API to return a paginated set of results for a given endpoint, specifically returning up to per_page results that are offset by page. Previously, all GET requests to the above endpoints would have returned the full set of results without being paginated or truncated. Example request and response bodies for each endpoint can be viewed by referencing our API documentation.

As of Feb 28, 2023, all GET requests made to the above endpoints will have default values unless explicitly specified:

  • page - 1st page
  • per_page - 100 results

Requests that omit these parameters will return a truncated set equivalent of ?page=1&per_page=100 instead of the full set of results.

This PR was create by combining the following PRs:

#156 build(deps): bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.24.1 to 2.25.0
#156 build(deps): bump goreleaser/goreleaser-action from 3.2.0 to 4.2.0
#155 build(deps): bump actions/cache from 3.0.11 to 3.2.5

@sbecker59 sbecker59 force-pushed the feat/pagination_parameters branch from d48586b to b8b67e8 Compare May 20, 2023 09:07
@codecov
Copy link

codecov bot commented May 20, 2023

Codecov Report

Patch coverage: 27.27% and no project coverage change.

Comparison is base (d2cdd65) 80.53% compared to head (b8b67e8) 80.53%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #157   +/-   ##
=======================================
  Coverage   80.53%   80.53%           
=======================================
  Files          17       17           
  Lines        2004     2004           
=======================================
  Hits         1614     1614           
  Misses        316      316           
  Partials       74       74           
Impacted Files Coverage Δ
statuspage/data_source_pages.go 90.90% <0.00%> (ø)
statuspage/resource_component.go 84.61% <0.00%> (ø)
statuspage/resource_metric_provider.go 74.48% <0.00%> (ø)
statuspage/resource_subsriber.go 83.80% <0.00%> (ø)
statuspage/resource_incident.go 89.15% <20.00%> (ø)
statuspage/resource_page_access_user.go 71.42% <25.00%> (ø)
statuspage/resource_component_group.go 87.24% <28.57%> (ø)
statuspage/data_source_component_groups.go 89.28% <33.33%> (ø)
statuspage/data_source_components.go 89.65% <33.33%> (ø)
statuspage/resource_page_access_group.go 80.98% <50.00%> (ø)
... and 2 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sbecker59 sbecker59 merged commit 500b443 into main May 20, 2023
@sbecker59 sbecker59 deleted the feat/pagination_parameters branch May 20, 2023 09:29
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.

1 participant