Skip to content

Add initial Stacks API documentation #826

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

Closed
wants to merge 16 commits into from

Conversation

aaabdelgany
Copy link
Contributor

@aaabdelgany aaabdelgany commented Feb 4, 2025

What

This PR adds the basic api documentation for Stacks.

Why

Stacks has hit open beta so it's time we documented the api. This will likely be the first PR among many since the API surface area is pretty expansive but hopefully we can get the most useful/frequently hit endpoints.

Screenshots


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

  • API documentation and the API Changelog have been updated.
  • Links to related content where appropriate (e.g., API endpoints, permissions, etc.).
  • Pages with related content are updated and link to this content when appropriate.
  • Sidebar navigation files have been updated for added, deleted, reordered, or renamed pages.
  • New pages have metadata (page name and description) at the top.
  • New code blocks have the correct syntax and line breaks to eliminate horizontal scroll bars.
  • 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 Feb 4, 2025

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 Feb 13, 2025 8:46pm

@aaabdelgany aaabdelgany changed the title Add initial basic API documentation for stacks Add initial API documentation for stacks Feb 11, 2025
@aaabdelgany aaabdelgany changed the title Add initial API documentation for stacks Add initial Stacks API documentation Feb 11, 2025
| `POST` | `/stack-plans/:stack_plan_id/replan` | Call this endpoint to [replan stack plan](#replan-stack-plan).|
| `PATCH` | `/stacks/:stack_id` | Call this endpoint to [update a stack](#update-a-stack).|

## List stacks
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if it would be helpful to have a "Requirements" section above this where we can talk about specific permissions/tokens are user requires to interact with this endpoints? We did something similar on the Projects API page, see https://developer.hashicorp.com/terraform/cloud-docs/api-docs/projects#requirements.


| Parameter | Description |
| -------------------- | ------------------------------------------------------- |
| `:organization_name` | The name of the organization to list the stacks of. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Something I've done before is list the query parameters section. We could list the valid include data and any search/filter/pagination. An example of the policy sets query parameter section: https://developer.hashicorp.com/terraform/cloud-docs/api-docs/policy-sets#query-parameters

@ker-an ker-an self-requested a review February 27, 2025 21:17
Copy link
Contributor

@ker-an ker-an left a comment

Choose a reason for hiding this comment

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

Had another look through! One small nitpick and I think we still have to add the query params but otherwise, I think we are ready for the Documentation Team to review!

| `GET` | `/stack-diagnostics/:stack_diagnostic_id` | Call this endpoint to [show stack diagnostic](#show-stack-diagnostic).|
| `GET` | `/stack-configurations/:stack_configuration_id/stack-diagnostics` | Call this endpoint to [list stack configuration diagnostics](#list-stack-configuration-diagnostics).|
| `GET` | `/stacks/:stack_id/stack-plans` | Call this endpoint to [list stack plans](#list-stack-plans).|
| `GET` | `/stack-plans/:stack_plan_id/` | Call this endpoint to [show stack plan](#show-stack-plan).|
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick:

Suggested change
| `GET` | `/stack-plans/:stack_plan_id/` | Call this endpoint to [show stack plan](#show-stack-plan).|
| `GET` | `/stack-plans/:stack_plan_id` | Call this endpoint to [show stack plan](#show-stack-plan).|

@rkoron007
Copy link
Contributor

Hi @aaabdelgany! Heads up that we will be migrating the content from terraform-docs-common into the UDR repo (https://github.com/hashicorp/web-unified-docs) this week. So, I'm going through and merging any documentation PRs we can get in before migration, but for future work you'll need to recreate this PR over in the UDR repo after the migration is complete.

So this is a heads up that after the migration happens I'll close this PR and will let you know when you are good to recreate it! Apologies about the extra work you have to do though!

@rkoron007 rkoron007 added the notified-of-UDR A tag for tracking that this PR owner knows about UDR. label May 27, 2025
@rkoron007
Copy link
Contributor

Hello @aaabdelgany!

The UDR migration has occurred, and the HCP Terraform documentation version now lives in the unified documentation repository. I'm going to close this PR since we are no longer serving this content from this repo, but please feel free to recreate your PR in the UDR repository within the HCP Terraform documentation and tag me if you need a review:
https://github.com/hashicorp/web-unified-docs/tree/main/content/terraform-docs-common/docs/cloud-docs

@rkoron007 rkoron007 closed this Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HCP Terraform notified-of-UDR A tag for tracking that this PR owner knows about UDR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants