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

Document unique pagination method used in Org Runs Index endpoint #770

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Maed223
Copy link
Contributor

@Maed223 Maed223 commented Oct 29, 2024

What

Documented the unique pagination used in the GET /organizations/:organization_name/runs endpoint.

Related PR: https://github.com/hashicorp/atlas/pull/21346

Why

To surface to users the details of the atypical pagination metadata included in the response.


Merge Checklist

If items do not apply to your changes, add (N/A) and mark them as complete.

Pull Request

  • One or more labels describe the type of change (e.g. clarification) and associated product (e.g. HCP Terraform ).
  • Description links to related pull requests or issues, if any.

Content

  • Redirects have been added to website/redirects.js for moved, renamed, or deleted pages. N/A
  • API documentation and the API Changelog have been updated.
  • Links to related content where appropriate (e.g., API endpoints, permissions, etc.). N/A
  • Pages with related content are updated and link to this content when appropriate. N/A
  • Sidebar navigation files have been updated for added, deleted, reordered, or renamed pages. N/A
  • New pages have metadata (page name and description) at the top. N/A
  • New images are 2048 px wide. They have HashiCorp standard annotation color (#F92672) and format (rectangle with rounded corners), blurred sensitive details (e.g. credentials, usernames, user icons), and descriptive alt text in the markdown for accessibility. N/A
  • New code blocks have the correct syntax and line breaks to eliminate horizontal scroll bars.
  • UI elements (button names, page names, etc.) are bolded. N/A
  • The Vercel website preview successfully deployed.

Reviews

  • I or someone else reviewed the content for technical accuracy.
  • I or someone else reviewed the content for typos, punctuation, spelling, and grammar.

Copy link

vercel bot commented Oct 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
terraform-docs-common ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 30, 2024 4:26pm

@Maed223 Maed223 marked this pull request as ready for review October 29, 2024 17:30
website/docs/cloud-docs/api-docs/run.mdx Outdated Show resolved Hide resolved
Comment on lines +562 to +563
"next-page": 2,
"prev-page": null,
Copy link
Contributor

Choose a reason for hiding this comment

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

On line 554, there there is a "links" section. We could also reinforce the flexibility of the existing data by including the pagination links (not this example in particular but something similar)

This exists on workspace runs.. does it also exist on org runs?

For example:

"links": {
    "self": "https://app.terraform.io/api/v2/workspaces/ws-SqohByt1nDRfQhzT/runs?filter%5Boperation%5D=plan_only&page%5Bnumber%5D=1&page%5Bsize%5D=20",
    "first": "https://app.terraform.io/api/v2/workspaces/ws-SqohByt1nDRfQhzT/runs?filter%5Boperation%5D=plan_only&page%5Bnumber%5D=1&page%5Bsize%5D=20",
    "prev": null,
    "next": null,
    "last": "https://app.terraform.io/api/v2/workspaces/ws-SqohByt1nDRfQhzT/runs?filter%5Boperation%5D=plan_only&page%5Bnumber%5D=1&page%5Bsize%5D=20"
},

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hadn't considered including this metadata portion from the original pagination method. Currently the related PR for the org runs endpoint pagination update doesn't have these links. I'm wondering if it's worth adding them now, though I suppose it wouldn't be a breaking change if the new pagination method was later updated if there was a found need for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the associated altas PR to include pagination links, as well as documented them here: c8aefb1

Additionally added pagination documentation for the workspace run list endpoint to better highlight the differences.

…ce runs list docs to include pagination metadata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants