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

# Post apiv1deployments

> Record new deployment



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/v1/deployments
openapi: 3.0.0
info:
  title: QYL Observability API
  version: '2026-01-26'
servers:
  - url: https://api.staging.qyl.dev
    description: QYL Staging API
    variables: {}
  - url: https://api.qyl.dev
    description: QYL Production API
    variables: {}
security: []
tags:
  - name: Streaming
  - name: Traces
  - name: Logs
  - name: Metrics
  - name: Sessions
  - name: Errors
  - name: Deployments
  - name: Services
  - name: Health
  - name: Workspaces
  - name: Onboarding
  - name: Configurator
  - name: Issues
  - name: Workflows
  - name: Search
  - name: Alerts
paths:
  /api/v1/deployments:
    post:
      tags:
        - Deployments
      description: Record new deployment
      operationId: DeploymentsApi_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeploymentCreate'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Qyl.Domains.Ops.Deployment.DeploymentEntity
        '400':
          description: Bad request - validation failed (400)
          headers:
            X-Trace-Id:
              required: false
              description: Trace ID for correlation
              schema:
                type: string
            X-Request-Id:
              required: false
              description: Request ID for support
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Qyl.Common.Errors.ValidationError'
        '500':
          description: Internal server error (500)
          headers:
            X-Trace-Id:
              required: false
              description: Trace ID for correlation
              schema:
                type: string
            X-Request-Id:
              required: false
              description: Request ID for support
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Qyl.Common.Errors.InternalServerError'
components:
  schemas:
    DeploymentCreate:
      type: object
      required:
        - service_name
        - service_version
        - environment
        - strategy
      properties:
        service_name:
          type: string
          description: Service name
        service_version:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.SemVer'
          description: Service version
        environment:
          allOf:
            - $ref: >-
                #/components/schemas/Qyl.Domains.Ops.Deployment.DeploymentEnvironment
          description: Environment
        strategy:
          allOf:
            - $ref: >-
                #/components/schemas/Qyl.Domains.Ops.Deployment.DeploymentStrategy
          description: Strategy
        deployed_by:
          type: string
          description: Deployed by
        git_commit:
          type: string
          description: Git commit SHA
        git_branch:
          type: string
          description: Git branch
      description: Deployment creation request
    Qyl.Domains.Ops.Deployment.DeploymentEntity:
      type: object
      required:
        - deployment.id
        - service.name
        - service.version
        - environment
        - status
        - strategy
        - start_time
      properties:
        deployment.id:
          type: string
          description: Deployment ID
        service.name:
          type: string
          description: Service name
        service.version:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.SemVer'
          description: Service version
        environment:
          allOf:
            - $ref: >-
                #/components/schemas/Qyl.Domains.Ops.Deployment.DeploymentEnvironment
          description: Environment
        status:
          allOf:
            - $ref: '#/components/schemas/Qyl.Domains.Ops.Deployment.DeploymentStatus'
          description: Status
        strategy:
          allOf:
            - $ref: >-
                #/components/schemas/Qyl.Domains.Ops.Deployment.DeploymentStrategy
          description: Strategy
        start_time:
          type: string
          format: date-time
          description: Start time
        end_time:
          type: string
          format: date-time
          description: End time
        duration_s:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.DurationS'
          description: Duration in seconds
        deployed_by:
          type: string
          description: Deployed by (user/system)
        git_commit:
          type: string
          description: Git commit SHA
        git_branch:
          type: string
          description: Git branch
        previous_version:
          allOf:
            - $ref: '#/components/schemas/Qyl.Common.SemVer'
          description: Previous version
        rollback_target:
          type: string
          description: Rollback target (if rolled back)
        replica_count:
          type: integer
          format: int32
          description: Replica count
        healthy_replicas:
          type: integer
          format: int32
          description: Healthy replica count
        error_message:
          type: string
          description: Error message (if failed)
      description: Complete deployment record
      x-csharp-type: DeploymentEntity
      x-duckdb-table: deployments
    Qyl.Common.Errors.ValidationError:
      type: object
      required:
        - title
        - errors
      properties:
        title:
          type: string
          enum:
            - Validation Failed
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Qyl.Common.Errors.ValidationErrorDetail'
          description: List of validation errors
      allOf:
        - $ref: '#/components/schemas/Qyl.Common.Errors.ProblemDetails'
      description: Bad request - validation failed (400)
    Qyl.Common.Errors.InternalServerError:
      type: object
      required:
        - title
      properties:
        title:
          type: string
          enum:
            - Internal Server Error
        error_code:
          type: string
          description: Error code for support reference
      allOf:
        - $ref: '#/components/schemas/Qyl.Common.Errors.ProblemDetails'
      description: Internal server error (500)
    Qyl.Common.SemVer:
      type: string
      pattern: >-
        ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
      description: Semantic version string (e.g., 1.2.3)
      example: 2.1.0
    Qyl.Domains.Ops.Deployment.DeploymentEnvironment:
      type: string
      enum:
        - development
        - testing
        - staging
        - production
        - preview
        - canary
      description: Deployment environments
    Qyl.Domains.Ops.Deployment.DeploymentStrategy:
      type: string
      enum:
        - rolling
        - blue_green
        - canary
        - recreate
        - ab_test
        - shadow
        - feature_flag
      description: Deployment strategies
    Qyl.Domains.Ops.Deployment.DeploymentStatus:
      type: string
      enum:
        - pending
        - in_progress
        - success
        - failed
        - rolled_back
        - cancelled
      description: Deployment status
    Qyl.Common.DurationS:
      type: number
      format: double
      minimum: 0
      description: Duration in seconds
    Qyl.Common.Errors.ValidationErrorDetail:
      type: object
      required:
        - field
        - message
        - code
      properties:
        field:
          type: string
          description: The field/property that failed validation
        message:
          type: string
          description: The error message
        code:
          type: string
          description: The validation rule that failed
        rejected_value:
          type: string
          description: The rejected value (if safe to include)
      description: Individual validation error detail
    Qyl.Common.Errors.ProblemDetails:
      type: object
      required:
        - type
        - title
        - status
      properties:
        type:
          type: string
          format: uri
          description: A URI reference identifying the problem type
          default: about:blank
        title:
          type: string
          description: A short, human-readable summary of the problem type
        status:
          type: integer
          format: int32
          description: >-
            The HTTP status code (informational only, actual code set by
            subtype)
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence
        instance:
          type: string
          format: uri
          description: A URI reference identifying the specific occurrence
        timestamp:
          type: string
          format: date-time
          description: Timestamp of the error
      description: RFC 7807 Problem Details for HTTP APIs

````