Terraform · Example Payload

Hcp Terraform List Workspaces Example

Infrastructure as CodeCloud InfrastructureDevOpsOpen-SourceHashiCorp

Hcp Terraform List Workspaces Example is an example object payload from Terraform, with 2 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

requestresponse

Example Payload

Raw ↑
{
  "request": {
    "method": "GET",
    "url": "https://app.terraform.io/api/v2/organizations/my-org/workspaces",
    "headers": {
      "Authorization": "Bearer <HCP_TERRAFORM_TOKEN>",
      "Content-Type": "application/vnd.api+json"
    }
  },
  "response": {
    "status": 200,
    "headers": {
      "Content-Type": "application/vnd.api+json"
    },
    "body": {
      "data": [
        {
          "id": "ws-abc123",
          "type": "workspaces",
          "attributes": {
            "name": "production-vpc",
            "description": "Production VPC and networking infrastructure",
            "auto-apply": false,
            "locked": false,
            "execution-mode": "remote",
            "terraform-version": "1.7.0",
            "working-directory": "",
            "created-at": "2026-01-15T09:30:00.000Z",
            "updated-at": "2026-04-20T14:22:00.000Z",
            "resource-count": 42
          },
          "relationships": {
            "organization": {
              "data": {
                "id": "my-org",
                "type": "organizations"
              }
            }
          }
        },
        {
          "id": "ws-def456",
          "type": "workspaces",
          "attributes": {
            "name": "staging-eks",
            "description": "Staging Kubernetes cluster on EKS",
            "auto-apply": true,
            "locked": false,
            "execution-mode": "remote",
            "terraform-version": "1.7.0",
            "working-directory": "environments/staging",
            "created-at": "2026-02-01T11:00:00.000Z",
            "updated-at": "2026-05-01T08:45:00.000Z",
            "resource-count": 18
          }
        }
      ],
      "meta": {
        "pagination": {
          "current-page": 1,
          "prev-page": null,
          "next-page": null,
          "last-page": 1,
          "total-count": 2
        }
      }
    }
  }
}

Work with this as data

Every example here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for examples

4 MCP tools reach this
  • find_examplesBrowse and filter every example in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This example
curl "https://apis.io/api/v1/examples/hcp-terraform-list-workspaces-example"
All examples
curl "https://apis.io/api/v1/examples?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.