Alleva Document API

The Document API from Alleva — 6 operation(s) for document.

OpenAPI Specification

alleva-document-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Alleva Rest Document API
  version: '1.0'
security:
- Bearer: []
tags:
- name: Document
paths:
  /documents:
    post:
      tags:
      - Document
      parameters:
      - name: api-version
        in: query
        schema:
          type: string
      - name: X-Version
        in: header
        schema:
          type: string
      requestBody:
        content:
          application/json-patch+json; ver=1.0:
            schema:
              $ref: '#/components/schemas/Document'
          application/json; ver=1.0:
            schema:
              $ref: '#/components/schemas/Document'
          text/json; ver=1.0:
            schema:
              $ref: '#/components/schemas/Document'
          application/*+json; ver=1.0:
            schema:
              $ref: '#/components/schemas/Document'
      responses:
        '200':
          description: Success
          content:
            text/plain; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
            application/json; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
            text/json; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
    get:
      tags:
      - Document
      parameters:
      - name: Limit
        in: query
        schema:
          type: integer
          format: int64
      - name: Cursor
        in: query
        schema:
          type: integer
          format: int32
      - name: StartDate
        in: query
        schema:
          type: string
          format: date-time
      - name: EndDate
        in: query
        schema:
          type: string
          format: date-time
      - name: fields
        in: query
        schema:
          type: array
          items:
            type: string
      - name: api-version
        in: query
        schema:
          type: string
      - name: X-Version
        in: header
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            text/plain; ver=1.0:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Document'
            application/json; ver=1.0:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Document'
            text/json; ver=1.0:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Document'
  /v{version}/documents:
    post:
      tags:
      - Document
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
      - name: api-version
        in: query
        schema:
          type: string
      - name: X-Version
        in: header
        schema:
          type: string
      requestBody:
        content:
          application/json-patch+json; ver=1.0:
            schema:
              $ref: '#/components/schemas/Document'
          application/json; ver=1.0:
            schema:
              $ref: '#/components/schemas/Document'
          text/json; ver=1.0:
            schema:
              $ref: '#/components/schemas/Document'
          application/*+json; ver=1.0:
            schema:
              $ref: '#/components/schemas/Document'
      responses:
        '200':
          description: Success
          content:
            text/plain; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
            application/json; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
            text/json; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
    get:
      tags:
      - Document
      parameters:
      - name: Limit
        in: query
        schema:
          type: integer
          format: int64
      - name: Cursor
        in: query
        schema:
          type: integer
          format: int32
      - name: StartDate
        in: query
        schema:
          type: string
          format: date-time
      - name: EndDate
        in: query
        schema:
          type: string
          format: date-time
      - name: fields
        in: query
        schema:
          type: array
          items:
            type: string
      - name: version
        in: path
        required: true
        schema:
          type: string
      - name: api-version
        in: query
        schema:
          type: string
      - name: X-Version
        in: header
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            text/plain; ver=1.0:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Document'
            application/json; ver=1.0:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Document'
            text/json; ver=1.0:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Document'
  /documents/{id}:
    patch:
      tags:
      - Document
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: api-version
        in: query
        schema:
          type: string
      - name: X-Version
        in: header
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            text/plain; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
            application/json; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
            text/json; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
    delete:
      tags:
      - Document
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: api-version
        in: query
        schema:
          type: string
      - name: X-Version
        in: header
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            text/plain; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
            application/json; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
            text/json; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
    get:
      tags:
      - Document
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: api-version
        in: query
        schema:
          type: string
      - name: X-Version
        in: header
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            text/plain; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
            application/json; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
            text/json; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
  /v{version}/documents/{id}:
    patch:
      tags:
      - Document
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: version
        in: path
        required: true
        schema:
          type: string
      - name: api-version
        in: query
        schema:
          type: string
      - name: X-Version
        in: header
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            text/plain; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
            application/json; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
            text/json; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
    delete:
      tags:
      - Document
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: version
        in: path
        required: true
        schema:
          type: string
      - name: api-version
        in: query
        schema:
          type: string
      - name: X-Version
        in: header
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            text/plain; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
            application/json; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
            text/json; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
    get:
      tags:
      - Document
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: version
        in: path
        required: true
        schema:
          type: string
      - name: api-version
        in: query
        schema:
          type: string
      - name: X-Version
        in: header
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            text/plain; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
            application/json; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
            text/json; ver=1.0:
              schema:
                $ref: '#/components/schemas/Document'
  /documents/type:
    get:
      tags:
      - Document
      parameters:
      - name: api-version
        in: query
        schema:
          type: string
      - name: X-Version
        in: header
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            text/plain; ver=1.0:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DocumentTypeModal'
            application/json; ver=1.0:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DocumentTypeModal'
            text/json; ver=1.0:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DocumentTypeModal'
  /v{version}/documents/type:
    get:
      tags:
      - Document
      parameters:
      - name: version
        in: path
        required: true
        schema:
          type: string
      - name: api-version
        in: query
        schema:
          type: string
      - name: X-Version
        in: header
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            text/plain; ver=1.0:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DocumentTypeModal'
            application/json; ver=1.0:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DocumentTypeModal'
            text/json; ver=1.0:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DocumentTypeModal'
components:
  schemas:
    Document:
      type: object
      properties:
        id:
          type: integer
          format: int32
        href:
          type:
          - string
          - 'null'
          readOnly: true
        clientDocumentId:
          type: integer
          format: int64
        name:
          type:
          - string
          - 'null'
        description:
          type:
          - string
          - 'null'
        fileName:
          type:
          - string
          - 'null'
        client:
          $ref: '#/components/schemas/ResourceLink'
        status:
          type:
          - string
          - 'null'
        type:
          type:
          - string
          - 'null'
        typeId:
          type:
          - integer
          - 'null'
          format: int64
        uploadDate:
          type:
          - string
          - 'null'
          format: date-time
        url:
          $ref: '#/components/schemas/DocumentUrl'
        tableId:
          type:
          - integer
          - 'null'
          format: int64
        tableName:
          type:
          - string
          - 'null'
        path:
          type:
          - string
          - 'null'
        documentTypeId:
          type: integer
          format: int32
        uploadedDocuments:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/DocumentData'
      additionalProperties: false
    DocumentData:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type:
          - string
          - 'null'
        base64String:
          type:
          - string
          - 'null'
        externalId:
          $ref: '#/components/schemas/ExternalData'
      additionalProperties: false
    DocumentUrl:
      type: object
      properties:
        fileName:
          type:
          - string
          - 'null'
        host:
          type:
          - string
          - 'null'
          readOnly: true
        path:
          type:
          - string
          - 'null'
          readOnly: true
      additionalProperties: false
    ResourceLink:
      type: object
      properties:
        id:
          type: integer
          format: int32
        route:
          type:
          - string
          - 'null'
      additionalProperties: false
    ExternalData:
      type: object
      properties:
        externalId:
          type:
          - string
          - 'null'
        externalIdType:
          type:
          - string
          - 'null'
        serviceIdentifier:
          type:
          - string
          - 'null'
        serviceId:
          type:
          - integer
          - 'null'
          format: int32
      additionalProperties: false
    DocumentTypeModal:
      type: object
      properties:
        id:
          type: integer
          format: int32
        name:
          type:
          - string
          - 'null'
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: apiKey
      description: "JWT Authorization header using the Bearer scheme. \n\n Enter Bearer [space] and then\
        \ your token in the text input below.\n\nExample: Bearer 12345abcdef"
      name: Authorization
      in: header
servers:
- url: https://api.helloalleva.com
  description: Base URL reconciled from apis.yml