> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kombify.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List canonical measured service runtime state



## OpenAPI

````yaml /techstack/reference/api/openapi.yaml get /api/v1/services
openapi: 3.1.0
info:
  title: kombify-TechStack API
  description: >
    REST API for kombify-TechStack -- the hybrid cloud control plane for
    homelabs.


    kombify-TechStack manages infrastructure through a spec-driven architecture:

    validate YAML specs via CUE, generate OpenTofu configurations, and manage

    nodes through a gRPC agent protocol.


    ## Authentication


    Authenticated endpoints accept an OIDC/JWKS bearer token or an API key

    where documented. Self-hosted TechStack defaults to Pocket ID as identity

    provider. SaaS routes enter through the edge with Auth0 as the platform

    identity provider. PocketBase session exchange remains legacy migration

    compatibility only.


    ## Response Format


    **Success:** `{ "data": <object>, "meta": { "total": int, "page": int,
    "per_page": int } }`


    **Error:** `{ "error": { "code": "<ERROR_CODE>", "message": "...",
    "details": <any> } }`


    ## Pagination


    List endpoints accept `page` (default: 1) and `per_page` (default: 20, max:
    100) query parameters.
  version: 1.0.0
  contact:
    name: kombify
    url: https://kombify.io
  license:
    name: Apache-2.0 AND GPL-3.0
    url: https://github.com/KombiverseLabs/kombify-TechStack/blob/main/LICENSE
