Terraform · Capability

HCP Terraform API — Organizations

HCP Terraform API — Organizations. 5 operations. Lead operation: List Organizations. Self-contained Naftiko capability covering one Terraform business surface.

Run with Naftiko TerraformOrganizations

What You Can Do

GET
Listorganizations — List Organizations
/v1/organizations
POST
Createorganization — Create an Organization
/v1/organizations
GET
Getorganization — Get an Organization
/v1/organizations/{organization-name}
PATCH
Updateorganization — Update an Organization
/v1/organizations/{organization-name}
DELETE
Deleteorganization — Delete an Organization
/v1/organizations/{organization-name}

MCP Tools

list-organizations

List Organizations

read-only idempotent
create-organization

Create an Organization

get-organization

Get an Organization

read-only idempotent
update-organization

Update an Organization

idempotent
delete-organization

Delete an Organization

idempotent

Capability Spec

hcp-terraform-organizations.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: HCP Terraform API — Organizations
  description: 'HCP Terraform API — Organizations. 5 operations. Lead operation: List Organizations. Self-contained Naftiko
    capability covering one Terraform business surface.'
  tags:
  - Terraform
  - Organizations
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    TERRAFORM_API_KEY: TERRAFORM_API_KEY
capability:
  consumes:
  - type: http
    namespace: hcp-terraform-organizations
    baseUri: https://app.terraform.io/api/v2
    description: HCP Terraform API — Organizations business capability. Self-contained, no shared references.
    resources:
    - name: organizations
      path: /organizations
      operations:
      - name: listorganizations
        method: GET
        description: List Organizations
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: page[number]
          in: query
          type: integer
          description: Page number for pagination
        - name: page[size]
          in: query
          type: integer
          description: Number of results per page (max 100)
        - name: q
          in: query
          type: string
          description: Search query to filter organizations by name
      - name: createorganization
        method: POST
        description: Create an Organization
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: organizations-organization_name
      path: /organizations/{organization_name}
      operations:
      - name: getorganization
        method: GET
        description: Get an Organization
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: organization_name
          in: path
          type: string
          description: The name of the organization
          required: true
      - name: updateorganization
        method: PATCH
        description: Update an Organization
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: organization_name
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleteorganization
        method: DELETE
        description: Delete an Organization
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: organization_name
          in: path
          type: string
          required: true
    authentication:
      type: bearer
      token: '{{env.TERRAFORM_API_KEY}}'
  exposes:
  - type: rest
    namespace: hcp-terraform-organizations-rest
    port: 8080
    description: REST adapter for HCP Terraform API — Organizations. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/organizations
      name: organizations
      description: REST surface for organizations.
      operations:
      - method: GET
        name: listorganizations
        description: List Organizations
        call: hcp-terraform-organizations.listorganizations
        with:
          page[number]: rest.page[number]
          page[size]: rest.page[size]
          q: rest.q
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createorganization
        description: Create an Organization
        call: hcp-terraform-organizations.createorganization
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/organizations/{organization-name}
      name: organizations-organization-name
      description: REST surface for organizations-organization_name.
      operations:
      - method: GET
        name: getorganization
        description: Get an Organization
        call: hcp-terraform-organizations.getorganization
        with:
          organization_name: rest.organization_name
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updateorganization
        description: Update an Organization
        call: hcp-terraform-organizations.updateorganization
        with:
          organization_name: rest.organization_name
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteorganization
        description: Delete an Organization
        call: hcp-terraform-organizations.deleteorganization
        with:
          organization_name: rest.organization_name
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: hcp-terraform-organizations-mcp
    port: 9090
    transport: http
    description: MCP adapter for HCP Terraform API — Organizations. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-organizations
      description: List Organizations
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: hcp-terraform-organizations.listorganizations
      with:
        page[number]: tools.page[number]
        page[size]: tools.page[size]
        q: tools.q
      outputParameters:
      - type: object
        mapping: $.
    - name: create-organization
      description: Create an Organization
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: hcp-terraform-organizations.createorganization
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-organization
      description: Get an Organization
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: hcp-terraform-organizations.getorganization
      with:
        organization_name: tools.organization_name
      outputParameters:
      - type: object
        mapping: $.
    - name: update-organization
      description: Update an Organization
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: hcp-terraform-organizations.updateorganization
      with:
        organization_name: tools.organization_name
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-organization
      description: Delete an Organization
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: hcp-terraform-organizations.deleteorganization
      with:
        organization_name: tools.organization_name
      outputParameters:
      - type: object
        mapping: $.