> ## 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.

# Get the caller's homelab and its StackKit deployments

> Resolves the authenticated owner's canonical Homelab umbrella together with its StackKit deployments. `homelab` is null while a backfill has deployments but no Homelab row yet; with neither, the route is 404. `homelab.identity_authority` names the identity Authority (the server that runs Pocket ID) and the identity origin.



## OpenAPI

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


    kombify-Homelab 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 Homelab 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/kombifyio/Homelab/blob/main/LICENSE
servers:
  - url: https://api.kombify.io/v1/homelab
    description: >-
      Production canonical (via Cloudflare edge gateway, strip-prefix). Clients
      MUST use this projection. The Gateway strips /v1/homelab 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://homelab.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/homelab.
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: 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/homelab:
    get:
      tags:
        - Stacks
      summary: Get the caller's homelab and its StackKit deployments
      description: >-
        Resolves the authenticated owner's canonical Homelab umbrella together
        with its StackKit deployments. `homelab` is null while a backfill has
        deployments but no Homelab row yet; with neither, the route is 404.
        `homelab.identity_authority` names the identity Authority (the server
        that runs Pocket ID) and the identity origin.
      operationId: getHomelab
      responses:
        '200':
          description: The caller's homelab
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    required:
                      - homelab
                      - kit_deployments
                    properties:
                      homelab:
                        oneOf:
                          - $ref: '#/components/schemas/Homelab'
                          - type: 'null'
                      kit_deployments:
                        type: array
                        items:
                          type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    Homelab:
      type: object
      description: The owner's Homelab umbrella (ADR-0036).
      required:
        - id
        - name
        - named
        - updated
        - identity_authority
      properties:
        id:
          type: string
        name:
          type: string
        named:
          type: boolean
          description: >-
            Whether the owner chose the name; a generated placeholder name
            reports false.
        named_at:
          type: string
          format: date-time
        intent:
          type: object
        created:
          type: string
          format: date-time
        updated:
          type: string
          format: date-time
        identity_authority:
          description: >-
            The authority pointer (ADR-036): the server that runs the homelab's
            one Pocket ID, the StackKit deployment that runs it there, and the
            identity origin. Null until the Authority server's Guard reported
            it.
          oneOf:
            - $ref: '#/components/schemas/HomelabIdentityAuthority'
            - type: 'null'
    HomelabIdentityAuthority:
      type: object
      required:
        - state
        - server_id
        - kit_deployment_id
        - identity_origin
        - observed_at
      properties:
        state:
          type: string
          enum:
            - current
            - departed
          description: >-
            departed once the Authority server left the homelab (decommissioned,
            its deployment deleted or moved). A successor serving the same
            identity origin, a restore, takes the pointer over; any other change
            of Authority is a governed operation.
        server_id:
          type: string
          description: The identity Authority, the server that runs Pocket ID.
        kit_deployment_id:
          type: string
          description: The StackKit deployment that runs Pocket ID on the Authority.
        identity_origin:
          $ref: '#/components/schemas/HomelabIdentityOrigin'
        observed_at:
          type: string
          format: date-time
          description: >-
            Guard observation time of the report that last set the pointer or
            origin.
    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.)
    HomelabIdentityOrigin:
      type: object
      description: >-
        The Pocket ID host and with it the passkey relying party
        (#IdentityOriginV1 of StackKits), as the Authority's Guard reported it;
        not verified against the kombify.me registry or DNS. Changing it
        re-registers passkeys.
      required:
        - name
        - host
        - source
        - certificates
      properties:
        name:
          type: string
          description: The homelab name the origin derives from.
        host:
          type: string
          description: The Pocket ID host, id.<name>.
        source:
          type: string
          enum:
            - kombify-me
            - own-domain
            - local-only
            - reserved-name
          description: >-
            kombify-me or own-domain for a named homelab, local-only for
            lab.home, reserved-name for a special-use name no public certificate
            authority signs.
        certificates:
          type: string
          enum:
            - publicly-trusted
            - homelab-root
  responses:
    Unauthorized:
      description: Authentication required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Resource not found
      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.