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

# Create Log Source

> Register a new log source for an app.



## OpenAPI

````yaml POST /api/v1/apps/{id}/log-sources
openapi: 3.1.0
info:
  title: Rigbox Public API
  description: >-
    Gateway-owned public API for Rigbox. The gateway composes its local
    lifecycle API with service-owned exported specs.
  contact:
    name: Rigbox
    url: https://rigbox.dev
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.rigbox.dev
    description: Production gateway
security: []
tags:
  - name: Workspaces
  - name: CLI
  - name: Observability
  - name: Auth
  - name: API Keys
  - name: Access Control
  - name: Apps
  - name: App Catalog
  - name: Logs
  - name: AI
  - name: Tools
  - name: Snapshots
  - name: SSH Keys
  - name: Templates
  - name: Setup Scripts
  - name: Service Specs
  - name: Deploy
  - name: Community
  - name: User Settings
  - name: Roadmap
  - name: System
paths:
  /api/v1/apps/{id}/log-sources:
    post:
      tags:
        - Logs
      summary: Create a log source for an app.
      description: Create a new log source for an app.
      operationId: create_app_log_source
      parameters:
        - name: id
          in: path
          description: App ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAppLogSourceRequest'
        required: true
      responses:
        '200':
          description: Log source created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAppLogSourceResponse'
      security:
        - bearer: []
components:
  schemas:
    CreateAppLogSourceRequest:
      type: object
      required:
        - source_type
        - source_ref
      properties:
        display_name:
          type:
            - string
            - 'null'
        is_primary:
          type:
            - boolean
            - 'null'
        source_ref:
          type: string
        source_type:
          type: string
    GetAppLogSourceResponse:
      type: object
      required:
        - source
      properties:
        source:
          $ref: '#/components/schemas/AppLogSource'
    AppLogSource:
      type: object
      required:
        - id
        - app_id
        - source_type
        - source_ref
        - is_primary
        - created_at
        - updated_at
      properties:
        app_id:
          type: string
        created_at:
          type: string
          format: date-time
        display_name:
          type:
            - string
            - 'null'
        id:
          type: string
        is_primary:
          type: boolean
        source_ref:
          type: string
        source_type:
          $ref: '#/components/schemas/AppLogSourceType'
        updated_at:
          type: string
          format: date-time
    AppLogSourceType:
      type: string
      enum:
        - systemd_unit
        - docker_container
        - file_path
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````