Docupilot history API

The history API from Docupilot — 5 operation(s) for history.

OpenAPI Specification

docupilot-history-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Docupilot accounts APIs ai history 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: history
paths:
  /dashboard/api/v2/history/:
    get:
      operationId: get_created_documents_history
      summary: Get created documents history
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: query
        name: end_date
        schema:
          type: string
          format: date-time
        description: 'DateTime in this format: 2019-05-02 16:25:12.353000'
      - 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
      - in: query
        name: start_date
        schema:
          type: string
          format: date-time
        description: 'DateTime in this format: 2019-05-02 16:25:12.353000'
      - in: query
        name: status
        schema:
          type: string
          enum:
          - error
          - pending
          - success
      - in: query
        name: template
        schema:
          type: integer
      tags:
      - history
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedMergeHistoryList'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
  /dashboard/api/v2/history/{id}/download/:
    get:
      operationId: download_created_document
      summary: download generated document if available
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this merge history.
        required: true
      tags:
      - history
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            text/html:
              schema:
                type: string
                format: binary
            application/pdf:
              schema:
                type: string
                format: binary
            image/png:
              schema:
                type: string
                format: binary
            application/vnd.openxmlformats-officedocument.wordprocessingml.document:
              schema:
                type: string
                format: binary
            application/vnd.openxmlformats-officedocument.presentationml.presentation:
              schema:
                type: string
                format: binary
            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/api/v2/history/{id}/retry_delivery/:
    post:
      operationId: retry_delivery
      summary: retry failed documents delivery
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this merge history.
        required: true
      tags:
      - history
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MergeHistory'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/MergeHistory'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/MergeHistory'
        required: true
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MergeHistory'
          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/api/v2/history/export/:
    get:
      operationId: get_created_export_merge_history
      summary: Get created export history
      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
      tags:
      - history
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ExportMergeHistory'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
    post:
      operationId: create_export_history_task
      summary: Create export history task
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      tags:
      - history
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExportMergeHistory'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ExportMergeHistory'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ExportMergeHistory'
        required: true
      security:
      - OAuthAuthentication: []
      - SessionAuthentication: []
      - tokenAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExportMergeHistory'
          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/api/v2/history/export/{id}/download/:
    get:
      operationId: download_created_export_document
      summary: download generated export document if available
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: path
        name: id
        schema:
          type: integer
        description: A unique integer value identifying this export merge history task.
        required: true
      tags:
      - history
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            text/html:
              schema:
                type: string
                format: binary
            application/pdf:
              schema:
                type: string
                format: binary
            image/png:
              schema:
                type: string
                format: binary
            application/vnd.openxmlformats-officedocument.wordprocessingml.document:
              schema:
                type: string
                format: binary
            application/vnd.openxmlformats-officedocument.presentationml.presentation:
              schema:
                type: string
                format: binary
            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: ''
components:
  schemas:
    UnauthenticatedError:
      type: object
      properties:
        detail:
          type: string
      required:
      - detail
      description: ''
    PaginatedMergeHistoryList:
      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/MergeHistory'
    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: ''
    ChildTemplate:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        title:
          type: string
          readOnly: true
        description:
          type: string
          nullable: true
          maxLength: 255
        type:
          enum:
          - docx
          - html
          - dpt_pdf
          - fillable_pdf
          - pptx
          - xlsx
          - g_document
          - g_presentation
          - g_spreadsheet
          type: string
        created_time:
          type: string
          format: date-time
          readOnly: true
        updated_time:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        document_status:
          enum:
          - active
          - test
          type: string
        deleted_time:
          type: string
          format: date-time
          nullable: true
        use_v2_editor:
          type: boolean
        created_by:
          type: integer
          readOnly: true
        updated_by:
          type: integer
          readOnly: true
          nullable: true
        folder:
          type: integer
          nullable: true
      required:
      - created_by
      - created_time
      - id
      - title
      - updated_by
      - updated_time
      description: ''
    MergeHistory:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        template:
          allOf:
          - $ref: '#/components/schemas/ChildTemplate'
          readOnly: true
          nullable: true
        data:
          type: object
          additionalProperties: {}
        data_expired:
          type: boolean
        document_expired:
          type: boolean
        mode:
          type: string
        created_file_name:
          type: string
        delivery_type:
          type: string
          maxLength: 255
        status:
          enum:
          - pending
          - success
          - error
          type: string
        created_time:
          type: string
          format: date-time
          readOnly: true
        message:
          type: object
          additionalProperties: {}
          nullable: true
        callback_status:
          enum:
          - success
          - fail
          - null
          type: string
          nullable: true
        callback_failure_message:
          type: string
          nullable: true
        delivery:
          type: integer
          nullable: true
      required:
      - created_file_name
      - created_time
      - data
      - data_expired
      - delivery_type
      - document_expired
      - id
      - mode
      - status
      - template
      description: ''
    ForbiddenError:
      type: object
      properties:
        detail:
          type: string
      required:
      - detail
      description: ''
    ExportMergeHistory:
      type: object
      description: ''
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          readOnly: true
        from_date:
          type: string
          format: date
        to_date:
          type: string
          format: date
        status:
          enum:
          - pending
          - success
          - error
          type: string
      required:
      - from_date
      - id
      - name
      - to_date
    NotFoundError:
      type: object
      properties:
        detail:
          type: string
      required:
      - detail
      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