{
  "opencollection": "1.0.0",
  "info": {
    "name": "HCP Terraform API",
    "version": "2.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Organizations",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Organizations",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://app.terraform.io/api/v2/organizations",
            "params": [
              {
                "name": "page[number]",
                "value": "",
                "type": "query",
                "description": "Page number for pagination"
              },
              {
                "name": "page[size]",
                "value": "",
                "type": "query",
                "description": "Number of results per page (max 100)"
              },
              {
                "name": "q",
                "value": "",
                "type": "query",
                "description": "Search query to filter organizations by name"
              }
            ]
          },
          "docs": "Lists all organizations accessible by the current token."
        },
        {
          "info": {
            "name": "Create an Organization",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://app.terraform.io/api/v2/organizations",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new organization."
        },
        {
          "info": {
            "name": "Get an Organization",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://app.terraform.io/api/v2/organizations/:organization_name",
            "params": [
              {
                "name": "organization_name",
                "value": "",
                "type": "path",
                "description": "The name of the organization"
              }
            ]
          },
          "docs": "Retrieves details for a specific organization."
        },
        {
          "info": {
            "name": "Update an Organization",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://app.terraform.io/api/v2/organizations/:organization_name",
            "params": [
              {
                "name": "organization_name",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates settings for an existing organization."
        },
        {
          "info": {
            "name": "Delete an Organization",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://app.terraform.io/api/v2/organizations/:organization_name",
            "params": [
              {
                "name": "organization_name",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Destroys an organization."
        }
      ]
    },
    {
      "info": {
        "name": "Workspaces",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Workspaces",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://app.terraform.io/api/v2/organizations/:organization_name/workspaces",
            "params": [
              {
                "name": "organization_name",
                "value": "",
                "type": "path"
              },
              {
                "name": "page[number]",
                "value": "",
                "type": "query"
              },
              {
                "name": "page[size]",
                "value": "",
                "type": "query"
              },
              {
                "name": "search[name]",
                "value": "",
                "type": "query",
                "description": "Filter workspaces by name"
              },
              {
                "name": "search[tags]",
                "value": "",
                "type": "query",
                "description": "Filter workspaces by tags"
              },
              {
                "name": "filter[project][id]",
                "value": "",
                "type": "query",
                "description": "Filter workspaces by project ID"
              }
            ]
          },
          "docs": "Lists workspaces within an organization."
        },
        {
          "info": {
            "name": "Create a Workspace",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://app.terraform.io/api/v2/organizations/:organization_name/workspaces",
            "params": [
              {
                "name": "organization_name",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new workspace within an organization."
        },
        {
          "info": {
            "name": "Get a Workspace",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://app.terraform.io/api/v2/workspaces/:workspace_id",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Retrieves details for a specific workspace."
        },
        {
          "info": {
            "name": "Update a Workspace",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://app.terraform.io/api/v2/workspaces/:workspace_id",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates settings for an existing workspace."
        },
        {
          "info": {
            "name": "Delete a Workspace",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://app.terraform.io/api/v2/workspaces/:workspace_id",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Destroys a workspace and all its contents."
        },
        {
          "info": {
            "name": "Lock a Workspace",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://app.terraform.io/api/v2/workspaces/:workspace_id/actions/lock",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Locks a workspace to prevent runs."
        },
        {
          "info": {
            "name": "Unlock a Workspace",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://app.terraform.io/api/v2/workspaces/:workspace_id/actions/unlock",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Unlocks a workspace to allow runs."
        }
      ]
    },
    {
      "info": {
        "name": "Runs",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Create a Run",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://app.terraform.io/api/v2/runs",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new run for a workspace."
        },
        {
          "info": {
            "name": "Get a Run",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://app.terraform.io/api/v2/runs/:run_id",
            "params": [
              {
                "name": "run_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Retrieves details for a specific run."
        },
        {
          "info": {
            "name": "Apply a Run",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://app.terraform.io/api/v2/runs/:run_id/actions/apply",
            "params": [
              {
                "name": "run_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Applies a run that is paused waiting for confirmation."
        },
        {
          "info": {
            "name": "Discard a Run",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://app.terraform.io/api/v2/runs/:run_id/actions/discard",
            "params": [
              {
                "name": "run_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Discards a run that has not yet been applied."
        },
        {
          "info": {
            "name": "Cancel a Run",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://app.terraform.io/api/v2/runs/:run_id/actions/cancel",
            "params": [
              {
                "name": "run_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Cancels a run that is currently in progress."
        },
        {
          "info": {
            "name": "List Workspace Runs",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://app.terraform.io/api/v2/workspaces/:workspace_id/runs",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "page[number]",
                "value": "",
                "type": "query"
              },
              {
                "name": "page[size]",
                "value": "",
                "type": "query"
              },
              {
                "name": "filter[status]",
                "value": "",
                "type": "query",
                "description": "Filter runs by status"
              }
            ]
          },
          "docs": "Lists all runs for a given workspace."
        }
      ]
    },
    {
      "info": {
        "name": "State Versions",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List State Versions",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://app.terraform.io/api/v2/workspaces/:workspace_id/state-versions",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "page[number]",
                "value": "",
                "type": "query"
              },
              {
                "name": "page[size]",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "Lists state versions for a workspace."
        },
        {
          "info": {
            "name": "Create a State Version",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://app.terraform.io/api/v2/workspaces/:workspace_id/state-versions",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new state version for a workspace."
        },
        {
          "info": {
            "name": "Get a State Version",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://app.terraform.io/api/v2/state-versions/:state_version_id",
            "params": [
              {
                "name": "state_version_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Retrieves details for a specific state version."
        }
      ]
    },
    {
      "info": {
        "name": "Teams",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Teams",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://app.terraform.io/api/v2/organizations/:organization_name/teams",
            "params": [
              {
                "name": "organization_name",
                "value": "",
                "type": "path"
              },
              {
                "name": "page[number]",
                "value": "",
                "type": "query"
              },
              {
                "name": "page[size]",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "Lists all teams in an organization."
        },
        {
          "info": {
            "name": "Create a Team",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://app.terraform.io/api/v2/organizations/:organization_name/teams",
            "params": [
              {
                "name": "organization_name",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new team within an organization."
        },
        {
          "info": {
            "name": "Get a Team",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://app.terraform.io/api/v2/teams/:team_id",
            "params": [
              {
                "name": "team_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Retrieves details for a specific team."
        },
        {
          "info": {
            "name": "Delete a Team",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://app.terraform.io/api/v2/teams/:team_id",
            "params": [
              {
                "name": "team_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Deletes a team."
        }
      ]
    },
    {
      "info": {
        "name": "Policies",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Policies",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://app.terraform.io/api/v2/organizations/:organization_name/policies",
            "params": [
              {
                "name": "organization_name",
                "value": "",
                "type": "path"
              },
              {
                "name": "page[number]",
                "value": "",
                "type": "query"
              },
              {
                "name": "page[size]",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "Lists all policies in an organization."
        },
        {
          "info": {
            "name": "Create a Policy",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://app.terraform.io/api/v2/organizations/:organization_name/policies",
            "params": [
              {
                "name": "organization_name",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new Sentinel or OPA policy."
        },
        {
          "info": {
            "name": "Get a Policy",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://app.terraform.io/api/v2/policies/:policy_id",
            "params": [
              {
                "name": "policy_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Retrieves details for a specific policy."
        },
        {
          "info": {
            "name": "Delete a Policy",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://app.terraform.io/api/v2/policies/:policy_id",
            "params": [
              {
                "name": "policy_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Deletes a policy."
        }
      ]
    },
    {
      "info": {
        "name": "Projects",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Projects",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://app.terraform.io/api/v2/organizations/:organization_name/projects",
            "params": [
              {
                "name": "organization_name",
                "value": "",
                "type": "path"
              },
              {
                "name": "page[number]",
                "value": "",
                "type": "query"
              },
              {
                "name": "page[size]",
                "value": "",
                "type": "query"
              },
              {
                "name": "filter[name]",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "Lists all projects within an organization."
        },
        {
          "info": {
            "name": "Create a Project",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://app.terraform.io/api/v2/organizations/:organization_name/projects",
            "params": [
              {
                "name": "organization_name",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new project within an organization."
        },
        {
          "info": {
            "name": "Get a Project",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://app.terraform.io/api/v2/projects/:project_id",
            "params": [
              {
                "name": "project_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Retrieves details for a specific project."
        },
        {
          "info": {
            "name": "Update a Project",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://app.terraform.io/api/v2/projects/:project_id",
            "params": [
              {
                "name": "project_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates an existing project."
        },
        {
          "info": {
            "name": "Delete a Project",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://app.terraform.io/api/v2/projects/:project_id",
            "params": [
              {
                "name": "project_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Deletes a project."
        }
      ]
    },
    {
      "info": {
        "name": "Variables",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Workspace Variables",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://app.terraform.io/api/v2/workspaces/:workspace_id/vars",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Lists all variables for a workspace."
        },
        {
          "info": {
            "name": "Create a Workspace Variable",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://app.terraform.io/api/v2/workspaces/:workspace_id/vars",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Creates a new variable for a workspace."
        },
        {
          "info": {
            "name": "Update a Workspace Variable",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://app.terraform.io/api/v2/workspaces/:workspace_id/vars/:variable_id",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "variable_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Updates an existing workspace variable."
        },
        {
          "info": {
            "name": "Delete a Workspace Variable",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://app.terraform.io/api/v2/workspaces/:workspace_id/vars/:variable_id",
            "params": [
              {
                "name": "workspace_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "variable_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Deletes a workspace variable."
        }
      ]
    }
  ],
  "bundled": true
}