Dokploy patch API

The patch API from Dokploy — 12 operation(s) for patch.

OpenAPI Specification

dokploy-patch-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Dokploy admin patch API
  description: Complete API documentation for Dokploy - Deploy applications, manage databases, and orchestrate your infrastructure. This API allows you to programmatically manage all aspects of your Dokploy instance.
  version: 1.0.0
  contact:
    name: Dokploy Team
    url: https://dokploy.com
  license:
    name: Apache 2.0
    url: https://github.com/dokploy/dokploy/blob/canary/LICENSE
servers:
- url: https://your-dokploy-instance.com/api
security:
- apiKey: []
tags:
- name: patch
paths:
  /patch.create:
    post:
      operationId: patch-create
      tags:
      - patch
      security:
      - Authorization: []
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                filePath:
                  type: string
                  minLength: 1
                content:
                  type: string
                type:
                  type: string
                  enum:
                  - create
                  - update
                  - delete
                enabled:
                  type: boolean
                applicationId:
                  anyOf:
                  - type: string
                  - type: 'null'
                composeId:
                  anyOf:
                  - type: string
                  - type: 'null'
              required:
              - filePath
              - content
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties: {}
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
  /patch.one:
    get:
      operationId: patch-one
      tags:
      - patch
      security:
      - Authorization: []
      parameters:
      - in: query
        name: patchId
        schema:
          type: string
          minLength: 1
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties: {}
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
  /patch.byEntityId:
    get:
      operationId: patch-byEntityId
      tags:
      - patch
      security:
      - Authorization: []
      parameters:
      - in: query
        name: id
        schema:
          type: string
        required: true
      - in: query
        name: type
        schema:
          type: string
          enum:
          - application
          - compose
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties: {}
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
  /patch.update:
    post:
      operationId: patch-update
      tags:
      - patch
      security:
      - Authorization: []
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                patchId:
                  type: string
                  minLength: 1
                type:
                  type: string
                  enum:
                  - create
                  - update
                  - delete
                filePath:
                  type: string
                  minLength: 1
                enabled:
                  type: boolean
                content:
                  type: string
                createdAt:
                  type: string
                updatedAt:
                  anyOf:
                  - type: string
                  - type: 'null'
              required:
              - patchId
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties: {}
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
  /patch.delete:
    post:
      operationId: patch-delete
      tags:
      - patch
      security:
      - Authorization: []
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                patchId:
                  type: string
                  minLength: 1
              required:
              - patchId
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties: {}
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
  /patch.toggleEnabled:
    post:
      operationId: patch-toggleEnabled
      tags:
      - patch
      security:
      - Authorization: []
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                patchId:
                  type: string
                  minLength: 1
                enabled:
                  type: boolean
              required:
              - patchId
              - enabled
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties: {}
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
  /patch.ensureRepo:
    post:
      operationId: patch-ensureRepo
      tags:
      - patch
      security:
      - Authorization: []
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                type:
                  type: string
                  enum:
                  - application
                  - compose
              required:
              - id
              - type
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties: {}
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
  /patch.readRepoDirectories:
    get:
      operationId: patch-readRepoDirectories
      tags:
      - patch
      security:
      - Authorization: []
      parameters:
      - in: query
        name: id
        schema:
          type: string
          minLength: 1
        required: true
      - in: query
        name: type
        schema:
          type: string
          enum:
          - application
          - compose
        required: true
      - in: query
        name: repoPath
        schema:
          type: string
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties: {}
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
  /patch.readRepoFile:
    get:
      operationId: patch-readRepoFile
      tags:
      - patch
      security:
      - Authorization: []
      parameters:
      - in: query
        name: id
        schema:
          type: string
          minLength: 1
        required: true
      - in: query
        name: type
        schema:
          type: string
          enum:
          - application
          - compose
        required: true
      - in: query
        name: filePath
        schema:
          type: string
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties: {}
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
  /patch.saveFileAsPatch:
    post:
      operationId: patch-saveFileAsPatch
      tags:
      - patch
      security:
      - Authorization: []
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  minLength: 1
                type:
                  type: string
                  enum:
                  - application
                  - compose
                filePath:
                  type: string
                content:
                  type: string
                patchType:
                  default: update
                  type: string
                  enum:
                  - create
                  - update
              required:
              - id
              - type
              - filePath
              - content
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties: {}
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
  /patch.markFileForDeletion:
    post:
      operationId: patch-markFileForDeletion
      tags:
      - patch
      security:
      - Authorization: []
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  minLength: 1
                type:
                  type: string
                  enum:
                  - application
                  - compose
                filePath:
                  type: string
              required:
              - id
              - type
              - filePath
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties: {}
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
  /patch.cleanPatchRepos:
    post:
      operationId: patch-cleanPatchRepos
      tags:
      - patch
      security:
      - Authorization: []
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                serverId:
                  type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties: {}
                additionalProperties: false
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '401':
          description: Authorization not provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.UNAUTHORIZED'
        '403':
          description: Insufficient access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.FORBIDDEN'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
components:
  schemas:
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Internal server error
        code:
          type: string
          description: The error code
          example: INTERNAL_SERVER_ERROR
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
            - message
            additionalProperties: false
      required:
      - message
      - code
      additionalProperties: false
      title: Internal server error error (500)
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []
    error.FORBIDDEN:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Insufficient access
        code:
          type: string
          description: The error code
          example: FORBIDDEN
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
            - message
            additionalProperties: false
      required:
      - message
      - code
      additionalProperties: false
      title: Insufficient access error (403)
      description: The error information
      example:
        code: FORBIDDEN
        message: Insufficient access
        issues: []
    error.NOT_FOUND:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Not found
        code:
          type: string
          description: The error code
          example: NOT_FOUND
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
            - message
            additionalProperties: false
      required:
      - message
      - code
      additionalProperties: false
      title: Not found error (404)
      description: The error information
      example:
        code: NOT_FOUND
        message: Not found
        issues: []
    error.UNAUTHORIZED:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Authorization not provided
        code:
          type: string
          description: The error code
          example: UNAUTHORIZED
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
            - message
            additionalProperties: false
      required:
      - message
      - code
      additionalProperties: false
      title: Authorization not provided error (401)
      description: The error information
      example:
        code: UNAUTHORIZED
        message: Authorization not provided
        issues: []
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Invalid input data
        code:
          type: string
          description: The error code
          example: BAD_REQUEST
        issues:
          description: An array of issues that were responsible for the error
          example: []
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
            - message
            additionalProperties: false
      required:
      - message
      - code
      additionalProperties: false
      title: Invalid input data error (400)
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        issues: []
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API key authentication. Generate an API key from your Dokploy dashboard under Settings > API Keys.
externalDocs:
  description: Full documentation
  url: https://docs.dokploy.com