Humanitec · Capability

Humanitec API — ResourceDefinition

Humanitec API — ResourceDefinition. 10 operations. Lead operation: List Resource Definitions.. Self-contained Naftiko capability covering one Humanitec business surface.

Run with Naftiko HumanitecResourceDefinition

What You Can Do

GET
Listresourcedefinitions — List Resource Definitions.
/v1/orgs/{orgid}/resources/defs
POST
Createresourcedefinition — Create a new Resource Definition.
/v1/orgs/{orgid}/resources/defs
GET
Getresourcedefinition — Get a Resource Definition.
/v1/orgs/{orgid}/resources/defs/{defid}
PUT
Updateresourcedefinition — Update a Resource Definition.
/v1/orgs/{orgid}/resources/defs/{defid}
DELETE
Deleteresourcedefinition — Delete a Resource Definition.
/v1/orgs/{orgid}/resources/defs/{defid}
PATCH
Patchresourcedefinition — Update a Resource Definition.
/v1/orgs/{orgid}/resources/defs/{defid}
PUT
Updateresourcedefinitioncriteria — Update all Matching Criteria of a Resource Definition.
/v1/orgs/{orgid}/resources/defs/{defid}/criteria
POST
Createresourcedefinitioncriteria — Add a new Matching Criteria to a Resource Definition.
/v1/orgs/{orgid}/resources/defs/{defid}/criteria
DELETE
Deleteresourcedefinitioncriteria — Delete a Matching Criteria from a Resource Definition.
/v1/orgs/{orgid}/resources/defs/{defid}/criteria/{criteriaid}
GET
Listactiveresourcebydefinition — List Active Resources provisioned via a specific Resource Definition.
/v1/orgs/{orgid}/resources/defs/{defid}/resources

MCP Tools

list-resource-definitions

List Resource Definitions.

read-only idempotent
create-new-resource-definition

Create a new Resource Definition.

get-resource-definition

Get a Resource Definition.

read-only idempotent
update-resource-definition

Update a Resource Definition.

idempotent
delete-resource-definition

Delete a Resource Definition.

idempotent
update-resource-definition-2

Update a Resource Definition.

idempotent
update-all-matching-criteria-resource

Update all Matching Criteria of a Resource Definition.

idempotent
add-new-matching-criteria-resource

Add a new Matching Criteria to a Resource Definition.

delete-matching-criteria-resource-definition

Delete a Matching Criteria from a Resource Definition.

idempotent
list-active-resources-provisioned-specific

List Active Resources provisioned via a specific Resource Definition.

read-only idempotent

Capability Spec

