Terraform Cloud icon

Terraform Cloud

Interact with the Terraform Cloud API

Workspace → List Workspaces

AI-generated

Summary

List the workspaces in a specified Terraform Cloud organization with optional pagination and search filtering.

Inputs

  • Organization (required) — Terraform Cloud organization name to list the workspaces from.
  • Options (listOptions) — Optional parameters to control pagination and filtering of the workspace list. Includes:
  • Page Number: The page of results to retrieve (minimum 1, default 1).
  • Page Size: Number of workspaces per page (minimum 1, maximum 100, default 20).
  • Search: Filter workspaces by name with a search string.

Output shape

a JSON object containing the API response with a list of workspaces for the given organization, adhering to specified pagination and search parameters.

The response includes paginated workspace data from Terraform Cloud API under the specified organization. Pagination parameters default to page 1 with 20 items per page if not provided. The search parameter filters the list by workspace name.

Examples

Example 1: List first page of workspaces in 'my-org' with default page size

Set 'Organization' to 'my-org'. Leave 'Options' empty or default.

Example 2: List second page of workspaces, 50 per page, filtering by name containing 'prod'

Set 'Organization' to the target org. Under 'Options', set 'Page Number' to 2, 'Page Size' to 50, and 'Search' to 'prod'.

Links

Discussion