TeamCity · Capability

TeamCity REST API — Tests

TeamCity REST API — Tests. 2 operations. Lead operation: Get All Test Occurrences. Self-contained Naftiko capability covering one Teamcity business surface.

Run with Naftiko TeamcityTests

What You Can Do

GET
Getalltestoccurrences — Get All Test Occurrences
/v1/testoccurrences
GET
Getalltests — Get All Tests
/v1/tests

MCP Tools

get-all-test-occurrences

Get All Test Occurrences

read-only idempotent
get-all-tests

Get All Tests

read-only idempotent

Capability Spec

rest-tests.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: TeamCity REST API — Tests
  description: 'TeamCity REST API — Tests. 2 operations. Lead operation: Get All Test Occurrences. Self-contained Naftiko
    capability covering one Teamcity business surface.'
  tags:
  - Teamcity
  - Tests
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    TEAMCITY_API_KEY: TEAMCITY_API_KEY
capability:
  consumes:
  - type: http
    namespace: rest-tests
    baseUri: https://{server}/app/rest
    description: TeamCity REST API — Tests business capability. Self-contained, no shared references.
    resources:
    - name: testOccurrences
      path: /testOccurrences
      operations:
      - name: getalltestoccurrences
        method: GET
        description: Get All Test Occurrences
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: tests
      path: /tests
      operations:
      - name: getalltests
        method: GET
        description: Get All Tests
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.TEAMCITY_API_KEY}}'
  exposes:
  - type: rest
    namespace: rest-tests-rest
    port: 8080
    description: REST adapter for TeamCity REST API — Tests. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/testoccurrences
      name: testoccurrences
      description: REST surface for testOccurrences.
      operations:
      - method: GET
        name: getalltestoccurrences
        description: Get All Test Occurrences
        call: rest-tests.getalltestoccurrences
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/tests
      name: tests
      description: REST surface for tests.
      operations:
      - method: GET
        name: getalltests
        description: Get All Tests
        call: rest-tests.getalltests
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: rest-tests-mcp
    port: 9090
    transport: http
    description: MCP adapter for TeamCity REST API — Tests. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: get-all-test-occurrences
      description: Get All Test Occurrences
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-tests.getalltestoccurrences
      outputParameters:
      - type: object
        mapping: $.
    - name: get-all-tests
      description: Get All Tests
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-tests.getalltests
      outputParameters:
      - type: object
        mapping: $.