Skip to content

Commit a71c0d7

Browse files
authored
filter projects by tag API parameter (#1222)
## Description <!-- ID for Jira ticket e.g [SPE-1234] --> :ticket: [TF-31754] <!-- Add a brief description of changes here. Include any other necessary relevant links --> <!-- Help your reviewer understand the type of review you need by selecting the scope and urgency. --> ### Requested review scope: - [x] Content touched by the PR _only_ (typos, clarifications, tips) - [ ] Code test (command and code block changes) - [ ] Flow and language near changes (new/rearranged steps) - [ ] Review everything (rewrites, major changes) ### Review urgency: - [ ] ASAP (bug fixes, broken content, imminent releases) - [ ] 3 days (small changes, easy reviews) - [x] 1 week (default) - [ ] Best effort (very non-urgent) <!-- Fill out only the appropriate checklist for your type of feature (or both if necessary) and delete the other one! --> ## All updates: <!-- This section is mandatory for all PRs: --> I have: - [x] Verified that all status checks have passed - [x] Verified that preview environment has successfully deployed - [x] Verified appropriate `label` applied (`hcp` + `product name`) - [x] Added all required reviewers (code owners and external) ## Content checklist (optional) Please do these things before requesting a review. I have: - [x] Made any associated code repositories public - [x] Added the `hashicorp-education/teamName` to any additional code or example repos as repo admin - [x] Added redirects for any moved or removed pages - [x] Spell checked the tutorial(s) - [x] Followed the [unified style guide](https://github.com/hashicorp/web-unified-docs/tree/main/docs/style-guide) - [x] Linted code snippets (Details per language [here](https://github.com/hashicorp/engineering-docs/blob/master/writing/markdown.md#code-blocks)) - [x] Checked the steps for completeness (no steps are implied or hidden) - [x] Looked at the local or vercel build and checked each new or changed page for: - display on the product curriculum page - callout box formatting - code block highlighting - right-hand navigation - next and back buttons - URL path [SPE-1234]: https://hashicorp.atlassian.net/browse/SPE-1234?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [TF-31754]: https://hashicorp.atlassian.net/browse/TF-31754?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
2 parents e190709 + ef9c2c5 commit a71c0d7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

content/terraform-docs-common/docs/cloud-docs/api-docs/changelog.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ description: >-
99

1010
Keep track of changes to the API for HCP Terraform and Terraform Enterprise.
1111

12+
## 2025-10-31
13+
* Document API filtering parameters when [`listing projects`](/terraform/cloud-docs/api-docs/projects)
14+
1215
<!-- BEGIN: TFC:only name:hcp-eu -->
1316

1417
## 2025-9-30

content/terraform-docs-common/docs/cloud-docs/api-docs/projects.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,8 @@ This endpoint supports pagination [with standard URL query parameters](/terrafor
334334
| `filter[permissions][create-workspace]` | **Optional.** If present, returns a list of projects that the authenticated user can create workspaces in. |
335335
| `filter[permissions][move-stack]` | **Optional.** If present, returns a list of projects that the authenticated user can move Stacks between. Only available in HCP Terraform. |
336336
| `filter[permissions][update]` | **Optional.** If present, returns a list of projects that the authenticated user can update. |
337+
| `filter[tagged][i][key]` | **Optional.** If specified, restricts results to projects that are tagged with the provided key. Use a value of `"0"` for `i` if you are only using a single filter. For multiple tag filters, use an incrementing integer value for each filter. HCP Terraform combines multiple tag filters with a logical `AND` when filtering results. |
338+
| `filter[tagged][i][value]` | **Optional.** If specified, restricts results to projects that are tagged with the provided value. This is useful when combined with a `key` filter for more specificity. Use a value of `"0"` for `i` if you are only using a single filter. For multiple tag filters, use an incrementing integer value for each filter. HCP Terraform combines multiple tag filters with a logical `AND` when filtering results. |
337339
| `sort` | **Optional.** Allows sorting the organization's projects by `"name"`. Prepending a hyphen to the sort parameter reverses the order. For example, `"-name"` sorts by name in reverse alphabetical order. If omitted, the default sort order is arbitrary but stable. |
338340

339341
### Sample Request

0 commit comments

Comments
 (0)