components:
  schemas:
    Agent:
      properties:
        backend:
          type: string
        capacity:
          type: integer
        created:
          type: integer
        custom_labels:
          additionalProperties:
            type: string
          type: object
        id:
          type: integer
        last_contact:
          type: integer
        last_work:
          description: >-
            last time the agent did something, this value is used to determine
            if the agent is still doing work used by the autoscaler
          type: integer
        name:
          type: string
        no_schedule:
          type: boolean
        org_id:
          description: >-
            OrgID is counted as unset if set to -1, this is done to ensure a
            new(Agent) still enforce the OrgID check by default
          type: integer
        owner_id:
          type: integer
        platform:
          type: string
        token:
          type: string
        updated:
          type: integer
        version:
          type: string
      type: object
    CancelInfo:
      properties:
        canceled_by_user:
          type: string
        superseded_by:
          type: integer
      type: object
    Config:
      properties:
        data:
          items:
            type: integer
          type: array
        hash:
          type: string
        name:
          type: string
      type: object
    Cron:
      properties:
        branch:
          type: string
        created:
          type: integer
        creator_id:
          description: 'TODO: drop with next major version'
          type: integer
        enabled:
          type: boolean
        id:
          type: integer
        name:
          type: string
        next_exec:
          type: integer
        repo_id:
          type: integer
        schedule:
          description: "@weekly,\t3min, ..."
          type: string
        variables:
          additionalProperties:
            type: string
          type: object
      type: object
    CronPatch:
      properties:
        branch:
          type: string
        enabled:
          type: boolean
        name:
          type: string
        schedule:
          type: string
        variables:
          additionalProperties:
            type: string
          type: object
      type: object
    Feed:
      properties:
        author:
          type: string
        author_avatar:
          type: string
        author_email:
          type: string
        branch:
          type: string
        commit:
          type: string
        created:
          type: integer
        event:
          type: string
        finished:
          type: integer
        id:
          type: integer
        message:
          type: string
        number:
          type: integer
        ref:
          type: string
        refspec:
          type: string
        repo_id:
          type: integer
        started:
          type: integer
        status:
          type: string
        title:
          type: string
      type: object
    Forge:
      properties:
        additional_options:
          additionalProperties: {}
          type: object
        client:
          type: string
        id:
          type: integer
        oauth_host:
          description: public url for oauth if different from url
          type: string
        skip_verify:
          type: boolean
        type:
          $ref: '#/components/schemas/model.ForgeType'
        url:
          type: string
      type: object
    ForgeWithOAuthClientSecret:
      properties:
        additional_options:
          additionalProperties: {}
          type: object
        client:
          type: string
        id:
          type: integer
        oauth_client_secret:
          type: string
        oauth_host:
          description: public url for oauth if different from url
          type: string
        skip_verify:
          type: boolean
        type:
          $ref: '#/components/schemas/model.ForgeType'
        url:
          type: string
      type: object
    LogEntry:
      properties:
        data:
          items:
            type: integer
          type: array
        id:
          type: integer
        line:
          type: integer
        step_id:
          type: integer
        time:
          type: integer
        type:
          $ref: '#/components/schemas/LogEntryType'
      type: object
    LogEntryType:
      enum:
        - 0
        - 1
        - 2
        - 3
        - 4
      type: integer
      x-enum-varnames:
        - LogEntryStdout
        - LogEntryStderr
        - LogEntryExitCode
        - LogEntryMetadata
        - LogEntryProgress
    Org:
      properties:
        forge_id:
          type: integer
        id:
          type: integer
        is_user:
          type: boolean
        name:
          type: string
      type: object
    OrgPerm:
      properties:
        admin:
          type: boolean
        member:
          type: boolean
      type: object
    Perm:
      properties:
        admin:
          type: boolean
        created:
          type: integer
        pull:
          type: boolean
        push:
          type: boolean
        synced:
          type: integer
        updated:
          type: integer
      type: object
    Pipeline:
      properties:
        author:
          type: string
        author_avatar:
          type: string
        author_email:
          type: string
        branch:
          type: string
        cancel_info:
          $ref: '#/components/schemas/CancelInfo'
        changed_files:
          items:
            type: string
          type: array
        commit:
          type: string
        created:
          type: integer
        deploy_task:
          type: string
        deploy_to:
          type: string
        errors:
          items:
            $ref: '#/components/schemas/errors.PipelineError'
          type: array
        event:
          $ref: '#/components/schemas/WebhookEvent'
        event_reason:
          items:
            type: string
          type: array
        finished:
          type: integer
        forge_url:
          type: string
        from_fork:
          type: boolean
        id:
          type: integer
        is_prerelease:
          type: boolean
        message:
          type: string
        number:
          type: integer
        parent:
          type: integer
        pr_labels:
          items:
            type: string
          type: array
        pr_milestone:
          type: string
        ref:
          type: string
        refspec:
          type: string
        reviewed:
          type: integer
        reviewed_by:
          type: string
        sender:
          description: uses reported user for webhooks and name of cron for cron pipelines
          type: string
        started:
          type: integer
        status:
          $ref: '#/components/schemas/StatusValue'
        timestamp:
          type: integer
        title:
          type: string
        updated:
          type: integer
        variables:
          additionalProperties:
            type: string
          type: object
        workflows:
          items:
            $ref: '#/components/schemas/model.Workflow'
          type: array
      type: object
    PipelineOptions:
      properties:
        branch:
          type: string
        variables:
          additionalProperties:
            type: string
          type: object
      type: object
    PullRequest:
      properties:
        index:
          type: string
        title:
          type: string
      type: object
    QueueInfo:
      properties:
        paused:
          type: boolean
        pending:
          items:
            $ref: '#/components/schemas/model.QueueTask'
          type: array
        running:
          items:
            $ref: '#/components/schemas/model.QueueTask'
          type: array
        stats:
          properties:
            pending_count:
              type: integer
            running_count:
              type: integer
            waiting_on_deps_count:
              type: integer
            worker_count:
              type: integer
          type: object
        waiting_on_deps:
          items:
            $ref: '#/components/schemas/model.QueueTask'
          type: array
      type: object
    Registry:
      properties:
        address:
          type: string
        id:
          type: integer
        org_id:
          type: integer
        password:
          type: string
        readonly:
          type: boolean
        repo_id:
          type: integer
        username:
          type: string
      type: object
    Repo:
      properties:
        active:
          type: boolean
        allow_deploy:
          type: boolean
        allow_pr:
          type: boolean
        approval_allowed_users:
          items:
            type: string
          type: array
        avatar_url:
          type: string
        cancel_previous_pipeline_events:
          items:
            $ref: '#/components/schemas/WebhookEvent'
          type: array
        clone_url:
          type: string
        clone_url_ssh:
          type: string
        config_extension_endpoint:
          type: string
        config_extension_exclusive:
          type: boolean
        config_file:
          type: string
        default_branch:
          type: string
        forge_id:
          type: integer
        forge_remote_id:
          description: >-
            ForgeRemoteID is the unique identifier for the repository on the
            forge.
          type: string
        forge_url:
          type: string
        full_name:
          type: string
        id:
          type: integer
        name:
          type: string
        netrc_trusted:
          items:
            type: string
          type: array
        org_id:
          type: integer
        owner:
          type: string
        pr_enabled:
          type: boolean
        private:
          type: boolean
        require_approval:
          $ref: '#/components/schemas/model.ApprovalMode'
        timeout:
          type: integer
        trusted:
          $ref: '#/components/schemas/model.TrustedConfiguration'
        visibility:
          $ref: '#/components/schemas/RepoVisibility'
      type: object
    RepoLastPipeline:
      properties:
        active:
          type: boolean
        allow_deploy:
          type: boolean
        allow_pr:
          type: boolean
        approval_allowed_users:
          items:
            type: string
          type: array
        avatar_url:
          type: string
        cancel_previous_pipeline_events:
          items:
            $ref: '#/components/schemas/WebhookEvent'
          type: array
        clone_url:
          type: string
        clone_url_ssh:
          type: string
        config_extension_endpoint:
          type: string
        config_extension_exclusive:
          type: boolean
        config_file:
          type: string
        default_branch:
          type: string
        forge_id:
          type: integer
        forge_remote_id:
          description: >-
            ForgeRemoteID is the unique identifier for the repository on the
            forge.
          type: string
        forge_url:
          type: string
        full_name:
          type: string
        id:
          type: integer
        last_pipeline:
          $ref: '#/components/schemas/Pipeline'
        name:
          type: string
        netrc_trusted:
          items:
            type: string
          type: array
        org_id:
          type: integer
        owner:
          type: string
        pr_enabled:
          type: boolean
        private:
          type: boolean
        require_approval:
          $ref: '#/components/schemas/model.ApprovalMode'
        timeout:
          type: integer
        trusted:
          $ref: '#/components/schemas/model.TrustedConfiguration'
        visibility:
          $ref: '#/components/schemas/RepoVisibility'
      type: object
    RepoPatch:
      properties:
        allow_deploy:
          type: boolean
        allow_pr:
          type: boolean
        approval_allowed_users:
          items:
            type: string
          type: array
        cancel_previous_pipeline_events:
          items:
            $ref: '#/components/schemas/WebhookEvent'
          type: array
        config_extension_endpoint:
          type: string
        config_extension_exclusive:
          type: boolean
        config_file:
          type: string
        netrc_trusted:
          items:
            type: string
          type: array
        require_approval:
          type: string
        timeout:
          type: integer
        trusted:
          $ref: '#/components/schemas/model.TrustedConfigurationPatch'
        visibility:
          type: string
      type: object
    RepoVisibility:
      enum:
        - public
        - private
        - internal
      type: string
      x-enum-varnames:
        - VisibilityPublic
        - VisibilityPrivate
        - VisibilityInternal
    Secret:
      properties:
        events:
          items:
            $ref: '#/components/schemas/WebhookEvent'
          type: array
        id:
          type: integer
        images:
          items:
            type: string
          type: array
        name:
          type: string
        note:
          type: string
        org_id:
          type: integer
        repo_id:
          type: integer
        value:
          type: string
      type: object
    SecretPatch:
      properties:
        events:
          items:
            $ref: '#/components/schemas/WebhookEvent'
          type: array
        images:
          items:
            type: string
          type: array
        name:
          type: string
        note:
          type: string
        value:
          type: string
      type: object
    StatusValue:
      enum:
        - skipped
        - pending
        - running
        - success
        - failure
        - killed
        - canceled
        - error
        - blocked
        - declined
        - created
      type: string
      x-enum-comments:
        StatusBlocked: waiting for approval
        StatusCanceled: canceled but hasn't been started
        StatusCreated: created / internal use only
        StatusDeclined: blocked and declined
        StatusError: error with the config / while parsing / some other system problem
        StatusFailure: failed to finish (exit code != 0)
        StatusKilled: killed by user
        StatusPending: pending to be executed
        StatusRunning: currently running
        StatusSkipped: skipped as another step failed
        StatusSuccess: successfully finished
      x-enum-descriptions:
        - skipped as another step failed
        - pending to be executed
        - currently running
        - successfully finished
        - failed to finish (exit code != 0)
        - killed by user
        - canceled but hasn't been started
        - error with the config / while parsing / some other system problem
        - waiting for approval
        - blocked and declined
        - created / internal use only
      x-enum-varnames:
        - StatusSkipped
        - StatusPending
        - StatusRunning
        - StatusSuccess
        - StatusFailure
        - StatusKilled
        - StatusCanceled
        - StatusError
        - StatusBlocked
        - StatusDeclined
        - StatusCreated
    Step:
      properties:
        error:
          type: string
        exit_code:
          type: integer
        finished:
          type: integer
        id:
          type: integer
        name:
          type: string
        pid:
          type: integer
        pipeline_id:
          type: integer
        ppid:
          type: integer
        started:
          type: integer
        state:
          $ref: '#/components/schemas/StatusValue'
        type:
          $ref: '#/components/schemas/StepType'
        uuid:
          type: string
      type: object
    StepType:
      enum:
        - clone
        - service
        - plugin
        - commands
        - cache
      type: string
      x-enum-varnames:
        - StepTypeClone
        - StepTypeService
        - StepTypePlugin
        - StepTypeCommands
        - StepTypeCache
    Task:
      properties:
        agent_id:
          type: integer
        dep_status:
          additionalProperties:
            $ref: '#/components/schemas/StatusValue'
          type: object
        dependencies:
          items:
            type: string
          type: array
        id:
          type: string
        labels:
          additionalProperties:
            type: string
          type: object
        name:
          type: string
        pid:
          type: integer
        pipeline_id:
          type: integer
        repo_id:
          type: integer
        run_on:
          items:
            type: string
          type: array
      type: object
    User:
      properties:
        admin:
          description: |-
            Admin indicates the user is a system administrator.

            NOTE: If the username is part of the WOODPECKER_ADMIN
            environment variable, this value will be set to true on login.
          type: boolean
        avatar_url:
          description: the avatar url for this user.
          type: string
        email:
          description: |-
            Email is the email address for this user.

            required: true
          type: string
        forge_id:
          type: integer
        forge_remote_id:
          type: string
        id:
          description: |-
            the id for this user.

            required: true
          type: integer
        login:
          description: |-
            Login is the username for this user.

            required: true
          type: string
        org_id:
          description: OrgID is the of the user as model.Org.
          type: integer
      type: object
    WebhookEvent:
      enum:
        - push
        - pull_request
        - pull_request_closed
        - pull_request_metadata
        - tag
        - release
        - deployment
        - cron
        - manual
      type: string
      x-enum-varnames:
        - EventPush
        - EventPull
        - EventPullClosed
        - EventPullMetadata
        - EventTag
        - EventRelease
        - EventDeploy
        - EventCron
        - EventManual
    errors.PipelineError:
      properties:
        data: {}
        is_warning:
          type: boolean
        message:
          type: string
        type:
          $ref: '#/components/schemas/errors.PipelineErrorType'
      type: object
    errors.PipelineErrorType:
      enum:
        - linter
        - deprecation
        - compiler
        - generic
        - bad_habit
      type: string
      x-enum-comments:
        PipelineErrorTypeBadHabit: some bad-habit error
        PipelineErrorTypeCompiler: some error with the config semantics
        PipelineErrorTypeDeprecation: using some deprecated feature
        PipelineErrorTypeGeneric: some generic error
        PipelineErrorTypeLinter: some error with the config syntax
      x-enum-descriptions:
        - some error with the config syntax
        - using some deprecated feature
        - some error with the config semantics
        - some generic error
        - some bad-habit error
      x-enum-varnames:
        - PipelineErrorTypeLinter
        - PipelineErrorTypeDeprecation
        - PipelineErrorTypeCompiler
        - PipelineErrorTypeGeneric
        - PipelineErrorTypeBadHabit
    metadata.Author:
      properties:
        avatar:
          type: string
        email:
          type: string
        name:
          type: string
      type: object
    metadata.Commit:
      properties:
        author:
          $ref: '#/components/schemas/metadata.Author'
        branch:
          type: string
        changed_files:
          items:
            type: string
          type: array
        is_prerelease:
          type: boolean
        labels:
          items:
            type: string
          type: array
        message:
          type: string
        milestone:
          type: string
        ref:
          type: string
        refspec:
          type: string
        sha:
          type: string
      type: object
    metadata.Forge:
      properties:
        type:
          type: string
        url:
          type: string
      type: object
    metadata.Metadata:
      properties:
        curr:
          $ref: '#/components/schemas/metadata.Pipeline'
        forge:
          $ref: '#/components/schemas/metadata.Forge'
        id:
          type: string
        prev:
          $ref: '#/components/schemas/metadata.Pipeline'
        repo:
          $ref: '#/components/schemas/metadata.Repo'
        step:
          $ref: '#/components/schemas/metadata.Step'
        sys:
          $ref: '#/components/schemas/metadata.System'
        workflow:
          $ref: '#/components/schemas/metadata.Workflow'
      type: object
    metadata.Pipeline:
      properties:
        author:
          type: string
        avatar:
          type: string
        commit:
          $ref: '#/components/schemas/metadata.Commit'
        created:
          type: integer
        cron:
          type: string
        event:
          type: string
        event_reason:
          items:
            type: string
          type: array
        finished:
          type: integer
        forge_url:
          type: string
        number:
          type: integer
        parent:
          type: integer
        started:
          type: integer
        status:
          type: string
        target:
          type: string
        task:
          type: string
      type: object
    metadata.Repo:
      properties:
        clone_url:
          type: string
        clone_url_ssh:
          type: string
        default_branch:
          type: string
        forge_url:
          type: string
        id:
          type: integer
        name:
          type: string
        owner:
          type: string
        private:
          type: boolean
        remote_id:
          type: string
        trusted:
          $ref: '#/components/schemas/metadata.TrustedConfiguration'
      type: object
    metadata.Step:
      properties:
        name:
          type: string
        number:
          type: integer
      type: object
    metadata.System:
      properties:
        arch:
          type: string
        host:
          type: string
        name:
          type: string
        url:
          type: string
        version:
          type: string
      type: object
    metadata.TrustedConfiguration:
      properties:
        network:
          type: boolean
        security:
          type: boolean
        volumes:
          type: boolean
      type: object
    metadata.Workflow:
      properties:
        matrix:
          additionalProperties:
            type: string
          type: object
        name:
          type: string
        number:
          type: integer
      type: object
    model.ApprovalMode:
      enum:
        - none
        - forks
        - pull_requests
        - all_events
      type: string
      x-enum-comments:
        RequireApprovalAllEvents: require approval for all external events
        RequireApprovalForks: require approval for PRs from forks (default)
        RequireApprovalNone: require approval for no events
        RequireApprovalPullRequests: require approval for all PRs
      x-enum-descriptions:
        - require approval for no events
        - require approval for PRs from forks (default)
        - require approval for all PRs
        - require approval for all external events
      x-enum-varnames:
        - RequireApprovalNone
        - RequireApprovalForks
        - RequireApprovalPullRequests
        - RequireApprovalAllEvents
    model.ForgeType:
      enum:
        - github
        - gitlab
        - gitea
        - forgejo
        - bitbucket
        - bitbucket-dc
        - addon
      type: string
      x-enum-varnames:
        - ForgeTypeGithub
        - ForgeTypeGitlab
        - ForgeTypeGitea
        - ForgeTypeForgejo
        - ForgeTypeBitbucket
        - ForgeTypeBitbucketDatacenter
        - ForgeTypeAddon
    model.QueueTask:
      properties:
        agent_id:
          type: integer
        agent_name:
          type: string
        dep_status:
          additionalProperties:
            $ref: '#/components/schemas/StatusValue'
          type: object
        dependencies:
          items:
            type: string
          type: array
        id:
          type: string
        labels:
          additionalProperties:
            type: string
          type: object
        name:
          type: string
        pid:
          type: integer
        pipeline_id:
          type: integer
        pipeline_number:
          type: integer
        repo_id:
          type: integer
        run_on:
          items:
            type: string
          type: array
      type: object
    model.TrustedConfiguration:
      properties:
        network:
          type: boolean
        security:
          type: boolean
        volumes:
          type: boolean
      type: object
    model.TrustedConfigurationPatch:
      properties:
        network:
          type: boolean
        security:
          type: boolean
        volumes:
          type: boolean
      type: object
    model.Workflow:
      properties:
        agent_id:
          type: integer
        children:
          items:
            $ref: '#/components/schemas/Step'
          type: array
        environ:
          additionalProperties:
            type: string
          type: object
        error:
          type: string
        finished:
          type: integer
        id:
          type: integer
        name:
          type: string
        pid:
          type: integer
        pipeline_id:
          type: integer
        platform:
          type: string
        started:
          type: integer
        state:
          $ref: '#/components/schemas/StatusValue'
      type: object