humanitec-resourcedefinition.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Humanitec API — ResourceDefinition
  description: 'Humanitec API — ResourceDefinition. 10 operations. Lead operation: List Resource Definitions.. Self-contained
    Naftiko capability covering one Humanitec business surface.'
  tags:
  - Humanitec
  - ResourceDefinition
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    HUMANITEC_API_KEY: HUMANITEC_API_KEY
capability:
  consumes:
  - type: http
    namespace: humanitec-resourcedefinition
    baseUri: https://api.humanitec.io
    description: Humanitec API — ResourceDefinition business capability. Self-contained, no shared references.
    resources:
    - name: orgs-orgId-resources-defs
      path: /orgs/{orgId}/resources/defs
      operations:
      - name: listresourcedefinitions
        method: GET
        description: List Resource Definitions.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          description: The Organization ID.
          required: true
        - name: app
          in: query
          type: string
          description: (Optional) Filter Resource Definitions that may match a specific Application.
        - name: env
          in: query
          type: string
          description: (Optional) Filter Resource Definitions that may match a specific Environment.
        - name: env_type
          in: query
          type: string
          description: (Optional) Filter Resource Definitions that may match a specific Environment Type.
        - name: res
          in: query
          type: string
          description: (Optional) Filter Resource Definitions that may match a specific Resource.
        - name: res_type
          in: query
          type: string
          description: (Optional) Filter Resource Definitions that may match a specific Resource Type.
        - name: class
          in: query
          type: string
          description: (Optional) Filter Resource Definitions that may match a specific Class.
        - name: deleted
          in: query
          type: boolean
          description: If returns also resource definitions which has been deleted.
      - name: createresourcedefinition
        method: POST
        description: Create a new Resource Definition.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          description: The Organization ID.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: orgs-orgId-resources-defs-defId
      path: /orgs/{orgId}/resources/defs/{defId}
      operations:
      - name: getresourcedefinition
        method: GET
        description: Get a Resource Definition.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          description: The Organization ID.
          required: true
        - name: defId
          in: path
          type: string
          description: The Resource Definition ID.
          required: true
        - name: deleted
          in: query
          type: boolean
          description: If returns the resource definition even if it has been deleted.
      - name: updateresourcedefinition
        method: PUT
        description: Update a Resource Definition.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          description: The Organization ID.
          required: true
        - name: defId
          in: path
          type: string
          description: The Resource Definition ID.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleteresourcedefinition
        method: DELETE
        description: Delete a Resource Definition.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          description: The Organization ID.
          required: true
        - name: defId
          in: path
          type: string
          description: The Resource Definition ID.
          required: true
        - name: force
          in: query
          type: boolean
          description: If set to `true`, will mark the Resource Definition for deletion, even if it affects existing Active
            Resources.
      - name: patchresourcedefinition
        method: PATCH
        description: Update a Resource Definition.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          description: The Organization ID.
          required: true
        - name: defId
          in: path
          type: string
          description: The Resource Definition ID.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: orgs-orgId-resources-defs-defId-criteria
      path: /orgs/{orgId}/resources/defs/{defId}/criteria
      operations:
      - name: updateresourcedefinitioncriteria
        method: PUT
        description: Update all Matching Criteria of a Resource Definition.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          description: The Organization ID.
          required: true
        - name: defId
          in: path
          type: string
          description: The Resource Definition ID.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: createresourcedefinitioncriteria
        method: POST
        description: Add a new Matching Criteria to a Resource Definition.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          description: The Organization ID.
          required: true
        - name: defId
          in: path
          type: string
          description: The Resource Definition ID.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: orgs-orgId-resources-defs-defId-criteria-criteriaId
      path: /orgs/{orgId}/resources/defs/{defId}/criteria/{criteriaId}
      operations:
      - name: deleteresourcedefinitioncriteria
        method: DELETE
        description: Delete a Matching Criteria from a Resource Definition.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          description: The Organization ID.
          required: true
        - name: defId
          in: path
          type: string
          description: The Resource Definition ID.
          required: true
        - name: criteriaId
          in: path
          type: string
          description: The Matching Criteria ID.
          required: true
        - name: force
          in: query
          type: boolean
          description: If set to `true`, the Matching Criteria is deleted immediately, even if this action affects existing
            Active Resources.
    - name: orgs-orgId-resources-defs-defId-resources
      path: /orgs/{orgId}/resources/defs/{defId}/resources
      operations:
      - name: listactiveresourcebydefinition
        method: GET
        description: List Active Resources provisioned via a specific Resource Definition.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          description: The Organization ID.
          required: true
        - name: defId
          in: path
          type: string
          description: The Resource Definition ID.
          required: true
  exposes:
  - type: rest
    namespace: humanitec-resourcedefinition-rest
    port: 8080
    description: REST adapter for Humanitec API — ResourceDefinition. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/orgs/{orgid}/resources/defs
      name: orgs-orgid-resources-defs
      description: REST surface for orgs-orgId-resources-defs.
      operations:
      - method: GET
        name: listresourcedefinitions
        description: List Resource Definitions.
        call: humanitec-resourcedefinition.listresourcedefinitions
        with:
          orgId: rest.orgId
          app: rest.app
          env: rest.env
          env_type: rest.env_type
          res: rest.res
          res_type: rest.res_type
          class: rest.class
          deleted: rest.deleted
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createresourcedefinition
        description: Create a new Resource Definition.
        call: humanitec-resourcedefinition.createresourcedefinition
        with:
          orgId: rest.orgId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/orgs/{orgid}/resources/defs/{defid}
      name: orgs-orgid-resources-defs-defid
      description: REST surface for orgs-orgId-resources-defs-defId.
      operations:
      - method: GET
        name: getresourcedefinition
        description: Get a Resource Definition.
        call: humanitec-resourcedefinition.getresourcedefinition
        with:
          orgId: rest.orgId
          defId: rest.defId
          deleted: rest.deleted
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updateresourcedefinition
        description: Update a Resource Definition.
        call: humanitec-resourcedefinition.updateresourcedefinition
        with:
          orgId: rest.orgId
          defId: rest.defId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteresourcedefinition
        description: Delete a Resource Definition.
        call: humanitec-resourcedefinition.deleteresourcedefinition
        with:
          orgId: rest.orgId
          defId: rest.defId
          force: rest.force
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: patchresourcedefinition
        description: Update a Resource Definition.
        call: humanitec-resourcedefinition.patchresourcedefinition
        with:
          orgId: rest.orgId
          defId: rest.defId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/orgs/{orgid}/resources/defs/{defid}/criteria
      name: orgs-orgid-resources-defs-defid-criteria
      description: REST surface for orgs-orgId-resources-defs-defId-criteria.
      operations:
      - method: PUT
        name: updateresourcedefinitioncriteria
        description: Update all Matching Criteria of a Resource Definition.
        call: humanitec-resourcedefinition.updateresourcedefinitioncriteria
        with:
          orgId: rest.orgId
          defId: rest.defId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createresourcedefinitioncriteria
        description: Add a new Matching Criteria to a Resource Definition.
        call: humanitec-resourcedefinition.createresourcedefinitioncriteria
        with:
          orgId: rest.orgId
          defId: rest.defId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/orgs/{orgid}/resources/defs/{defid}/criteria/{criteriaid}
      name: orgs-orgid-resources-defs-defid-criteria-criteriaid
      description: REST surface for orgs-orgId-resources-defs-defId-criteria-criteriaId.
      operations:
      - method: DELETE
        name: deleteresourcedefinitioncriteria
        description: Delete a Matching Criteria from a Resource Definition.
        call: humanitec-resourcedefinition.deleteresourcedefinitioncriteria
        with:
          orgId: rest.orgId
          defId: rest.defId
          criteriaId: rest.criteriaId
          force: rest.force
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/orgs/{orgid}/resources/defs/{defid}/resources
      name: orgs-orgid-resources-defs-defid-resources
      description: REST surface for orgs-orgId-resources-defs-defId-resources.
      operations:
      - method: GET
        name: listactiveresourcebydefinition
        description: List Active Resources provisioned via a specific Resource Definition.
        call: humanitec-resourcedefinition.listactiveresourcebydefinition
        with:
          orgId: rest.orgId
          defId: rest.defId
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: humanitec-resourcedefinition-mcp
    port: 9090
    transport: http
    description: MCP adapter for Humanitec API — ResourceDefinition. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-resource-definitions
      description: List Resource Definitions.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: humanitec-resourcedefinition.listresourcedefinitions
      with:
        orgId: tools.orgId
        app: tools.app
        env: tools.env
        env_type: tools.env_type
        res: tools.res
        res_type: tools.res_type
        class: tools.class
        deleted: tools.deleted
      outputParameters:
      - type: object
        mapping: $.
    - name: create-new-resource-definition
      description: Create a new Resource Definition.
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: humanitec-resourcedefinition.createresourcedefinition
      with:
        orgId: tools.orgId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-resource-definition
      description: Get a Resource Definition.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: humanitec-resourcedefinition.getresourcedefinition
      with:
        orgId: tools.orgId
        defId: tools.defId
        deleted: tools.deleted
      outputParameters:
      - type: object
        mapping: $.
    - name: update-resource-definition
      description: Update a Resource Definition.
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: humanitec-resourcedefinition.updateresourcedefinition
      with:
        orgId: tools.orgId
        defId: tools.defId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-resource-definition
      description: Delete a Resource Definition.
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: humanitec-resourcedefinition.deleteresourcedefinition
      with:
        orgId: tools.orgId
        defId: tools.defId
        force: tools.force
      outputParameters:
      - type: object
        mapping: $.
    - name: update-resource-definition-2
      description: Update a Resource Definition.
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: humanitec-resourcedefinition.patchresourcedefinition
      with:
        orgId: tools.orgId
        defId: tools.defId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: update-all-matching-criteria-resource
      description: Update all Matching Criteria of a Resource Definition.
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: humanitec-resourcedefinition.updateresourcedefinitioncriteria
      with:
        orgId: tools.orgId
        defId: tools.defId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: add-new-matching-criteria-resource
      description: Add a new Matching Criteria to a Resource Definition.
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: humanitec-resourcedefinition.createresourcedefinitioncriteria
      with:
        orgId: tools.orgId
        defId: tools.defId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-matching-criteria-resource-definition
      description: Delete a Matching Criteria from a Resource Definition.
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: humanitec-resourcedefinition.deleteresourcedefinitioncriteria
      with:
        orgId: tools.orgId
        defId: tools.defId
        criteriaId: tools.criteriaId
        force: tools.force
      outputParameters:
      - type: object
        mapping: $.
    - name: list-active-resources-provisioned-specific
      description: List Active Resources provisioned via a specific Resource Definition.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: humanitec-resourcedefinition.listactiveresourcebydefinition
      with:
        orgId: tools.orgId
        defId: tools.defId
      outputParameters:
      - type: object
        mapping: $.