Harness · Capability

Harness Platform API

The Harness Platform API provides access to core platform resources including projects, organizations, connectors, secrets, users, roles, pipelines, triggers, and pipeline execution.

Run with Naftiko HarnessAPI

What You Can Do

GET
Listorganizations — Harness List Organizations
/ng/api/organizations
GET
Listprojects — Harness List Projects
/ng/api/projects
GET
Listpipelines — Harness List Pipelines
/pipeline/api/pipelines
POST
Executepipeline — Harness Execute Pipeline
/pipeline/api/pipelines/execute/{pipelineIdentifier}

MCP Tools

listorganizations

Harness List Organizations

read-only idempotent
listprojects

Harness List Projects

read-only idempotent
listpipelines

Harness List Pipelines

read-only idempotent
executepipeline

Harness Execute Pipeline

Capability Spec

harness-capability.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Harness Platform API
  description: The Harness Platform API provides access to core platform resources including projects, organizations, connectors,
    secrets, users, roles, pipelines, triggers, and pipeline execution.
  tags:
  - Harness
  - API
  created: '2026-05-06'
  modified: '2026-05-06'
capability:
  consumes:
  - type: http
    namespace: harness
    baseUri: https://app.harness.io/gateway
    description: Harness Platform API HTTP API.
    authentication:
      type: apikey
      in: header
      name: x-api-key
      value: '{{HARNESS_TOKEN}}'
    resources:
    - name: ng-api-organizations
      path: /ng/api/organizations
      operations:
      - name: listorganizations
        method: GET
        description: Harness List Organizations
        inputParameters:
        - name: accountIdentifier
          in: query
          type: string
          required: true
          description: Account identifier.
        - name: pageIndex
          in: query
          type: integer
          description: Page number (0-based).
        - name: pageSize
          in: query
          type: integer
          description: Number of items per page.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: ng-api-projects
      path: /ng/api/projects
      operations:
      - name: listprojects
        method: GET
        description: Harness List Projects
        inputParameters:
        - name: accountIdentifier
          in: query
          type: string
          required: true
          description: Account identifier.
        - name: orgIdentifier
          in: query
          type: string
          description: Organization identifier.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: pipeline-api-pipelines
      path: /pipeline/api/pipelines
      operations:
      - name: listpipelines
        method: GET
        description: Harness List Pipelines
        inputParameters:
        - name: accountIdentifier
          in: query
          type: string
          required: true
        - name: orgIdentifier
          in: query
          type: string
          required: true
        - name: projectIdentifier
          in: query
          type: string
          required: true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: pipeline-api-pipelines-execute-pipelineidentifie
      path: /pipeline/api/pipelines/execute/{pipelineIdentifier}
      operations:
      - name: executepipeline
        method: POST
        description: Harness Execute Pipeline
        inputParameters:
        - name: pipelineIdentifier
          in: path
          type: string
          required: true
          description: Pipeline identifier.
        - name: accountIdentifier
          in: query
          type: string
          required: true
        - name: orgIdentifier
          in: query
          type: string
          required: true
        - name: projectIdentifier
          in: query
          type: string
          required: true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    port: 8080
    namespace: harness-rest
    description: REST adapter for Harness Platform API.
    resources:
    - path: /ng/api/organizations
      name: listorganizations
      operations:
      - method: GET
        name: listorganizations
        description: Harness List Organizations
        call: harness.listorganizations
        outputParameters:
        - type: object
          mapping: $.
    - path: /ng/api/projects
      name: listprojects
      operations:
      - method: GET
        name: listprojects
        description: Harness List Projects
        call: harness.listprojects
        outputParameters:
        - type: object
          mapping: $.
    - path: /pipeline/api/pipelines
      name: listpipelines
      operations:
      - method: GET
        name: listpipelines
        description: Harness List Pipelines
        call: harness.listpipelines
        outputParameters:
        - type: object
          mapping: $.
    - path: /pipeline/api/pipelines/execute/{pipelineIdentifier}
      name: executepipeline
      operations:
      - method: POST
        name: executepipeline
        description: Harness Execute Pipeline
        call: harness.executepipeline
        with:
          pipelineIdentifier: rest.pipelineIdentifier
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    port: 9090
    namespace: harness-mcp
    transport: http
    description: MCP adapter for Harness Platform API for AI agent use.
    tools:
    - name: listorganizations
      description: Harness List Organizations
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: harness.listorganizations
      with:
        accountIdentifier: tools.accountIdentifier
        pageIndex: tools.pageIndex
        pageSize: tools.pageSize
      inputParameters:
      - name: accountIdentifier
        type: string
        description: Account identifier.
        required: true
      - name: pageIndex
        type: integer
        description: Page number (0-based).
      - name: pageSize
        type: integer
        description: Number of items per page.
      outputParameters:
      - type: object
        mapping: $.
    - name: listprojects
      description: Harness List Projects
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: harness.listprojects
      with:
        accountIdentifier: tools.accountIdentifier
        orgIdentifier: tools.orgIdentifier
      inputParameters:
      - name: accountIdentifier
        type: string
        description: Account identifier.
        required: true
      - name: orgIdentifier
        type: string
        description: Organization identifier.
      outputParameters:
      - type: object
        mapping: $.
    - name: listpipelines
      description: Harness List Pipelines
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: harness.listpipelines
      with:
        accountIdentifier: tools.accountIdentifier
        orgIdentifier: tools.orgIdentifier
        projectIdentifier: tools.projectIdentifier
      inputParameters:
      - name: accountIdentifier
        type: string
        description: accountIdentifier
        required: true
      - name: orgIdentifier
        type: string
        description: orgIdentifier
        required: true
      - name: projectIdentifier
        type: string
        description: projectIdentifier
        required: true
      outputParameters:
      - type: object
        mapping: $.
    - name: executepipeline
      description: Harness Execute Pipeline
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: harness.executepipeline
      with:
        pipelineIdentifier: tools.pipelineIdentifier
        accountIdentifier: tools.accountIdentifier
        orgIdentifier: tools.orgIdentifier
        projectIdentifier: tools.projectIdentifier
      inputParameters:
      - name: pipelineIdentifier
        type: string
        description: Pipeline identifier.
        required: true
      - name: accountIdentifier
        type: string
        description: accountIdentifier
        required: true
      - name: orgIdentifier
        type: string
        description: orgIdentifier
        required: true
      - name: projectIdentifier
        type: string
        description: projectIdentifier
        required: true
      outputParameters:
      - type: object
        mapping: $.
binds:
- namespace: env
  keys:
    HARNESS_TOKEN: HARNESS_TOKEN