info:
  contact:
    name: Woodpecker CI
    url: https://woodpecker-ci.org/
  description: >-
    Woodpecker is a simple, yet powerful CI/CD engine with great extensibility.

    To get a personal access token (PAT) for authentication, please log in your
    Woodpecker server,

    and go to you personal profile page, by clicking the user icon at the top
    right.
  title: Woodpecker CI API
  version: dev
openapi: 3.0.3
paths:
  /agents:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: for response pagination, page offset number
          in: query
          name: page
          schema:
            default: 1
            type: integer
        - description: for response pagination, max items per page
          in: query
          name: perPage
          schema:
            default: 50
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Agent'
                type: array
          description: OK
      summary: List agents
      tags:
        - Agents
    post:
      description: Creates a new agent with a random token
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/Agent'
        description: the agent's data (only 'name' and 'no_schedule' are read)
        required: true
        x-originalParamName: agent
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
          description: OK
      summary: Create a new agent
      tags:
        - Agents
  /agents/{agent_id}:
    delete:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the agent's id
          in: path
          name: agent_id
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
      summary: Delete an agent
      tags:
        - Agents
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the agent's id
          in: path
          name: agent_id
          required: true
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
          description: OK
      summary: Get an agent
      tags:
        - Agents
    patch:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the agent's id
          in: path
          name: agent_id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/Agent'
        description: the agent's data
        required: true
        x-originalParamName: agentData
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
          description: OK
      summary: Update an agent
      tags:
        - Agents
  /agents/{agent_id}/tasks:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the agent's id
          in: path
          name: agent_id
          required: true
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Task'
                type: array
          description: OK
      summary: List agent tasks
      tags:
        - Agents
  /badges/{repo_id}/cc.xml:
    get:
      description: >-
        CCMenu displays the pipeline status of projects on a CI server as an
        item in the Mac's menu bar.

        More details on how to install, you can find at http://ccmenu.org/

        The response format adheres to CCTray v1 Specification,
        https://cctray.org/v1/
      parameters:
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
      summary: Provide pipeline status information to the CCMenu tool
      tags:
        - Badges
  /badges/{repo_id}/status.svg:
    get:
      parameters:
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
      summary: Get status of pipeline as SVG badge
      tags:
        - Badges
  /debug/pprof:
    get:
      description: Only available, when server was started with WOODPECKER_LOG_LEVEL=debug
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      responses:
        '200':
          description: OK
      summary: List available pprof profiles (HTML)
      tags:
        - Process profiling and debugging
  /debug/pprof/block:
    get:
      description: Only available, when server was started with WOODPECKER_LOG_LEVEL=debug
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      responses:
        '200':
          description: OK
      summary: >-
        Get pprof stack traces that led to blocking on synchronization
        primitives
      tags:
        - Process profiling and debugging
  /debug/pprof/cmdline:
    get:
      description: Only available, when server was started with WOODPECKER_LOG_LEVEL=debug
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      responses:
        '200':
          description: OK
      summary: Get the command line invocation of the current program
      tags:
        - Process profiling and debugging
  /debug/pprof/goroutine:
    get:
      description: Only available, when server was started with WOODPECKER_LOG_LEVEL=debug
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: >-
            Use debug=2 as a query parameter to export in the same format as an
            un-recovered panic
          in: query
          name: debug
          schema:
            default: 1
            type: integer
      responses:
        '200':
          description: OK
      summary: Get pprof stack traces of all current goroutines
      tags:
        - Process profiling and debugging
  /debug/pprof/heap:
    get:
      description: Only available, when server was started with WOODPECKER_LOG_LEVEL=debug
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: You can specify gc=heap to run GC before taking the heap sample
          in: query
          name: gc
          schema:
            default: ''
            type: string
      responses:
        '200':
          description: OK
      summary: Get pprof heap dump, a sampling of memory allocations of live objects
      tags:
        - Process profiling and debugging
  /debug/pprof/profile:
    get:
      description: >-
        Only available, when server was started with WOODPECKER_LOG_LEVEL=debug

        After you get the profile file, use the go tool pprof command to
        investigate the profile.
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: You can specify the duration in the seconds GET parameter.
          in: query
          name: seconds
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
      summary: Get pprof CPU profile
      tags:
        - Process profiling and debugging
  /debug/pprof/symbol:
    get:
      description: >-
        Only available, when server was started with WOODPECKER_LOG_LEVEL=debug

        Looks up the program counters listed in the request,

        responding with a table mapping program counters to function names.

        The requested program counters can be provided via GET + query
        parameters,

        or POST + body parameters. Program counters shall be space delimited.
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      responses:
        '200':
          description: OK
      summary: Get pprof program counters mapping to function names
      tags:
        - Process profiling and debugging
    post:
      description: >-
        Only available, when server was started with WOODPECKER_LOG_LEVEL=debug

        Looks up the program counters listed in the request,

        responding with a table mapping program counters to function names.

        The requested program counters can be provided via GET + query
        parameters,

        or POST + body parameters. Program counters shall be space delimited.
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      responses:
        '200':
          description: OK
      summary: Get pprof program counters mapping to function names
      tags:
        - Process profiling and debugging
  /debug/pprof/threadcreate:
    get:
      description: Only available, when server was started with WOODPECKER_LOG_LEVEL=debug
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      responses:
        '200':
          description: OK
      summary: Get pprof stack traces that led to the creation of new OS threads
      tags:
        - Process profiling and debugging
  /debug/pprof/trace:
    get:
      description: >-
        Only available, when server was started with WOODPECKER_LOG_LEVEL=debug

        After you get the profile file, use the go tool pprof command to
        investigate the profile.
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: You can specify the duration in the seconds GET parameter.
          in: query
          name: seconds
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
      summary: Get a trace of execution of the current program
      tags:
        - Process profiling and debugging
  /forges:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          schema:
            default: Bearer <personal access token>
            type: string
        - description: for response pagination, page offset number
          in: query
          name: page
          schema:
            default: 1
            type: integer
        - description: for response pagination, max items per page
          in: query
          name: perPage
          schema:
            default: 50
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Forge'
                type: array
          description: OK
      summary: List forges
      tags:
        - Forges
    post:
      description: Creates a new forge with a random token
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/ForgeWithOAuthClientSecret'
        description: the forge's data (only 'name' and 'no_schedule' are read)
        required: true
        x-originalParamName: forge
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forge'
          description: OK
      summary: Create a new forge
      tags:
        - Forges
  /forges/{forgeId}:
    delete:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the forge's id
          in: path
          name: forgeId
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
      summary: Delete a forge
      tags:
        - Forges
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the forge's id
          in: path
          name: forgeId
          required: true
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forge'
          description: OK
      summary: Get a forge
      tags:
        - Forges
    patch:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the forge's id
          in: path
          name: forgeId
          required: true
          schema:
            type: integer
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/ForgeWithOAuthClientSecret'
        description: the forge's data
        required: true
        x-originalParamName: forgeData
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forge'
          description: OK
      summary: Update a forge
      tags:
        - Forges
  /healthz:
    get:
      description: >-
        If everything is fine, just a 204 will be returned, a 500 signals server
        state is unhealthy.
      responses:
        '204':
          description: No Content
        '500':
          description: Internal Server Error
      summary: Health information
      tags:
        - System
  /hook:
    post:
      requestBody:
        content:
          '*/*':
            schema:
              type: object
        description: the webhook payload; forge is automatically detected
        required: true
        x-originalParamName: hook
      responses:
        '200':
          description: OK
      summary: Incoming webhook from forge
      tags:
        - System
  /log-level:
    get:
      description: Endpoint returns the current logging level. Requires admin rights.
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  log-level:
                    type: string
                type: object
          description: OK
      summary: Current log level
      tags:
        - System
    post:
      description: Endpoint sets the current logging level. Requires admin rights.
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              properties:
                log-level:
                  type: string
              type: object
        description: >-
          the new log level, one of
          <debug,trace,info,warn,error,fatal,panic,disabled>
        required: true
        x-originalParamName: log-level
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  log-level:
                    type: string
                type: object
          description: OK
      summary: Set log level
      tags:
        - System
  /orgs:
    get:
      description: Returns all registered orgs in the system. Requires admin rights.
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: for response pagination, page offset number
          in: query
          name: page
          schema:
            default: 1
            type: integer
        - description: for response pagination, max items per page
          in: query
          name: perPage
          schema:
            default: 50
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Org'
                type: array
          description: OK
      summary: List organizations
      tags:
        - Orgs
  /orgs/lookup/{org_full_name}:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the organizations full name / slug
          in: path
          name: org_full_name
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Org'
          description: OK
      summary: Lookup an organization by full name
      tags:
        - Orgs
  /orgs/{id}:
    delete:
      description: Deletes the given org. Requires admin rights.
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the org's id
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
      summary: Delete an organization
      tags:
        - Orgs
  /orgs/{org_id}:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the organization's id
          in: path
          name: org_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Org'
                type: array
          description: OK
      summary: Get an organization
      tags:
        - Organization
  /orgs/{org_id}/agents:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the organization's id
          in: path
          name: org_id
          required: true
          schema:
            type: integer
        - description: for response pagination, page offset number
          in: query
          name: page
          schema:
            default: 1
            type: integer
        - description: for response pagination, max items per page
          in: query
          name: perPage
          schema:
            default: 50
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Agent'
                type: array
          description: OK
      summary: List agents for an organization
      tags:
        - Agents
    post:
      description: >-
        Creates a new agent with a random token, scoped to the specified
        organization
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the organization's id
          in: path
          name: org_id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/Agent'
        description: the agent's data (only 'name' and 'no_schedule' are read)
        required: true
        x-originalParamName: agent
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
          description: OK
      summary: Create a new organization-scoped agent
      tags:
        - Agents
  /orgs/{org_id}/agents/{agent_id}:
    delete:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the organization's id
          in: path
          name: org_id
          required: true
          schema:
            type: integer
        - description: the agent's id
          in: path
          name: agent_id
          required: true
          schema:
            type: integer
      responses:
        '204':
          description: No Content
      summary: Delete an organization-scoped agent
      tags:
        - Agents
    patch:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the organization's id
          in: path
          name: org_id
          required: true
          schema:
            type: integer
        - description: the agent's id
          in: path
          name: agent_id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/Agent'
        description: the agent's updated data
        required: true
        x-originalParamName: agent
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
          description: OK
      summary: Update an organization-scoped agent
      tags:
        - Agents
  /orgs/{org_id}/permissions:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the organization's id
          in: path
          name: org_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/OrgPerm'
                type: array
          description: OK
      summary: >-
        Get the permissions of the currently authenticated user for the given
        organization
      tags:
        - Organization permissions
  /orgs/{org_id}/registries:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the org's id
          in: path
          name: org_id
          required: true
          schema:
            type: string
        - description: for response pagination, page offset number
          in: query
          name: page
          schema:
            default: 1
            type: integer
        - description: for response pagination, max items per page
          in: query
          name: perPage
          schema:
            default: 50
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Registry'
                type: array
          description: OK
      summary: List organization registries
      tags:
        - Organization registries
    post:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the org's id
          in: path
          name: org_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/Registry'
        description: the new registry
        required: true
        x-originalParamName: registryData
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Registry'
          description: OK
      summary: Create an organization registry
      tags:
        - Organization registries
  /orgs/{org_id}/registries/{registry}:
    delete:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the org's id
          in: path
          name: org_id
          required: true
          schema:
            type: string
        - description: the registry's name
          in: path
          name: registry
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
      summary: Delete an organization registry by name
      tags:
        - Organization registries
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the org's id
          in: path
          name: org_id
          required: true
          schema:
            type: string
        - description: the registry's address
          in: path
          name: registry
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Registry'
          description: OK
      summary: Get a organization registry by address
      tags:
        - Organization registries
    patch:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the org's id
          in: path
          name: org_id
          required: true
          schema:
            type: string
        - description: the registry's name
          in: path
          name: registry
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/Registry'
        description: the update registry data
        required: true
        x-originalParamName: registryData
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Registry'
          description: OK
      summary: Update an organization registry by name
      tags:
        - Organization registries
  /orgs/{org_id}/secrets:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the org's id
          in: path
          name: org_id
          required: true
          schema:
            type: string
        - description: for response pagination, page offset number
          in: query
          name: page
          schema:
            default: 1
            type: integer
        - description: for response pagination, max items per page
          in: query
          name: perPage
          schema:
            default: 50
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Secret'
                type: array
          description: OK
      summary: List organization secrets
      tags:
        - Organization secrets
    post:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the org's id
          in: path
          name: org_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/Secret'
        description: the new secret
        required: true
        x-originalParamName: secretData
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
          description: OK
      summary: Create an organization secret
      tags:
        - Organization secrets
  /orgs/{org_id}/secrets/{secret}:
    delete:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the org's id
          in: path
          name: org_id
          required: true
          schema:
            type: string
        - description: the secret's name
          in: path
          name: secret
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
      summary: Delete an organization secret by name
      tags:
        - Organization secrets
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the org's id
          in: path
          name: org_id
          required: true
          schema:
            type: string
        - description: the secret's name
          in: path
          name: secret
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
          description: OK
      summary: Get a organization secret by name
      tags:
        - Organization secrets
    patch:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the org's id
          in: path
          name: org_id
          required: true
          schema:
            type: string
        - description: the secret's name
          in: path
          name: secret
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/SecretPatch'
        description: the update secret data
        required: true
        x-originalParamName: secretData
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
          description: OK
      summary: Update an organization secret by name
      tags:
        - Organization secrets
  /pipelines:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Feed'
                type: array
          description: OK
      summary: List pipelines in queue
      tags:
        - Pipeline queues
  /queue/info:
    get:
      description: Returns pipeline queue information with agent details
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueueInfo'
          description: OK
      summary: Get pipeline queue information
      tags:
        - Pipeline queues
  /queue/norunningpipelines:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      responses:
        '204':
          description: No Content
      summary: Block til pipeline queue has a running item
      tags:
        - Pipeline queues
  /queue/pause:
    post:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      responses:
        '204':
          description: No Content
      summary: Pause the pipeline queue
      tags:
        - Pipeline queues
  /queue/resume:
    post:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      responses:
        '204':
          description: No Content
      summary: Resume the pipeline queue
      tags:
        - Pipeline queues
  /registries:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: for response pagination, page offset number
          in: query
          name: page
          schema:
            default: 1
            type: integer
        - description: for response pagination, max items per page
          in: query
          name: perPage
          schema:
            default: 50
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Registry'
                type: array
          description: OK
      summary: List global registries
      tags:
        - Registries
    post:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/Registry'
        description: the registry object data
        required: true
        x-originalParamName: registry
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Registry'
          description: OK
      summary: Create a global registry
      tags:
        - Registries
  /registries/{registry}:
    delete:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the registry's name
          in: path
          name: registry
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
      summary: Delete a global registry by name
      tags:
        - Registries
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the registry's name
          in: path
          name: registry
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Registry'
          description: OK
      summary: Get a global registry by name
      tags:
        - Registries
    patch:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the registry's name
          in: path
          name: registry
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/Registry'
        description: the registry's data
        required: true
        x-originalParamName: registryData
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Registry'
          description: OK
      summary: Update a global registry by name
      tags:
        - Registries
  /repos:
    get:
      description: Returns a list of all repositories. Requires admin rights.
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: only list active repos
          in: query
          name: active
          schema:
            type: boolean
        - description: for response pagination, page offset number
          in: query
          name: page
          schema:
            default: 1
            type: integer
        - description: for response pagination, max items per page
          in: query
          name: perPage
          schema:
            default: 50
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Repo'
                type: array
          description: OK
      summary: List all repositories on the server
      tags:
        - Repositories
    post:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the id of a repository at the forge
          in: query
          name: forge_remote_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Repo'
          description: OK
      summary: Activate a repository
      tags:
        - Repositories
  /repos/lookup/{repo_full_name}:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository full name / slug
          in: path
          name: repo_full_name
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Repo'
          description: OK
      summary: Lookup a repository by full name
      tags:
        - Repositories
  /repos/repair:
    post:
      description: Executes a repair process on all repositories. Requires admin rights.
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      responses:
        '204':
          description: No Content
      summary: Repair all repositories on the server
      tags:
        - Repositories
  /repos/{repo_id}:
    delete:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Repo'
          description: OK
      summary: Delete a repository
      tags:
        - Repositories
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Repo'
          description: OK
      summary: Get a repository
      tags:
        - Repositories
    patch:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/RepoPatch'
        description: the repository's information
        required: true
        x-originalParamName: repo
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Repo'
          description: OK
      summary: Update a repository
      tags:
        - Repositories
  /repos/{repo_id}/branches:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: for response pagination, page offset number
          in: query
          name: page
          schema:
            default: 1
            type: integer
        - description: for response pagination, max items per page
          in: query
          name: perPage
          schema:
            default: 50
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  type: string
                type: array
          description: OK
      summary: Get branches of a repository
      tags:
        - Repositories
  /repos/{repo_id}/chown:
    post:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Repo'
          description: OK
      summary: Change a repository's owner to the currently authenticated user
      tags:
        - Repositories
  /repos/{repo_id}/cron:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: for response pagination, page offset number
          in: query
          name: page
          schema:
            default: 1
            type: integer
        - description: for response pagination, max items per page
          in: query
          name: perPage
          schema:
            default: 50
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Cron'
                type: array
          description: OK
      summary: List cron jobs
      tags:
        - Repository cron jobs
    post:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/Cron'
        description: the new cron job
        required: true
        x-originalParamName: cronJob
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cron'
          description: OK
      summary: Create a cron job
      tags:
        - Repository cron jobs
  /repos/{repo_id}/cron/{cron}:
    delete:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the cron job id
          in: path
          name: cron
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
      summary: Delete a cron job
      tags:
        - Repository cron jobs
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the cron job id
          in: path
          name: cron
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cron'
          description: OK
      summary: Get a cron job
      tags:
        - Repository cron jobs
    patch:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the cron job id
          in: path
          name: cron
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/CronPatch'
        description: the cron job data
        required: true
        x-originalParamName: cronJob
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cron'
          description: OK
      summary: Update a cron job
      tags:
        - Repository cron jobs
    post:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the cron job id
          in: path
          name: cron
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pipeline'
          description: OK
      summary: Start a cron job now
      tags:
        - Repository cron jobs
  /repos/{repo_id}/logs/{number}:
    delete:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the number of the pipeline
          in: path
          name: number
          required: true
          schema:
            type: integer
      responses:
        '204':
          description: No Content
      summary: Deletes all logs of a pipeline
      tags:
        - Pipeline logs
  /repos/{repo_id}/logs/{number}/{stepID}:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the number of the pipeline
          in: path
          name: number
          required: true
          schema:
            type: integer
        - description: the step id
          in: path
          name: stepID
          required: true
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/LogEntry'
                type: array
          description: OK
      summary: Get logs for a pipeline step
      tags:
        - Pipeline logs
  /repos/{repo_id}/logs/{number}/{stepId}:
    delete:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the number of the pipeline
          in: path
          name: number
          required: true
          schema:
            type: integer
        - description: the step id
          in: path
          name: stepId
          required: true
          schema:
            type: integer
      responses:
        '204':
          description: No Content
      summary: Delete step logs of a pipeline
      tags:
        - Pipeline logs
  /repos/{repo_id}/move:
    post:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the username to move the repository to
          in: query
          name: to
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
      summary: Move a repository to a new owner
      tags:
        - Repositories
  /repos/{repo_id}/permissions:
    get:
      description: The repository permission, according to the used access token.
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Perm'
          description: OK
      summary: Check current authenticated users access to the repository
      tags:
        - Repositories
  /repos/{repo_id}/pipelines:
    get:
      description: Get a list of pipelines for a repository.
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: for response pagination, page offset number
          in: query
          name: page
          schema:
            default: 1
            type: integer
        - description: for response pagination, max items per page
          in: query
          name: perPage
          schema:
            default: 50
            type: integer
        - description: only return pipelines before this RFC3339 date
          in: query
          name: before
          schema:
            type: string
        - description: only return pipelines after this RFC3339 date
          in: query
          name: after
          schema:
            type: string
        - description: filter pipelines by branch
          in: query
          name: branch
          schema:
            type: string
        - description: filter pipelines by webhook events (comma separated)
          in: query
          name: event
          schema:
            type: string
        - description: filter pipelines by strings contained in ref
          in: query
          name: ref
          schema:
            type: string
        - description: filter pipelines by status
          in: query
          name: status
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Pipeline'
                type: array
          description: OK
      summary: List repository pipelines
      tags:
        - Pipelines
    post:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/PipelineOptions'
        description: the options for the pipeline to run
        required: true
        x-originalParamName: options
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pipeline'
          description: OK
      summary: Trigger a manual pipeline
      tags:
        - Pipelines
  /repos/{repo_id}/pipelines/{number}:
    delete:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the number of the pipeline
          in: path
          name: number
          required: true
          schema:
            type: integer
      responses:
        '204':
          description: No Content
      summary: Delete a pipeline
      tags:
        - Pipelines
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the number of the pipeline, OR 'latest'
          in: path
          name: number
          required: true
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pipeline'
          description: OK
      summary: Get a repositories pipeline
      tags:
        - Pipelines
    post:
      description: Restarts a pipeline optional with altered event, deploy or environment
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the number of the pipeline
          in: path
          name: number
          required: true
          schema:
            type: integer
        - description: override the event type
          in: query
          name: event
          schema:
            type: string
        - description: override the target deploy value
          in: query
          name: deploy_to
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pipeline'
          description: OK
      summary: Restart a pipeline
      tags:
        - Pipelines
  /repos/{repo_id}/pipelines/{number}/approve:
    post:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the number of the pipeline
          in: path
          name: number
          required: true
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pipeline'
          description: OK
      summary: Approve and start a pipeline
      tags:
        - Pipelines
  /repos/{repo_id}/pipelines/{number}/cancel:
    post:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the number of the pipeline
          in: path
          name: number
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
      summary: Cancel a pipeline
      tags:
        - Pipelines
  /repos/{repo_id}/pipelines/{number}/config:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the number of the pipeline
          in: path
          name: number
          required: true
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Config'
                type: array
          description: OK
      summary: Get configuration files for a pipeline
      tags:
        - Pipelines
  /repos/{repo_id}/pipelines/{number}/decline:
    post:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the number of the pipeline
          in: path
          name: number
          required: true
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pipeline'
          description: OK
      summary: Decline a pipeline
      tags:
        - Pipelines
  /repos/{repo_id}/pipelines/{number}/metadata:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the number of the pipeline
          in: path
          name: number
          required: true
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/metadata.Metadata'
          description: OK
      summary: >-
        Get metadata for a pipeline or a specific workflow, including previous
        pipeline info
      tags:
        - Pipelines
  /repos/{repo_id}/pull_requests:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: for response pagination, page offset number
          in: query
          name: page
          schema:
            default: 1
            type: integer
        - description: for response pagination, max items per page
          in: query
          name: perPage
          schema:
            default: 50
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/PullRequest'
                type: array
          description: OK
      summary: List active pull requests of a repository
      tags:
        - Repositories
  /repos/{repo_id}/registries:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: for response pagination, page offset number
          in: query
          name: page
          schema:
            default: 1
            type: integer
        - description: for response pagination, max items per page
          in: query
          name: perPage
          schema:
            default: 50
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Registry'
                type: array
          description: OK
      summary: List registries
      tags:
        - Repository registries
    post:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/Registry'
        description: the new registry data
        required: true
        x-originalParamName: registry
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Registry'
          description: OK
      summary: Create a registry
      tags:
        - Repository registries
  /repos/{repo_id}/registries/{registry}:
    delete:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the registry name
          in: path
          name: registry
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
      summary: Delete a registry by name
      tags:
        - Repository registries
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the registry name
          in: path
          name: registry
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Registry'
          description: OK
      summary: Get a registry by name
      tags:
        - Repository registries
    patch:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the registry name
          in: path
          name: registry
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/Registry'
        description: the attributes for the registry
        required: true
        x-originalParamName: registryData
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Registry'
          description: OK
      summary: Update a registry by name
      tags:
        - Repository registries
  /repos/{repo_id}/repair:
    post:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
      responses:
        '204':
          description: No Content
      summary: Repair a repository
      tags:
        - Repositories
  /repos/{repo_id}/secrets:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: for response pagination, page offset number
          in: query
          name: page
          schema:
            default: 1
            type: integer
        - description: for response pagination, max items per page
          in: query
          name: perPage
          schema:
            default: 50
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Secret'
                type: array
          description: OK
      summary: List repository secrets
      tags:
        - Repository secrets
    post:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/Secret'
        description: the new secret
        required: true
        x-originalParamName: secret
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
          description: OK
      summary: Create a repository secret
      tags:
        - Repository secrets
  /repos/{repo_id}/secrets/{secretName}:
    delete:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the secret name
          in: path
          name: secretName
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
      summary: Delete a repository secret by name
      tags:
        - Repository secrets
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the secret name
          in: path
          name: secretName
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
          description: OK
      summary: Get a repository secret by name
      tags:
        - Repository secrets
    patch:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the secret name
          in: path
          name: secretName
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/SecretPatch'
        description: the secret itself
        required: true
        x-originalParamName: secret
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
          description: OK
      summary: Update a repository secret by name
      tags:
        - Repository secrets
  /secrets:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: for response pagination, page offset number
          in: query
          name: page
          schema:
            default: 1
            type: integer
        - description: for response pagination, max items per page
          in: query
          name: perPage
          schema:
            default: 50
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Secret'
                type: array
          description: OK
      summary: List global secrets
      tags:
        - Secrets
    post:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/Secret'
        description: the secret object data
        required: true
        x-originalParamName: secret
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
          description: OK
      summary: Create a global secret
      tags:
        - Secrets
  /secrets/{secret}:
    delete:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the secret's name
          in: path
          name: secret
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
      summary: Delete a global secret by name
      tags:
        - Secrets
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the secret's name
          in: path
          name: secret
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
          description: OK
      summary: Get a global secret by name
      tags:
        - Secrets
    patch:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the secret's name
          in: path
          name: secret
          required: true
          schema:
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/SecretPatch'
        description: the secret's data
        required: true
        x-originalParamName: secretData
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
          description: OK
      summary: Update a global secret by name
      tags:
        - Secrets
  /signature/public-key:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      responses:
        '200':
          description: OK
      summary: Get server's signature public key
      tags:
        - System
  /stream/events:
    get:
      description: With quic and http2 support
      responses:
        '200':
          description: OK
      summary: Stream events like pipeline updates
      tags:
        - Events
  /stream/logs/{repo_id}/{pipeline}/{stepID}:
    get:
      parameters:
        - description: the repository id
          in: path
          name: repo_id
          required: true
          schema:
            type: integer
        - description: the number of the pipeline
          in: path
          name: pipeline
          required: true
          schema:
            type: integer
        - description: the step id
          in: path
          name: stepID
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
      summary: Stream logs of a pipeline step
      tags:
        - Pipeline logs
  /user:
    get:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
          description: OK
      summary: Get the currently authenticated user
      tags:
        - User
  /user/feed:
    get:
      description: >-
        The feed lists the most recent pipeline for the currently authenticated
        user.
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Feed'
                type: array
          description: OK
      summary: Get the currently authenticated users pipeline feed
      tags:
        - User
  /user/repos:
    get:
      description: Retrieve the currently authenticated User's Repository list
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: query all repos, including inactive ones
          in: query
          name: all
          schema:
            type: boolean
        - description: filter repos by name
          in: query
          name: name
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/RepoLastPipeline'
                type: array
          description: OK
      summary: Get user's repositories
      tags:
        - User
  /user/token:
    delete:
      description: >-
        Reset's the current personal access token of the user and returns a new
        one.
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      responses:
        '200':
          description: OK
      summary: Reset a token
      tags:
        - User
    post:
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      responses:
        '200':
          description: OK
      summary: Return the token of the current user as string
      tags:
        - User
  /users:
    get:
      description: >-
        Returns all registered, active users in the system. Requires admin
        rights.
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: for response pagination, page offset number
          in: query
          name: page
          schema:
            default: 1
            type: integer
        - description: for response pagination, max items per page
          in: query
          name: perPage
          schema:
            default: 50
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/User'
                type: array
          description: OK
      summary: List users
      tags:
        - Users
    post:
      description: >-
        Creates a new user account with the specified external login. Requires
        admin rights.
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/User'
        description: the user's data
        required: true
        x-originalParamName: user
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
          description: OK
      summary: Create a user
      tags:
        - Users
  /users/{login}:
    delete:
      description: Deletes the given user. Requires admin rights.
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the user's login name
          in: path
          name: login
          required: true
          schema:
            type: string
        - description: specify forge (else default will be used)
          in: query
          name: forge_id
          required: true
          schema:
            type: string
        - description: specify user id at forge (else fallback to login)
          in: query
          name: forge_remote_id
          schema:
            type: string
      responses:
        '204':
          description: No Content
      summary: Delete a user
      tags:
        - Users
    get:
      description: Returns a user with the specified login name. Requires admin rights.
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the user's login name
          in: path
          name: login
          required: true
          schema:
            type: string
        - description: specify forge (else default will be used)
          in: query
          name: forge_id
          required: true
          schema:
            type: string
        - description: specify user id at forge (else fallback to login)
          in: query
          name: forge_remote_id
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
          description: OK
      summary: Get a user
      tags:
        - Users
    patch:
      description: Changes the data of an existing user. Requires admin rights.
      parameters:
        - description: Insert your personal access token
          in: header
          name: Authorization
          required: true
          schema:
            default: Bearer <personal access token>
            type: string
        - description: the user's login name
          in: path
          name: login
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/User'
        description: the user's data
        required: true
        x-originalParamName: user
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
          description: OK
      summary: Update a user
      tags:
        - Users
  /version:
    get:
      description: Endpoint returns the server version and build information.
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  source:
                    type: string
                  version:
                    type: string
                type: object
          description: OK
      summary: Get version
      tags:
        - System