servers:
  - url: https://api.kombify.io/v1/techstack
    description: >-
      Production canonical (via Cloudflare edge gateway, strip-prefix). Clients
      MUST use this projection. The Gateway strips /v1/techstack and re-adds
      /api/v1 at the origin, so it resolves the /api/v1/* paths below cleanly.
  - url: http://localhost:5260
    description: Local development
  - url: https://techstack.kombify.io
    description: Production (direct, no Gateway prefix)
  - url: https://api.kombify.io/v1/orchestrator
    description: >-
      Legacy StackKit-Orchestrator projection of the same origin. RETAINED for
      backward compatibility with existing consumers only. Do NOT use for mobile
      or new clients: combined with the /api/v1/* paths it double-resolves
      (yielding /v1/orchestrator/api/v1/...). Prefer /v1/techstack.
security:
  - bearerAuth: []
tags:
  - name: Health
    description: Health checks and service info (no auth required)
  - name: Instance
    description: Local instance identity and enrollment metadata
  - name: Stacks
    description: Stack lifecycle management (create, provision, deploy, destroy)
  - name: Stacks - Specs
    description: Access persisted specification chain (intent, requirements, unified)
  - name: Stacks - Import/Export
    description: Import and export StackKits stack-spec.yaml configurations
  - name: Stacks - Drift
    description: Infrastructure drift detection and resolution
  - name: Unifier
    description: Spec validation, analysis, unification, and IaC generation pipeline
  - name: StackKits
    description: Infrastructure template catalog
  - name: Add-ons
    description: Add-on detection and registry
  - name: Workers
    description: Worker node registration and management
  - name: Servers
    description: Canonical server lifecycle, connection, and health state
  - name: Inventory
    description: >-
      Owner-scoped sanitized server and service read models for UI, API, and MCP
      clients
  - name: Pre-Checks
    description: Pre-deployment hardware and software validation
  - name: Agents
    description: Connected gRPC agent management and commands
  - name: Jobs
    description: Background job monitoring and SSE streaming
  - name: Discovery
    description: Network device discovery and SSH testing
  - name: Features
    description: Feature flags (read-only; managed centrally via the kombify Admin API)
  - name: Monthly Runtime
    description: Provider-free user API for subscription-backed stack runtime control
  - name: Runtime
    description: Recent runtime/deploy logs (job/deploy progress + container tail)
  - name: Wallet
    description: >-
      Redacted recovery-item wallet with biometric/platform-reauth-gated reveal.
      List responses strip secret/totp; reveal requires a fresh trusted-reauth
      HMAC proof (5-minute window) and is audited server-side.
  - name: Trust
    description: Pairing tokens for worker enrollment
  - name: Client Binding
    description: >-
      Short-lived HTTPS pairing for a second client and normal OIDC account
      handoff
  - name: Tunnel
    description: Cloudflare tunnel management for NAT traversal
  - name: Backups
    description: Database backup management (admin only)
  - name: Auth
    description: Authentication mode and SSO configuration
  - name: Metrics
    description: Prometheus-compatible instance metrics for admin/infra scrapers
  - name: Internal
    description: >-
      Internal SaaS-only APIs, including servicecall-protected executor
      contracts
paths:
  /api/v1/services:
    get:
      tags:
        - Services
      summary: List canonical measured service runtime state
      operationId: listServiceRuntimes
      parameters:
        - name: stack_id
          in: query
          schema:
            type: string
        - name: server_id
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Owner-scoped service runtime list
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ServiceRuntime'
                  meta:
                    $ref: '#/components/schemas/ResponseMeta'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    ServiceRuntime:
      type: object
      required:
        - id
        - stack_id
        - server_id
        - service_key
        - service_instance
        - name
        - desired_state
        - observed_state
        - health
        - access
        - allowed_actions
        - mutation_lock
        - source
        - provenance
        - created_at
        - updated_at
      properties:
        adoption:
          type: object
          properties:
            preview_available:
              type: boolean
            execution_available:
              type: boolean
            release_available:
              type: boolean
            profile_ref:
              type: string
            reason_code:
              type: string
        id:
          type: string
        stack_id:
          type: string
        server_id:
          type: string
        service_key:
          type: string
        service_instance:
          type: string
        name:
          type: string
        desired_state:
          type: string
          enum:
            - running
            - stopped
        observed_state:
          type: string
          enum:
            - unknown
            - starting
            - running
            - stopped
            - failed
        health:
          type: object
          required:
            - state
          properties:
            state:
              type: string
              enum:
                - unknown
                - healthy
                - degraded
                - unhealthy
                - starting
            observed_at:
              type: string
              format: date-time
            reason_code:
              type: string
        stackkit_version:
          type: string
        access:
          $ref: '#/components/schemas/ServiceAccess'
        allowed_actions:
          type: array
          uniqueItems: true
          description: >-
            Exactly what the action endpoint accepts for this service right now.
            A locked service advertises only its read path plus `unfreeze`; the
            suppressed mutations are explained by `mutation_lock`.
          items:
            type: string
            enum:
              - start
              - stop
              - restart
              - logs
              - update
              - adopt
              - freeze
              - unfreeze
        catalog:
          type: object
          description: >-
            Recognized application facts, or category unknown with the generic
            Kombify icon.
          required:
            - id
            - display_name
            - category
            - icon_url
          properties:
            id:
              type: string
            display_name:
              type: string
            category:
              type: string
            icon_url:
              type: string
              format: uri
              description: Kombify-hosted PNG logo or generic service icon.
            brand_domain:
              type: string
            web_port:
              type: integer
        version:
          type: object
          description: >-
            Running version and update fact. Omitted when nothing was measured;
            `latest` is only set after a real registry or release-pin
            comparison.
          required:
            - update_available
            - update_mode
          properties:
            current:
              type: string
            source:
              type: string
              enum:
                - image_tag
                - image_label
                - stackkit
            image:
              type: string
            latest:
              type: string
            update_available:
              type: boolean
            checked_at:
              type: string
              format: date-time
            update_mode:
              type: string
              enum:
                - stackkit_upgrade
                - adopt_required
                - unavailable
            reason_code:
              type: string
        placement_class:
          type: string
          enum:
            - local
            - cloud
            - managed
            - unknown
          description: Evidence-backed class from the server's recorded runtime target.
        mutation_lock:
          $ref: '#/components/schemas/ServiceMutationLock'
        inventory_revision:
          type: integer
          format: int64
          minimum: 0
        evidence_ref:
          type: string
          description: >-
            Protected StackKits evidence reference; never inline secret
            material.
        source:
          type: string
        provenance:
          type: object
          additionalProperties: true
          description: >-
            Declared components with control_scope=application dispatch their
            start, stop, restart and logs through declared_control_service_key
            for the entire control application. Their immutable service id
            remains the job and observation identity. Superseded observed
            history exposes superseded_by_service_id and remains inspectable.
        action_guard:
          type: object
          description: >-
            A group guardrail does not change this service's own mutation_lock
            or grant it another service's unfreeze action.
          properties:
            reason_code:
              type: string
              enum:
                - application_control_locked
            unlock_required_action:
              type: string
              enum:
                - unfreeze
            unlock_service_ids:
              type: array
              items:
                type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ResponseMeta:
      type: object
      properties:
        total:
          type: integer
        page:
          type: integer
        per_page:
          type: integer
        managed_runtime_inventory_complete:
          type: boolean
          description: >-
            True only when the managed RuntimeLease authority was configured and
            read successfully for this inventory response.
        worker_inventory_sha256:
          type: string
          pattern: ^[0-9a-f]{64}$
          description: >-
            Stable digest of the complete worker identity, attachment,
            freshness, and managed RuntimeLease authority snapshot used for
            pagination.
        managed_runtime_active_lease_ids:
          type: array
          items:
            type: string
          description: >-
            Canonically sorted IDs of visible managed RuntimeLeases classified
            as active for inventory and cleanup. This visibility projection is
            not capacity reservation or release authority.
        managed_runtime_inactive_lease_ids:
          type: array
          items:
            type: string
          description: >-
            Canonically sorted IDs of visible managed RuntimeLeases classified
            as cancelled or archived for inventory and cleanup. Inactive state
            does not prove provider absence or release managed-server capacity.
        managed_runtime_lease_generation_digests:
          type: array
          items:
            type: object
            required:
              - lease_id
              - resource_generation_digest
            properties:
              lease_id:
                type: string
              resource_generation_digest:
                type: string
                pattern: ^[0-9a-f]{64}$
          description: >-
            Canonically sorted opaque bindings from each visible managed
            RuntimeLease ID to its exact provider-resource generation. Missing
            coverage makes destructive inventory proof invalid while leaving
            ordinary dashboard inventory readable.
        managed_runtime_duplicate_lease_ids:
          type: array
          items:
            type: string
          description: >-
            Managed RuntimeLease IDs represented by multiple persisted worker
            rows before UI projection deduplication; must be empty for
            destructive inventory proof.
        managed_runtime_attachment_conflict_lease_ids:
          type: array
          items:
            type: string
          description: >-
            Canonically sorted caller-visible managed RuntimeLease IDs with a
            conflicting tenant-wide worker attachment; must be empty for
            destructive inventory proof and never exposes foreign private lease
            or worker details.
    ServiceAccess:
      type: object
      required:
        - mode
      properties:
        mode:
          type: string
          enum:
            - direct
            - relay
            - unavailable
        url:
          type: string
          format: uri
        access_profile_ref:
          type: string
        reason_code:
          type: string
        route_id:
          type: string
          description: >-
            Registered owner-isolated kombify.me tunnel route; never an
            arbitrary target address.
    ServiceMutationLock:
      type: object
      required:
        - state
      description: >-
        Owner guardrail of one service. Orthogonal to the measured dimensions: a
        locked service keeps running and keeps reporting its real observed
        state; only `allowed_actions` narrows. `reason_code` and `actor` are
        populated only while locked.
      properties:
        state:
          type: string
          enum:
            - unlocked
            - locked
        reason_code:
          type: string
          maxLength: 128
        actor:
          type: string
          maxLength: 256
        changed_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - INTERNAL_ERROR
                - NOT_FOUND
                - BAD_REQUEST
                - UNAUTHORIZED
                - FORBIDDEN
                - CONFLICT
                - VALIDATION_ERROR
                - RATE_LIMITED
                - SERVICE_UNAVAILABLE
                - METHOD_NOT_ALLOWED
            message:
              type: string
            details:
              description: Additional error context (validation errors, etc.)
  responses:
    Unauthorized:
      description: Authentication required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        OIDC/JWKS bearer token. Self-hosted defaults to Pocket ID; SaaS uses
        Auth0 through the edge. PocketBase JWT is legacy migration compatibility
        only.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.