Docupilot extensions API

The extensions API from Docupilot — 10 operation(s) for extensions.

OpenAPI Specification

docupilot-extensions-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Docupilot accounts APIs ai extensions API
  version: '1.0'
  description: Docupilot accounts APIs
  termsOfService: https://docupilot.app/terms-and-conditions/
  contact:
    name: Team Docupilot
    email: support@docupilot.app
tags:
- name: extensions
paths:
  /dashboard/extensions/:
    get:
      operationId: list_extensions
      summary: Get extensions
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - extensions
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedExtensionList'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
    post:
      operationId: create_extension
      summary: Create extension
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      tags:
      - extensions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Extension'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Extension'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Extension'
        required: true
      security:
      - SessionAuthentication: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Extension'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
  /dashboard/extensions/{extension_id}/responses/:
    get:
      operationId: get_extension_run_responses
      summary: Get extension run responses
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: extension_id
        schema:
          type: integer
        required: true
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - extensions
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedExtensionRunList'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/extensions/{extension_id}/responses/export/:
    get:
      operationId: export_extension_run_responses
      summary: Export extension run metadata and responses as Excel
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: extension_id
        schema:
          type: integer
        required: true
      tags:
      - extensions
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
              schema:
                type: string
                format: binary
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/extensions/{id}/:
    get:
      operationId: get_extension
      summary: Get extension
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        required: true
      tags:
      - extensions
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Extension'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
    put:
      operationId: update_extension
      summary: Edit extension
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        required: true
      tags:
      - extensions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Extension'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Extension'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Extension'
        required: true
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Extension'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
    patch:
      operationId: extensions_partial_update
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        required: true
      tags:
      - extensions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedExtension'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedExtension'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedExtension'
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Extension'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
    delete:
      operationId: delete_extension
      summary: Delete extension
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        required: true
      tags:
      - extensions
      security:
      - SessionAuthentication: []
      responses:
        '204':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/extensions/{id}/archive/:
    put:
      operationId: archive_extension
      summary: Archive extension
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        required: true
      tags:
      - extensions
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Extension'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/extensions/{id}/clone/:
    post:
      operationId: clone_extension
      summary: Clone extension
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        required: true
      tags:
      - extensions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CloneExtension'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CloneExtension'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CloneExtension'
      security:
      - SessionAuthentication: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Extension'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/extensions/{id}/permanent_delete/:
    delete:
      operationId: permanent_delete_extension
      summary: Permanently delete archived extension
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        required: true
      tags:
      - extensions
      security:
      - SessionAuthentication: []
      responses:
        '204':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/extensions/{id}/unarchive/:
    put:
      operationId: unarchive_extension
      summary: Unarchive extension
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        required: true
      tags:
      - extensions
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Extension'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/extensions/{workspace_unique}/{extension_unique}/config/:
    get:
      operationId: get_extension_config_by_unique_id
      summary: Get extension config by unique id
      parameters:
      - in: path
        name: extension_unique
        schema:
          type: string
        required: true
      - in: path
        name: workspace_unique
        schema:
          type: string
        required: true
      tags:
      - extensions
      security:
      - SessionAuthentication: []
      - {}
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtensionConfig'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
  /dashboard/extensions/{workspace_unique}/{extension_unique}/execute/:
    post:
      operationId: run_extension_by_unique_id
      summary: Execute extension by unique id
      parameters:
      - in: path
        name: extension_unique
        schema:
          type: string
        required: true
      - in: path
        name: workspace_unique
        schema:
          type: string
        required: true
      tags:
      - extensions
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: {}
          application/x-www-form-urlencoded:
            schema:
              type: object
              additionalProperties: {}
          multipart/form-data:
            schema:
              type: object
              additionalProperties: {}
      security:
      - SessionAuthentication: []
      - {}
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtensionRunResponse'
          description: ''
        '207':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtensionRunResponse'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: ''
components:
  schemas:
    ExtensionRunError:
      type: object
      properties:
        template_id:
          type: integer
          nullable: true
        error:
          type: string
      required:
      - error
      - template_id
      description: ''
    UnauthenticatedError:
      type: object
      properties:
        detail:
          type: string
      required:
      - detail
      description: ''
    PatchedExtension:
      type: object
      description: ''
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 255
        type:
          enum:
          - form_v1
          type: string
        unique_id:
          type: string
          readOnly: true
        is_public:
          type: boolean
        config:
          type: object
          additionalProperties: {}
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
        archived_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        created_by:
          type: integer
          readOnly: true
        updated_by:
          type: integer
          readOnly: true
    ValidationError:
      type: object
      properties:
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        non_field_errors:
          type: array
          items:
            type: string
      required:
      - errors
      - non_field_errors
      description: ''
    ForbiddenError:
      type: object
      properties:
        detail:
          type: string
      required:
      - detail
      description: ''
    ExtensionRun:
      type: object
      properties:
        user_id:
          type: integer
          nullable: true
          readOnly: true
        data:
          type: object
          additionalProperties: {}
        started_on:
          type: string
          format: date-time
          readOnly: true
        ended_on:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        status:
          enum:
          - queued
          - in_progress
          - success
          - partial_success
          - failed
          type: string
        request_id:
          type: string
          nullable: true
          maxLength: 255
        origin:
          type: string
          nullable: true
          maxLength: 255
      required:
      - ended_on
      - started_on
      - user_id
      description: ''
    PaginatedExtensionRunList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/ExtensionRun'
    ExtensionRunResponse:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/ExtensionRunResult'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ExtensionRunError'
      required:
      - errors
      - results
      description: ''
    Extension:
      type: object
      description: ''
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 255
        type:
          enum:
          - form_v1
          type: string
        unique_id:
          type: string
          readOnly: true
        is_public:
          type: boolean
        config:
          type: object
          additionalProperties: {}
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
        archived_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        created_by:
          type: integer
          readOnly: true
        updated_by:
          type: integer
          readOnly: true
      required:
      - archived_at
      - created_at
      - created_by
      - id
      - name
      - type
      - unique_id
      - updated_at
      - updated_by
    CloneExtension:
      type: object
      properties:
        name:
          type: string
          maxLength: 255
      description: ''
    NotFoundError:
      type: object
      properties:
        detail:
          type: string
      required:
      - detail
      description: ''
    ExtensionRunResult:
      type: object
      properties:
        template_id:
          type: integer
        file_name:
          type: string
        file_url:
          type: string
          format: uri
      required:
      - file_name
      - template_id
      description: ''
    PaginatedExtensionList:
      type: object
      required:
      - count
      - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/Extension'
    ExtensionConfig:
      type: object
      properties:
        config:
          type: object
          additionalProperties: {}
      required:
      - config
      description: ''
  securitySchemes:
    OAuthAuthentication:
      type: http
      scheme: bearer
      description: OAuth2 Bearer Token Authentication
    SessionAuthentication:
      type: apiKey
      in: cookie
      name: sessionid
      description: browser based login takes care of this
externalDocs:
  description: Help docs on how to use API
  url: https://help.docupilot.app/developers/api-overview