openapi: 3.0.3
tags:
  - name: Customer Machines
    description: >-
      Managing the customers and their machines for uploading the customer data
      from Newforma to the TonicDM cloud.
  - name: Upload Jobs
    description: Creating job templates and running jobs on the customer machines.
  - name: Projects and Paths
    description: >-
      Tracks the project list in the customer Newforma database and matches them
      to projects in the TonicDM production database.
  - name: Import Emails
    description: >-
      Manages the flow of emails from the customer Newforma system into the
      TonicDM production system.
x-tagGroups:
  - name: NFTT
    tags:
      - Customer Machines
      - Upload Jobs
      - Projects and Paths
      - Import Emails
info:
  title: NFTT API
  version: 0.0.5
  description: API for the NFTT importing system of TonicDM
  contact:
    name: Reg Prentice
    url: https://developers-internal.tonicdm.com
    email: apisupport@tonicdm.com
  termsOfService: http://www.tonicdm.com/terms
  license:
    name: Proprietary
    url: https://www.tonicdm.com/license-api
servers:
  - url: https://us-api.tonicdm.com
    description: Server located in the USA
  - url: https://de-api.tonicdm.com
    description: Server located in Germany
  - url: https://ie-api.tonicdm.com
    description: Server located in Ireland
security:
  - OAuth2:
      - read
      - write
  - apiKeyAuth: []
paths:
  /nftt/organizations:
    description: >-
      Defines the TonicDM customer organization where we will be running the
      upload jobs.
    get:
      summary: Get NFTT Organizations
      operationId: get-nftt-organization
      description: >
        Get the data on customer organizations.


        The `filterIds` query parameter takes the IDs of organizations. If none
        are given, data for all organizations are returned. 

        `searchQuery` searches on organization name. 

        Results are returned sorted on organization name.

        Results are always in the form of an array (even if there is only one
        result).
      tags:
        - Customer Machines
      parameters:
        - $ref: '#/components/parameters/searchQuery'
        - $ref: '#/components/parameters/filterIds'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/pageNumber'
        - $ref: '#/components/parameters/sortDirection'
      responses:
        '200':
          description: >-
            Successfully read the resource you requested. One or more records
            are returned in the form of an array.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NfttOrganizationWithId'
              examples:
                NfttOrganizationsWithIdArray:
                  $ref: '#/components/examples/NfttOrganizationsWithIdArray'
        '204':
          $ref: '#/components/responses/NoContentSuccess'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
      x-amazon-apigateway-integration:
        requestParameters:
          integration.request.header.searchQuery: method.request.header.searchQuery
          integration.request.header.filterIds: method.request.header.filterIds
          integration.request.header.filterOrganizationIds: method.request.header.filterOrganizationIds
          integration.request.header.dataQuantity: method.request.header.dataQuantity
          integration.request.header.pageSize: method.request.header.pageSize
          integration.request.header.pageNumber: method.request.header.pageNumber
          integration.request.header.sortDirection: method.request.header.sortDirection
    post:
      summary: New NFTT Organization
      operationId: post-nftt-organization
      description: >-
        Adds a customer organization to the NFTT system. The Organization ID
        added here should be the same as the ID in hte main platform.
      tags:
        - Customer Machines
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttOrganizationWithId'
                - required:
                    - id
                    - name
      responses:
        '201':
          description: Successfully created the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttOrganizationWithId'
              examples:
                NfttOrganizationWithId:
                  $ref: '#/components/examples/NfttOrganizationWithId'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    patch:
      summary: Edit NFTT Organization
      operationId: patch-nftt-organization
      description: >-
        Edit a customer organization to change its name or correct its ID. If
        the ID is changed here, it must also be changing on the customer
        machine.
      tags:
        - Customer Machines
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttOrganizationWithId'
                - required:
                    - id
                    - name
      responses:
        '201':
          description: Successfully modified the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttOrganizationWithId'
              examples:
                NfttOrganizationWithId:
                  $ref: '#/components/examples/NfttOrganizationWithId'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
  /nftt/nodes:
    description: >-
      Registers the health of the customer nodes on Windows who check in on a
      schedule.
    get:
      summary: Get NFTT Nodes
      operationId: get-nftt-node
      description: >
        Get the data on one or more customer nodes (machines).


        The `filterIds` parameter takes the IDs of nodes. If none are given,
        data for all nodes are returned. 

        `searchQuery` searches on node name. 

        Results are returned sorted on node name.

        Results are always in the form of an array (even if there is only one
        result).
      tags:
        - Customer Machines
      parameters:
        - $ref: '#/components/parameters/searchQuery'
        - $ref: '#/components/parameters/filterIds'
        - $ref: '#/components/parameters/filterOrganizationIds'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/pageNumber'
        - $ref: '#/components/parameters/sortDirection'
      responses:
        '200':
          description: >-
            Successfully read the resource you requested. One or more records
            are returned in the form of an array.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NfttNodeWithId'
              examples:
                nfttNodeWithIdArray:
                  $ref: '#/components/examples/NfttNodeWithIdArray'
        '204':
          $ref: '#/components/responses/NoContentSuccess'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
      x-amazon-apigateway-integration:
        requestParameters:
          integration.request.header.searchQuery: method.request.header.searchQuery
          integration.request.header.filterIds: method.request.header.filterIds
          integration.request.header.filterOrganizationIds: method.request.header.filterOrganizationIds
          integration.request.header.dataQuantity: method.request.header.dataQuantity
          integration.request.header.pageSize: method.request.header.pageSize
          integration.request.header.pageNumber: method.request.header.pageNumber
          integration.request.header.sortDirection: method.request.header.sortDirection
    post:
      summary: New NFTT Node
      operationId: post-nftt-node
      description: >-
        Add a machine (node) to a customer organization. Nodes should be added
        here to get the ID which is then entered into the uploading software on
        the customer side.
      tags:
        - Customer Machines
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttNode'
                - required:
                    - organizationId
                    - name
      responses:
        '201':
          description: Successfully created the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttNodeWithId'
              examples:
                node:
                  $ref: '#/components/examples/NfttNodeWithId'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    patch:
      summary: Edit NFTT Node
      operationId: patch-nftt-node
      description: Edit an NFTT Node to change the name.
      tags:
        - Customer Machines
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttNodeWithId'
                - required:
                    - id
      responses:
        '201':
          description: Successfully modified the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttNodeWithId'
              examples:
                node:
                  $ref: '#/components/examples/NfttNodeWithId'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
  /nftt/heartbeats:
    description: >-
      The customer NFTT nodes on Windows check in on a schedule delivering info
      on the health of machine to the cloud, and getting instructions on the
      next job from the cloud in the response.
    get:
      summary: Get NFTT Heartbeats
      operationId: get-nftt-heartbeat
      description: >
        The customer NFTT nodes on Windows check in on a schedule delivering
        info on their health with any messages to the cloud, 

        and getting instructions on the next job from the cloud in the
        response. 


        `searchQuery` searches the text of the message field.

        Sorting is on 

        `filterNodeIds` and `filterOrganizationIds` can be used to limit the
        results, but only one is needed (since filterNodeIds is a subset of
        filterOrganizationIds).


        *Note:* The way that the data provided in the request is completely
        different to data provided in the response, making this endpoint
        non-standard.  
      tags:
        - Customer Machines
      parameters:
        - $ref: '#/components/parameters/searchQuery'
        - name: filterNodeIds
          in: query
          description: >
            Returns heartbeat data for the specified node IDs. Should not be
            combined with `filterOrganizationIds`.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              format: uuid
          example: '{nodeId},{nodeId},{nodeId}'
        - $ref: '#/components/parameters/filterOrganizationIds'
        - $ref: '#/components/parameters/filterStartDate'
        - $ref: '#/components/parameters/filterEndDate'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/pageNumber'
        - $ref: '#/components/parameters/sortDirection'
      responses:
        '200':
          description: >-
            Successfully read the resource you requested. One or more records
            are returned in the form of an array.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NfttHeartbeatWithId'
              examples:
                nfttHeartbeatWithIdArray:
                  $ref: '#/components/examples/NfttHeartbeatWithIdArray'
        '204':
          $ref: '#/components/responses/NoContentSuccess'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
      x-amazon-apigateway-integration:
        requestParameters:
          integration.request.header.searchQuery: method.request.header.searchQuery
          integration.request.header.filterIds: method.request.header.filterIds
          integration.request.header.filterOrganizationIds: method.request.header.filterOrganizationIds
          integration.request.header.dataQuantity: method.request.header.dataQuantity
          integration.request.header.pageSize: method.request.header.pageSize
          integration.request.header.pageNumber: method.request.header.pageNumber
          integration.request.header.sortDirection: method.request.header.sortDirection
    post:
      summary: New NFTT Heartbeat
      operationId: post-nftt-heartbeat
      description: >
        Add a Heartbeat to an NFTT Organization.

        The customer NFTT nodes on Windows who check in on a schedule delivering
        info on the health of machine to the cloud, 

        and getting instructions on the next job from the cloud in the
        response. 

        The way that the data provided in the request is completely different to
        data provided in the response makes this endpoint non-standard.  
      tags:
        - Customer Machines
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttHeartbeat'
                - required:
                    - organizationId
                    - nodeId
      responses:
        '201':
          description: >-
            Successfully created the resource you sent. See response body for
            instructions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttHeartbeatResponse'
              examples:
                heartbeat:
                  $ref: '#/components/examples/NfttHeartbeatResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
  /nftt/templates:
    description: >-
      Manages the Templates that define code that can be run on the customer
      machines.
    get:
      summary: Get NFTT Templates
      operationId: get-nftt-template
      description: >
        Get the Templates that define code that can be run on the customer
        machines.
      tags:
        - Upload Jobs
      parameters:
        - $ref: '#/components/parameters/searchQuery'
        - $ref: '#/components/parameters/filterIds'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/pageNumber'
        - $ref: '#/components/parameters/sortDirection'
      responses:
        '200':
          description: >-
            Successfully read the resource you requested. One or more records
            are returned in the form of an array.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NfttTemplateWithId'
              examples:
                nfttTemplateWithIdArray:
                  $ref: '#/components/examples/NfttTemplateWithIdArray'
        '204':
          $ref: '#/components/responses/NoContentSuccess'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
      x-amazon-apigateway-integration:
        requestParameters:
          integration.request.header.searchQuery: method.request.header.searchQuery
          integration.request.header.filterIds: method.request.header.filterIds
          integration.request.header.pageSize: method.request.header.pageSize
          integration.request.header.pageNumber: method.request.header.pageNumber
          integration.request.header.sortDirection: method.request.header.sortDirection
    post:
      summary: New NFTT Template
      operationId: post-nftt-template
      description: Add a Template to define code that can be run on the customer machines.
      tags:
        - Upload Jobs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttTemplate'
                - required:
                    - name
                    - commandType
                    - commandText
                    - resultsDestination
      responses:
        '201':
          description: Successfully created the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttTemplateWithId'
              examples:
                template:
                  $ref: '#/components/examples/NfttTemplateWithId'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    patch:
      summary: Edit NFTT Template
      operationId: patch-nftt-template
      description: Edit an NFTT Job Template as required.
      tags:
        - Upload Jobs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttTemplateWithId'
                - required:
                    - id
      responses:
        '201':
          description: Successfully modified the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttTemplateWithId'
              examples:
                template:
                  $ref: '#/components/examples/NfttTemplateWithId'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    delete:
      summary: Delete Template
      tags:
        - Upload Jobs
      operationId: delete-template
      description: Delete a template from the NFTT system.
      parameters:
        - name: templateId
          in: query
          description: The GUID of the template to be deleted
          schema:
            type: string
      responses:
        '200':
          description: Successfully deleted the resource you requested
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
  /nftt/templatevariables:
    description: >-
      Registers the health of the customer templatevariables on Windows who
      check in on a schedule.
    get:
      summary: Get NFTT TemplateVariables
      operationId: get-nftt-templatevariable
      description: >
        Get the variables for a template. 


        `filterIds` in the parameters refers to the IDs of the templates that
        the variables belong to. Typically this will be called with only one ID.
      tags:
        - Upload Jobs
      parameters:
        - $ref: '#/components/parameters/filterIds'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/pageNumber'
        - $ref: '#/components/parameters/sortDirection'
      responses:
        '200':
          description: >-
            Successfully read the resource you requested. One or more records
            are returned in the form of an array.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NfttTemplateVariableWithId'
              examples:
                nfttTemplateVariableWithIdArray:
                  $ref: '#/components/examples/NfttTemplateVariableWithIdArray'
        '204':
          $ref: '#/components/responses/NoContentSuccess'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
      x-amazon-apigateway-integration:
        requestParameters:
          integration.request.header.filterIds: method.request.header.filterIds
          integration.request.header.pageSize: method.request.header.pageSize
          integration.request.header.pageNumber: method.request.header.pageNumber
          integration.request.header.sortDirection: method.request.header.sortDirection
    post:
      summary: New NFTT TemplateVariable
      operationId: post-nftt-templatevariable
      description: Add a TemplateVariable to a Template.
      tags:
        - Upload Jobs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttTemplateVariable'
                - required:
                    - templateId
                    - name
      responses:
        '201':
          description: Successfully created the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttTemplateVariableWithId'
              examples:
                templatevariable:
                  $ref: '#/components/examples/NfttTemplateVariableWithId'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    patch:
      summary: Edit NFTT TemplateVariable
      operationId: patch-nftt-templatevariable
      description: >-
        Edit an NFTT TemplateVariable to change the name or move it to another
        template.
      tags:
        - Upload Jobs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttTemplateVariableWithId'
                - required:
                    - id
      responses:
        '201':
          description: Successfully modified the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttTemplateVariableWithId'
              examples:
                templatevariable:
                  $ref: '#/components/examples/NfttTemplateVariableWithId'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    delete:
      summary: Delete TemplateVariable
      tags:
        - Upload Jobs
      operationId: delete-templatevariable
      description: Delete a variable from a template.
      parameters:
        - name: templateVariableId
          in: query
          description: The GUID of the template variable to be deleted
          schema:
            type: string
      responses:
        '200':
          description: Successfully deleted the resource you requested
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
  /nftt/jobs:
    description: >-
      Manages the Jobs run on the customer machines. Each Job is based on a
      Template.
    get:
      summary: Get NFTT Jobs
      operationId: get-nftt-job
      description: >
        Get the Jobs that are to be run, running, and have run on the customer
        machines.
      tags:
        - Upload Jobs
      parameters:
        - $ref: '#/components/parameters/filterOrganizationIds'
        - name: filterNodeIds
          in: query
          description: >-
            Returns all the jobs for the specified Node IDs. Typically called
            with a single Node ID.
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              format: uuid
          example: '{nodeId},{nodeId},{nodeId}'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/pageNumber'
        - name: sortBy
          in: query
          schema:
            type: string
            enum:
              - organizationName
              - nodeName
              - templateName
              - status
        - $ref: '#/components/parameters/sortDirection'
      responses:
        '200':
          description: >-
            Successfully read the resource you requested. One or more records
            are returned in the form of an array.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NfttJobWithId'
              examples:
                nfttJobWithIdArray:
                  $ref: '#/components/examples/NfttJobWithIdArray'
        '204':
          $ref: '#/components/responses/NoContentSuccess'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
      x-amazon-apigateway-integration:
        requestParameters:
          integration.request.header.searchQuery: method.request.header.searchQuery
          integration.request.header.filterIds: method.request.header.filterIds
          integration.request.header.pageSize: method.request.header.pageSize
          integration.request.header.pageNumber: method.request.header.pageNumber
          integration.request.header.sortDirection: method.request.header.sortDirection
    post:
      summary: New NFTT Job
      operationId: post-nftt-job
      description: Add a Job to be run on a customer machine.
      tags:
        - Upload Jobs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttJob'
                - required:
                    - nodeID
                    - templateId
      responses:
        '201':
          description: Successfully created the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttJobWithId'
              examples:
                job:
                  $ref: '#/components/examples/NfttJobWithId'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    patch:
      summary: Edit NFTT Job
      operationId: patch-nftt-job
      description: Edit a Job which is still in Draft status.
      tags:
        - Upload Jobs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttJobWithId'
                - required:
                    - id
      responses:
        '201':
          description: Successfully modified the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttJobWithId'
              examples:
                job:
                  $ref: '#/components/examples/NfttJobWithId'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    delete:
      summary: Delete Job
      tags:
        - Upload Jobs
      operationId: delete-job
      description: >-
        Delete a job in the NFTT system. Note that only `draft` jobs are allowed
        to be deleted.
      parameters:
        - name: jobId
          in: query
          description: The GUID of the job to be deleted
          schema:
            type: string
      responses:
        '200':
          description: Successfully deleted the resource you requested
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
  /nftt/jobvariables:
    description: >-
      Registers the health of the customer jobvariables on Windows who check in
      on a schedule.
    get:
      summary: Get NFTT JobVariables
      operationId: get-nftt-jobvariable
      description: >
        Get the variable values for a job. The list of variables is defined in
        the template.


        Specifiy the jobs to return the variable values for in `filterIds`. 
      tags:
        - Upload Jobs
      parameters:
        - $ref: '#/components/parameters/filterIds'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/pageNumber'
      responses:
        '200':
          description: >-
            Successfully read the resource you requested. One or more records
            are returned in the form of an array.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NfttJobVariable'
              examples:
                nfttJobVariableWithIdArray:
                  $ref: '#/components/examples/NfttJobVariableArray'
        '204':
          $ref: '#/components/responses/NoContentSuccess'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
      x-amazon-apigateway-integration:
        requestParameters:
          integration.request.header.filterIds: method.request.header.filterIds
          integration.request.header.pageSize: method.request.header.pageSize
          integration.request.header.pageNumber: method.request.header.pageNumber
          integration.request.header.sortDirection: method.request.header.sortDirection
    post:
      summary: New NFTT JobVariable
      operationId: post-nftt-jobvariable
      description: Add a JobVariable value to a job.
      tags:
        - Upload Jobs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttJobVariable'
                - required:
                    - jobId
                    - variableId
                    - value
      responses:
        '201':
          description: Successfully created the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttJobVariable'
              examples:
                jobvariable:
                  $ref: '#/components/examples/NfttJobVariable'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    patch:
      summary: Edit NFTT JobVariable
      operationId: patch-nftt-jobvariable
      description: Edit an NFTT JobVariable to change the value.
      tags:
        - Upload Jobs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttJobVariable'
                - required:
                    - jobId
                    - variableId
                    - value
      responses:
        '201':
          description: Successfully modified the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttJobVariable'
              examples:
                jobvariable:
                  $ref: '#/components/examples/NfttJobVariable'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    delete:
      summary: Delete JobVariable
      tags:
        - Upload Jobs
      operationId: delete-jobvariable
      description: Delete a variable from a job in the NFTT system.
      parameters:
        - name: jobVariableId
          in: query
          description: The GUID of the job variable to be deleted
          schema:
            type: string
      responses:
        '200':
          description: Successfully deleted the resource you requested
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
  /nftt/pathcache:
    description: >-
      Records specific paths that store emails for a specific project nunmber.
      This is used as a shortcut for determining the project number from a given
      path.
    get:
      summary: Get Cached Paths from NFTT
      operationId: get-nftt-path-cache
      description: |
        Get the list path caches for a given customer.
      tags:
        - Projects and Paths
      parameters:
        - $ref: '#/components/parameters/filterOrganizationIds'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/pageNumber'
        - name: sortBy
          in: query
          schema:
            type: string
            enum:
              - path
        - $ref: '#/components/parameters/sortDirection'
      responses:
        '200':
          description: >-
            Successfully read the resource you requested. One or more records
            are returned in the form of an array.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NfttPathCacheWithId'
        '204':
          $ref: '#/components/responses/NoContentSuccess'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
      x-amazon-apigateway-integration:
        requestParameters:
          integration.request.header.filterIds: method.request.header.filterIds
          integration.request.header.pageSize: method.request.header.pageSize
          integration.request.header.pageNumber: method.request.header.pageNumber
          integration.request.header.sortDirection: method.request.header.sortDirection
    post:
      summary: Add a Cached Paths for a given customer to NFTT
      operationId: post-nftt-path-cache
      description: Add a Cached Path for a given customer to NFTT.
      tags:
        - Projects and Paths
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttPathCache'
                - required:
                    - organizationId
                    - pathText
                    - projectNumber
      responses:
        '201':
          description: Successfully created the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttPathCacheWithId'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    patch:
      summary: Edit a Cache Path for a customer in NFTT
      operationId: patch-nftt-path-cache
      description: |
        Edit a Cache Path for a customer in NFTT.
      tags:
        - Projects and Paths
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttPathCacheWithId'
                - required:
                    - id
      responses:
        '201':
          description: Successfully modified the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttPathCacheWithId'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    delete:
      summary: Delete a Cache Path for a customer in NFTT
      tags:
        - Projects and Paths
      operationId: delete-nftt-path-cache
      description: Delete a Cache Path for a customer in NFTT.
      parameters:
        - name: id
          in: query
          required: true
          description: The GUID of the project path to be deleted
          schema:
            type: string
      responses:
        '200':
          description: Successfully deleted the resource you requested
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
  /nftt/pathtemplates:
    description: >-
      Tracks the path templates for customer network paths that allows
      determining a project number from a given network path.
    get:
      summary: Get Template Paths from NFTT
      operationId: get-nftt-path-template
      description: |
        Get the list path templates for a given customer.
      tags:
        - Projects and Paths
      parameters:
        - $ref: '#/components/parameters/filterOrganizationIds'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/pageNumber'
        - name: sortBy
          in: query
          schema:
            type: string
            enum:
              - path
        - $ref: '#/components/parameters/sortDirection'
      responses:
        '200':
          description: >-
            Successfully read the resource you requested. One or more records
            are returned in the form of an array.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NfttPathTemplateWithId'
              examples:
                NfttPathTemplateWithIdArray:
                  $ref: '#/components/examples/NfttPathTemplateWithIdArray'
        '204':
          $ref: '#/components/responses/NoContentSuccess'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
      x-amazon-apigateway-integration:
        requestParameters:
          integration.request.header.filterIds: method.request.header.filterIds
          integration.request.header.pageSize: method.request.header.pageSize
          integration.request.header.pageNumber: method.request.header.pageNumber
          integration.request.header.sortDirection: method.request.header.sortDirection
    post:
      summary: Add Template Paths for a given customer to NFTT
      operationId: post-nftt-path-template
      description: Add a Template Path for a given customer to NFTT
      tags:
        - Projects and Paths
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttPathTemplate'
                - required:
                    - newformaProjectId
                    - newformaProjectPath
      responses:
        '201':
          description: Successfully created the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttPathTemplateWithId'
              examples:
                NfttPathTemplateWithId:
                  $ref: '#/components/examples/NfttPathTemplateWithId'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    patch:
      summary: Edit a Template Path for a customer in NFTT
      operationId: patch-nftt-path-template
      description: |
        Edit a Template Path for a customer in NFTT.
      tags:
        - Projects and Paths
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttPathTemplateWithId'
                - required:
                    - id
      responses:
        '201':
          description: Successfully modified the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttPathTemplateWithId'
              examples:
                NfttPathTemplateWithId:
                  $ref: '#/components/examples/NfttPathTemplateWithId'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    delete:
      summary: Delete a Template Path for a customer in NFTT
      tags:
        - Projects and Paths
      operationId: delete-nftt-path-template
      description: Delete a Template Path for a customer in NFTT.
      parameters:
        - name: id
          in: query
          required: true
          description: The GUID of the project path to be deleted
          schema:
            type: string
      responses:
        '200':
          description: Successfully deleted the resource you requested
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
  /nftt/projects-staging:
    description: >-
      represents staging projects in the NFTT system. These are intended to
      become projects in the TonicDM Production system.
    get:
      summary: Get Staging Projects from NFTT
      operationId: get-nftt-project-staging
      description: |
        Get the list of staging projects in the TonicDM NFTT system.
      tags:
        - Projects and Paths
      parameters:
        - $ref: '#/components/parameters/searchQuery'
        - $ref: '#/components/parameters/filterIds'
        - $ref: '#/components/parameters/filterOrganizationIds'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/pageNumber'
        - name: sortBy
          in: query
          schema:
            type: string
            enum:
              - stagingProjectNumber
              - stagingProjectName
        - $ref: '#/components/parameters/sortDirection'
      responses:
        '200':
          description: >-
            Successfully read the resource you requested. One or more records
            are returned in the form of an array.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NfttProjectStaging'
              examples:
                NfttProjectStagingArray:
                  $ref: '#/components/examples/NfttProjectStagingArray'
        '204':
          $ref: '#/components/responses/NoContentSuccess'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
      x-amazon-apigateway-integration:
        requestParameters:
          integration.request.header.filterIds: method.request.header.filterIds
          integration.request.header.pageSize: method.request.header.pageSize
          integration.request.header.pageNumber: method.request.header.pageNumber
          integration.request.header.sortDirection: method.request.header.sortDirection
    post:
      summary: Add a New Staging Project to NFTT
      operationId: post-nftt-project-staging
      description: Add a new Staging project stored in the TonicDM NFTT system.
      tags:
        - Projects and Paths
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttProjectStaging'
                - required:
                    - organizationId
                    - stagingProjectId
                    - stagingProjectLongName
      responses:
        '201':
          description: Successfully created the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttProjectStaging'
              examples:
                NfttProjectStaging:
                  $ref: '#/components/examples/NfttProjectStaging'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    patch:
      summary: Edit a Staging Project in NFTT
      operationId: patch-nftt-project-staging
      description: Edit a Staging project stored in the TonicDM NFTT system.
      tags:
        - Projects and Paths
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttProjectStaging'
                - required:
                    - organizationId
                    - stagingProjectId
      responses:
        '201':
          description: Successfully modified the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttProjectStaging'
              examples:
                NfttProjectStaging:
                  $ref: '#/components/examples/NfttProjectStaging'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    delete:
      summary: Delete a Staging Project from NFTT
      tags:
        - Projects and Paths
      operationId: delete-nftt-project-staging
      description: Delete a Staging project stored in the TonicDM NFTT system.
      parameters:
        - name: organizationId
          in: query
          description: The GUID of the organization that owns the record to be deleted
          schema:
            type: string
        - name: stagingProjectId
          in: query
          description: The GUID of the Staging project to be deleted
          schema:
            type: string
      responses:
        '200':
          description: Successfully deleted the resource you requested
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
  /nftt/projects-newforma:
    description: >-
      Tracks the projects in the customer Newforma database and matches them to
      TonicDM projects.
    get:
      summary: Get Newforma Projects from NFTT
      operationId: get-nftt-project-newforma
      description: >
        Get the list of projects in the customer Newforma database as stored in
        the TonicDM NFTT system.
      tags:
        - Projects and Paths
      parameters:
        - $ref: '#/components/parameters/searchQuery'
        - $ref: '#/components/parameters/filterIds'
        - $ref: '#/components/parameters/filterOrganizationIds'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/pageNumber'
        - name: sortBy
          in: query
          schema:
            type: string
            enum:
              - projectName
              - projectNumber
        - $ref: '#/components/parameters/sortDirection'
      responses:
        '200':
          description: >-
            Successfully read the resource you requested. One or more records
            are returned in the form of an array.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NfttProjectNewforma'
              examples:
                NfttProjectNewformaArray:
                  $ref: '#/components/examples/NfttProjectNewformaArray'
        '204':
          $ref: '#/components/responses/NoContentSuccess'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
      x-amazon-apigateway-integration:
        requestParameters:
          integration.request.header.filterIds: method.request.header.filterIds
          integration.request.header.pageSize: method.request.header.pageSize
          integration.request.header.pageNumber: method.request.header.pageNumber
          integration.request.header.sortDirection: method.request.header.sortDirection
    post:
      summary: Add a New Newforma Project to NFTT
      operationId: post-nftt-project-newforma
      description: Add a new Newforma project to the TonicDM NFTT system.
      tags:
        - Projects and Paths
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttProjectNewforma'
                - required:
                    - organizationId
                    - newformaHomeServer
                    - newformaProjectId
                    - newformaProjectLongName
      responses:
        '201':
          description: Successfully created the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttProjectNewforma'
              examples:
                NfttProjectNewforma:
                  $ref: '#/components/examples/NfttProjectNewforma'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    patch:
      summary: Edit a Newforma Project in NFTT
      operationId: patch-nftt-project-newforma
      description: Edit a Newforma project stored in the TonicDM NFTT system.
      tags:
        - Projects and Paths
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttProjectNewforma'
                - required:
                    - organizationId
                    - newformaProjectId
      responses:
        '201':
          description: Successfully modified the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttProjectNewforma'
              examples:
                NfttProjectNewforma:
                  $ref: '#/components/examples/NfttProjectNewforma'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    delete:
      summary: Delete a Newforma Project from NFTT
      tags:
        - Projects and Paths
      operationId: delete-nftt-project-newforma
      description: Delete a Newforma project stored in the TonicDM NFTT system.
      parameters:
        - name: organizationId
          in: query
          description: The NFTT Organization ID of the customer that owns this record.
          schema:
            type: string
        - name: newformaProjectId
          in: query
          description: The GUID of the Newforma project to be deleted.
          schema:
            type: string
      responses:
        '200':
          description: Successfully deleted the resource you requested
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
  /nftt/projects-newforma-paths:
    description: >-
      Tracks the customer network paths assigned to projects in the customer
      Newforma database.
    get:
      summary: Get Paths for Newforma Projects from NFTT
      operationId: get-nftt-project-newforma-path
      description: >
        Get the list of customer network paths assigned to projects in the
        customer Newforma database.


        This is a Newforma Project Paths table that stores paths in the
        customer\’s network file system which Newforma 

        has associated with the project. For example: if an email was stored in
        the customer network file system as 

        `\projects\230001 Cafe Titanic\emails\2023-04-24 Soils Test Results.msg`
        and there was a Newforma Project Path 

        of `\projects\230001 Cafe Titanic` associated with Newforma Project
        `230001 Cafe Titanic` then NFTT would infer 

        that the email should be filed in project number `230001`.


        The `filterIds` parameter takes the GUIDs of Newforma Project Path
        entries.


        This endpoint can accept either one record or an array of records.
      tags:
        - Projects and Paths
      parameters:
        - $ref: '#/components/parameters/searchQuery'
        - $ref: '#/components/parameters/filterIds'
        - $ref: '#/components/parameters/filterOrganizationIds'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/pageNumber'
        - name: sortBy
          in: query
          schema:
            type: string
            enum:
              - path
        - $ref: '#/components/parameters/sortDirection'
      responses:
        '200':
          description: >-
            Successfully read the resource you requested. One or more records
            are returned in the form of an array.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NfttProjectNewformaPathWithId'
              examples:
                NfttProjectNewformaPathWithIdArray:
                  $ref: '#/components/examples/NfttProjectNewformaPathWithIdArray'
        '204':
          $ref: '#/components/responses/NoContentSuccess'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
      x-amazon-apigateway-integration:
        requestParameters:
          integration.request.header.filterIds: method.request.header.filterIds
          integration.request.header.pageSize: method.request.header.pageSize
          integration.request.header.pageNumber: method.request.header.pageNumber
          integration.request.header.sortDirection: method.request.header.sortDirection
    post:
      summary: Add Paths for Newforma Projects to NFTT
      operationId: post-nftt-project-newforma-path
      description: >-
        Add a customer network path to a project in the customer Newforma
        database.
      tags:
        - Projects and Paths
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttProjectNewformaPath'
                - required:
                    - newformaProjectId
                    - newformaProjectPath
      responses:
        '201':
          description: Successfully created the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttProjectNewformaPathWithId'
              examples:
                NfttProjectNewformaPathWithId:
                  $ref: '#/components/examples/NfttProjectNewformaPathWithId'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    patch:
      summary: Edit a Path for a Newforma Project in NFTT
      operationId: patch-nftt-project-newforma-path
      description: >
        Edit a customer network path assigned to a project in the customer
        Newforma database.
      tags:
        - Projects and Paths
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttProjectNewformaPathWithId'
                - required:
                    - newformaProjectPathId
      responses:
        '201':
          description: Successfully modified the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttProjectNewformaPathWithId'
              examples:
                NfttProjectNewformaPathWithId:
                  $ref: '#/components/examples/NfttProjectNewformaPathWithId'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    delete:
      summary: Delete a Path for a Newforma Project from NFTT
      tags:
        - Projects and Paths
      operationId: delete-nftt-project-newforma-path
      description: >-
        Delete a customer network path assigned to a project in the customer
        Newforma database.
      parameters:
        - name: id
          in: query
          description: The GUID of the Newforma project path to be deleted
          schema:
            type: string
      responses:
        '200':
          description: Successfully deleted the resource you requested
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
  /nftt/newformaemails:
    description: Tracks the contents of the email table in the customer Newforma database.
    get:
      summary: Get Newforma Emails
      operationId: get-newforma-emails
      description: >
        Get the data on one or more emails in the customer Newforma database
        (from the synced copy to the TonicDM NFTT system).


        The `filterIds` query parameter takes the newformaMessageId. If none are
        given, data for all emails are returned. 

        `searchQuery` searches on newformaMessageFilename name. 

        Results are returned sorted on newformaMessageFilename name.

        Results are always in the form of an array (even if there is only one
        result).
      tags:
        - Import Emails
      parameters:
        - $ref: '#/components/parameters/searchQuery'
        - $ref: '#/components/parameters/filterIds'
        - $ref: '#/components/parameters/filterOrganizationIds'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/pageNumber'
        - $ref: '#/components/parameters/sortDirection'
      responses:
        '200':
          description: >-
            Successfully read the resource you requested. One or more records
            are returned in the form of an array.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NfttEmailNewforma'
              examples:
                NfttEmailNewformaArray:
                  $ref: '#/components/examples/NfttEmailNewformaArray'
        '204':
          $ref: '#/components/responses/NoContentSuccess'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
      x-amazon-apigateway-integration:
        requestParameters:
          integration.request.header.searchQuery: method.request.header.searchQuery
          integration.request.header.filterIds: method.request.header.filterIds
          integration.request.header.filterOrganizationIds: method.request.header.filterOrganizationIds
          integration.request.header.dataQuantity: method.request.header.dataQuantity
          integration.request.header.pageSize: method.request.header.pageSize
          integration.request.header.pageNumber: method.request.header.pageNumber
          integration.request.header.sortDirection: method.request.header.sortDirection
    post:
      summary: New Newforma Emails
      operationId: post-newforma-emails
      description: |
        NOTE: this POST request is in the form of an array.
      tags:
        - Import Emails
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttEmailNewforma'
                - required:
                    - organizationId
      responses:
        '200':
          description: Successfully created the resource you sent
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
  /nftt/emails:
    description: >-
      Tracks the email MSG and EML files uploaded from the customer network file
      system.
    get:
      summary: Get Email Files
      operationId: nftt-get-emails
      description: >
        Get the data on one or more email files uploaded from the customer
        network file system.


        `searchQuery` searches on newformaMessageFilename name.

        Results are always in the form of an array (even if there is only one
        result).
      tags:
        - Import Emails
      parameters:
        - $ref: '#/components/parameters/searchQuery'
        - $ref: '#/components/parameters/filterIds'
        - $ref: '#/components/parameters/filterOrganizationIds'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/pageNumber'
        - $ref: '#/components/parameters/sortDirection'
      responses:
        '200':
          description: >-
            Successfully read the resource you requested. One or more records
            are returned in the form of an array.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NfttEmailWithId'
              examples:
                nfttEmailArray:
                  $ref: '#/components/examples/NfttEmailWithIdArray'
        '204':
          $ref: '#/components/responses/NoContentSuccess'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
      x-amazon-apigateway-integration:
        requestParameters:
          integration.request.header.searchQuery: method.request.header.searchQuery
          integration.request.header.filterIds: method.request.header.filterIds
          integration.request.header.filterOrganizationIds: method.request.header.filterOrganizationIds
          integration.request.header.dataQuantity: method.request.header.dataQuantity
          integration.request.header.pageSize: method.request.header.pageSize
          integration.request.header.pageNumber: method.request.header.pageNumber
          integration.request.header.sortDirection: method.request.header.sortDirection
    post:
      summary: Add data on Email Files
      operationId: nftt-post-emails
      description: |
        NOTE: this POST request is in the form of an array.
      tags:
        - Import Emails
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttEmail'
                - required:
                    - organizationId
                    - messageServer
                    - messagePath
                    - messageFilename
      responses:
        '200':
          description: Successfully created the resource you sent
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    patch:
      summary: Edit the data on an Email File
      operationId: nftt-patch-email
      description: >-
        Edit the data on an email file uploaded from the customer network file
        system.
      tags:
        - Import Emails
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/NfttEmailWithId'
                - required:
                    - id
      responses:
        '201':
          description: Successfully modified the resource you sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NfttEmailWithId'
              examples:
                email:
                  $ref: '#/components/examples/NfttEmailWithId'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
    delete:
      summary: Delete the data on an Email File
      tags:
        - Import Emails
      operationId: nftt-delete-email
      description: >-
        Delete the data on an email file uploaded from the customer network file
        system.
      parameters:
        - name: emailId
          in: query
          description: The GUID of the email to be deleted
          schema:
            type: string
      responses:
        '200':
          description: Successfully deleted the resource you requested
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/NoAccessError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
        '500':
          $ref: '#/components/responses/UnexpectedError'
components:
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://example.com/oauth/authorize
          tokenUrl: https://example.com/oauth/token
          scopes:
            read: Read access to protected resources
            write: Write access to protected resources
    apiKeyAuth:
      type: apiKey
      in: query
      name: X-API-KEY
  parameters:
    searchQuery:
      name: searchQuery
      in: query
      description: A JSON-encoded string containing the query options.
      schema:
        type: string
        format: JSON
      example: '{"example"}'
    filterIds:
      name: filterIds
      in: query
      description: Returns data for the specified GUIDs
      style: form
      explode: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/CompactUUID'
      example: '{id},{id},{id}'
    pageSize:
      name: pageSize
      in: query
      description: The number of results to return per page
      schema:
        type: integer
        minimum: 1
        maximum: 1000
        default: 50
      example: '100'
    pageNumber:
      name: pageNumber
      in: query
      schema:
        type: integer
      description: Which page of the results to return
      example: '1'
    sortDirection:
      name: sortDirection
      in: query
      schema:
        type: string
        enum:
          - asc
          - desc
      description: The sort direction for the results
    filterOrganizationIds:
      name: filterOrganizationIds
      in: query
      description: Returns data for the specified Organization GUIDs
      style: form
      explode: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/CompactUUID'
      example: '{OrganizationId},{OrganizationId},{OrganizationId}'
    filterStartDate:
      name: filterStartDate
      in: query
      description: >-
        Adding the time component (eg. `T16:45:00Z`) is optional. Without it the
        default is midnight UTC.
      schema:
        type: string
        format: date-time
      example: '2023-01-01T16:45:00Z'
    filterEndDate:
      name: filterEndDate
      description: >-
        Adding the time component (eg. `T16:45:00Z`) is optional. Without it the
        default is midnight UTC.
      in: query
      schema:
        type: string
        format: date-time
      example: '2023-01-31T16:45:00Z'
  schemas:
    CompactUUID:
      type: string
      pattern: ^[0-9a-fA-F]{32}$
      x-format: uuid-no-hyphens
      description: UUID without hyphens (32 characters)
      example: 8e8aa42241794371ae9d0ed7b67a8c86
    NfttOrganization:
      title: NfttOrganization
      type: object
      description: >
        Definition of a customer Org just for NFTT purposes.


        The `id` field should be manually set to match the User Organization in
        Global.
      properties:
        doe:
          description: The UTC timestamp of the creation of the NfttOrganization.
          type: string
          format: date-time
          readOnly: true
        name:
          description: The customer name for use in NFTT.
          type: string
          minLength: 1
          maxLength: 40
    NfttOrganizationWithId:
      allOf:
        - type: object
          properties:
            id:
              description: 32 char GUID
              type: string
        - $ref: '#/components/schemas/NfttOrganization'
    Errors:
      title: Errors
      type: object
      required:
        - errors
      properties:
        errors:
          description: x
          type: array
          minItems: 1
          items:
            required:
              - code
              - message
            properties:
              code:
                description: x
                type: string
              message:
                description: x
                type: string
              source:
                description: x
                title: ErrorSource
                required:
                  - location
                  - name
                properties:
                  location:
                    description: x
                    type: string
                    enum:
                      - path
                      - query
                      - body
                      - header
                  name:
                    type: string
                    description: The name of the property or parameter causing the error
                  path:
                    type: string
                    description: >-
                      JSON path targeting the source of error (only used when
                      location is `body`)
    NfttNode:
      title: NfttNode
      type: object
      description: >
        Definition of a machine used to run the Windows NFTT in the customer
        organization.
      properties:
        organizationId:
          description: The GUID of the NFTT customer organization that owns this node.
          type: string
        doe:
          description: The UTC timestamp of the creation of the node in the NFTT system.
          type: string
          format: date-time
          readOnly: true
        name:
          description: The human readable name for the customer node (machine).
          type: string
          minLength: 1
          maxLength: 40
        run:
          description: >-
            Tells the customer machine whether to actively process jobs or stand
            by.
          type: boolean
          default: false
    NfttNodeWithId:
      allOf:
        - type: object
          properties:
            id:
              description: 32 char GUID
              type: string
        - $ref: '#/components/schemas/NfttNode'
    NfttHeartbeat:
      title: NfttHeartbeat
      type: object
      description: >
        A heartbeat is basic data sent from a customer node (machine) to the
        NFTT system on a schedule.
      properties:
        organizationId:
          description: The GUID of the customer organization this heartbeat belongs to.
          type: string
        doe:
          description: The UTC timestamp of the creation of the heartbeat.
          type: string
          format: date-time
          readOnly: true
        nodeId:
          description: The GUID of the customer machine that sent this heartbeat.
          type: string
        jobId:
          description: The GUID of the job that is currently running.
          type: string
        jobStatus:
          description: One of `not_started`, `in_progress`, `complete`, `error`
          type: string
        cpuPercent:
          description: The current percentage usage of the node CPU.
          type: integer
        ramGbFree:
          description: The current percentage usage of the node RAM.
          type: number
        diskGbFree:
          description: The current percentage usage of the node local disk.
          type: number
        run:
          description: >-
            The run state of the node (`waiting for job`, `running job`, `not
            accepting jobs`).
          type: string
        message:
          description: A message from the node to the NFTT system in the cloud.
          type: string
        ipAddress:
          description: An ip address of the node
          type: string
        orgName:
          description: name of the organization
          type: string
          readOnly: true
        nodeName:
          description: name of the node
          type: string
          readOnly: true
    NfttHeartbeatWithId:
      allOf:
        - type: object
          properties:
            id:
              description: 32 char GUID
              type: string
        - $ref: '#/components/schemas/NfttHeartbeat'
    NfttHeartbeatResponse:
      title: NfttHeartbeatResponse
      type: object
      description: |
        A job to run on the node, and/or other information for the node. 
      properties:
        name:
          description: >-
            The human readable name for the job (this is the name of the
            template which the job uses).
          type: string
          minLength: 1
          maxLength: 40
        jobID:
          description: The GUID of the job that is being sent to the node.
          type: string
        jobType:
          type: string
          enum:
            - sql
            - powershell
        jobText:
          description: >-
            The full text of the command to run on the client machine with the
            variables already substituted for values (so a list of variables
            does *not* need to be sent separately).
          type: string
        resultsDestination:
          description: Where to send the results after running the job.
          type: string
          enum:
            - endpoint
            - s3
        resultsParameters:
          description: Parameters needed to send the results to the destination.
          type: string
    NfttTemplate:
      title: NfttTemplate
      type: object
      description: >
        Definition of a Template for a Job. The Template specifies the code for
        the Job to run with placeholders for Variables. 

        A Job is based on a Template with unique values for the variables in
        that Template.
      properties:
        name:
          description: The human readable name for the template.
          type: string
          minLength: 1
          maxLength: 40
        commandType:
          type: string
          enum:
            - sql
            - powershell
        commandText:
          description: >-
            The full text of the command to run on the client machine using
            variables for values that will be substituted at run-time.
          type: string
        resultsDestination:
          description: Where to send the results after running the job.
          type: string
          enum:
            - endpoint
            - s3
        resultsParameters:
          description: Parameters needed to send the results to the destination.
          type: string
    NfttTemplateWithId:
      allOf:
        - type: object
          properties:
            id:
              description: 32 char GUID
              type: string
        - $ref: '#/components/schemas/NfttTemplate'
    NfttTemplateVariable:
      title: NfttTemplateVariable
      type: object
      description: |
        Definition of a variable for use in a template.
      properties:
        templateId:
          description: The GUID of the template that this variable belongs to.
          type: string
        name:
          description: The human readable name for the variable.
          type: string
          minLength: 1
          maxLength: 40
    NfttTemplateVariableWithId:
      allOf:
        - type: object
          properties:
            id:
              description: 32 char GUID
              type: string
        - $ref: '#/components/schemas/NfttTemplateVariable'
    NfttJob:
      title: NfttJob
      type: object
      description: >
        Definition of a Job to run on a Node. The Job is based on a Template
        with unique values for the variables in that Template.
      properties:
        organizationId:
          description: The GUID of the customer organization this heartbeat belongs to.
          type: string
        nodeId:
          description: The GUID of the Node that will run this Job.
          type: string
        templateId:
          description: The GUID of the Node that will run this Job.
          type: string
        status:
          type: string
          enum:
            - draft
            - live
            - complete
          default: draft
        jobText:
          description: >-
            The full text of the command to run on the client machine using
            variables for values that will be substituted at run-time.
          type: string
        jobType:
          type: string
          enum:
            - sql
            - powershell
        resultsDestination:
          description: Where to send the results after running the job.
          type: string
          enum:
            - endpoint
            - s3
        resultsParameters:
          description: Parameters needed to send the results to the destination.
          type: string
        variables:
          type: array
          items:
            anyOf:
              - type: object
                description: >-
                  Variable object where keys are variable names and values are
                  their respective values.
              - type: string
                description: Single variable value
        doe:
          description: The UTC timestamp of the creation of the job in the NFTT system.
          type: string
          format: date-time
          readOnly: true
    NfttJobWithId:
      allOf:
        - type: object
          properties:
            id:
              description: 32 char GUID
              type: string
        - $ref: '#/components/schemas/NfttJob'
    NfttJobVariable:
      title: NfttJobVariable
      type: object
      description: >
        Value of a Variable for use in a Job. The Variable must have first been
        defined in the Template that the Job is based on.
      properties:
        jobId:
          description: The GUID of the Organization that owns this node.
          type: string
        variableId:
          description: The GUID of the Organization that owns this node.
          type: string
        value:
          description: The human readable name for the variable.
          type: string
          minLength: 1
          maxLength: 256
    NfttPathCache:
      title: NFTT Path Cache
      type: object
      description: >-
        A specific path that stores emails for a specific project nunmber. This
        is used as a shortcut for determining the project number from a given
        path.
      properties:
        organizationId:
          description: >-
            The GUID of the NFTT customer organization that owns this path
            template.
          type: string
        doe:
          description: The UTC timestamp of the creation of the record in the NFTT system.
          type: string
          format: date-time
          readOnly: true
        pathText:
          description: A path in the customers network file system.
          type: string
        projectNumber:
          description: The project number to be used when this path is encountered.
          type: string
    NfttPathCacheWithId:
      allOf:
        - type: object
          properties:
            id:
              description: 32 char GUID
              type: string
        - $ref: '#/components/schemas/NfttPathCache'
    NfttPathTemplate:
      title: NFTT Path Template
      type: object
      description: >-
        Adds a template path for a customer that allows determining a project
        number from a given network path.
      properties:
        organizationId:
          description: >-
            The GUID of the NFTT customer organization that owns this path
            template.
          type: string
        doe:
          description: The UTC timestamp of the creation of the record in the NFTT system.
          type: string
          format: date-time
          readOnly: true
        pathTemplate:
          description: A path template in RegEx format.
          type: string
    NfttPathTemplateWithId:
      allOf:
        - type: object
          properties:
            id:
              description: 32 char GUID
              type: string
        - $ref: '#/components/schemas/NfttPathTemplate'
    Status:
      title: Status
      description: >-
        Whether the item is active or inactive in TonicDM. Potentially the item
        could be (soft) deleted.
      type: string
      enum:
        - active
        - inactive
        - deleted
      default: active
    NfttProjectStaging:
      title: NFTT Staging Project before submitting to the TonicDM production system.
      type: object
      description: >-
        Defines a new staging project that contains the Newforma data ready to
        be pushed to the TonicDM production system.
      required:
        - organizationId
        - stagingProjectNameLong
      properties:
        organizationId:
          type: string
          format: guid
          pattern: ^[0-9a-fA-F]{32}$
          description: >-
            The NFTT OrganizationId that this project belongs to, used as a
            double-check since our data is multi-tenanted.
        doe:
          description: The UTC timestamp of the creation of this record in the NFTT system.
          type: string
          format: date-time
          readOnly: true
        stagingProjectId:
          description: The GUID of this record.
          type: string
          format: guid
          pattern: ^[0-9a-fA-F]{32}$
          readOnly: true
        stagingProjectNumber:
          type: string
          description: >-
            Project Reference Number intended to be used in the TonicDM
            production system.
        stagingProjectNameLong:
          description: >-
            The full name of the Project intended to be used in the TonicDM
            production system.
          type: string
          minLength: 1
          maxLength: 64
        stagingProjectNameShort:
          description: >-
            A short name for the Project intended to be used in the TonicDM
            production system.
          type: string
          minLength: 0
          maxLength: 64
        stagingStatus:
          $ref: '#/components/schemas/Status'
        stagingIsConfidential:
          description: Intent to set the project to Locked in TonicDM production database.
          type: boolean
          default: false
        stagingCreateDate:
          description: >-
            Intended project creation date to be used in TonicDM production
            database. This can be used so that the creation date in TonicDM
            matches what the date was in the customers Newforma database.
          type: string
          format: date-time
    NfttProjectNewforma:
      title: NFTT Newforma Project
      type: object
      description: >
        Defines a customer project in Newforma, as it exists in Newforma. 


        Note: the unique key in this table is the newformaProjectId (ie. the ID
        that Newforma uses in the customer Newforma database).
      required:
        - organizationId
        - newformaProjectName
      properties:
        organizationId:
          type: string
          format: guid
          pattern: ^[0-9a-fA-F]{32}$
          description: >-
            The NFTT OrganizationId that this project belongs to, used as a
            double-check since our data is multi-tenanted.
        doe:
          description: The UTC timestamp of the creation of this record in the NFTT system.
          type: string
          format: date-time
          readOnly: true
        newformaProjectId:
          type: string
          description: The GUID of the project in the customer Newforma database.
        newformaHomeServer:
          type: string
          description: >-
            The name of the NPS server that this project resides on. All NFTT
            actions for a project should be run on this server (not a mirror of
            the project on another server).
        newformaProjectKey:
          type: string
          description: >-
            The Key of the project in the customer Newforma database (this is an
            alternative record ID that Newforma uses).
        newformaProjectNumber:
          type: string
          description: Project Reference Number in the customer Newforma database.
        newformaProjectName:
          description: >-
            The Name of the Project in the customer Newforma database. This may
            become the Long Name or Short Name when imported into TonicDM.
          type: string
          minLength: 1
          maxLength: 64
        newformaProjectDescription:
          description: >-
            The Description field in the Project table in the customer Newforma
            database. This may become the Long Name or Short Name when imported
            into TonicDM.
          type: string
          minLength: 0
          maxLength: 64
        newformaStatus:
          $ref: '#/components/schemas/Status'
        newformaIsConfidential:
          description: >-
            This project is set to Confidential in the customer Newforma
            database. Equivalent to Locked in TonicDM production database.
          type: boolean
          default: false
        newformaCreateDate:
          type: string
          format: date-time
        stagingProjectId:
          type: string
          format: guid
          pattern: ^[0-9a-fA-F]{32}$
          description: >-
            The NFTT Staging Project that this Newforma project belongs to. This
            is necessary because more than one project in Newforma might map to
            the same project in TonicDM. We could remove this layer in NFTT is
            we directly import every Newforma project into Tonic, and then
            handle the merging in Tonic after the project is complete.
    NfttProjectNewformaPath:
      title: NFTT Newforma Project Path
      type: object
      description: >-
        Adds a path on the customers network as belonging to a one of their
        projects. One project in Newforma can have several network paths
        associated with it.
      properties:
        organizationId:
          type: string
          format: guid
          pattern: ^[0-9a-fA-F]{32}$
          description: >-
            The NFTT OrganizationId that this project belongs to, used as a
            double-check since our data is multi-tenanted.
        newformaProjectId:
          description: The GUID of the NFTT Project record.
          type: string
          format: guid
          pattern: ^[0-9a-fA-F]{32}$
        newformaPath:
          description: A network folder path in the customer Newforma database.
          type: string
        doe:
          description: The UTC timestamp of the creation of this record in the NFTT system.
          type: string
          format: date-time
          readOnly: true
    NfttProjectNewformaPathWithId:
      allOf:
        - type: object
          properties:
            id:
              description: 32 char GUID
              type: string
        - $ref: '#/components/schemas/NfttProjectNewformaPath'
    NfttEmailNewforma:
      title: Nftt Email as stored in the customer Newforma database.
      type: object
      description: >
        Definition of an entry in the Newforma Email table in the customer
        Newforma database.
      required:
        - organizationId
        - newformaMessageId
        - newformaMessageProjectId
        - newformaMessageFilename
      properties:
        organizationId:
          description: >-
            The GUID of the customer organization that owns this record, used as
            a double-check since our data is multi-tenanted
          type: string
        doe:
          description: The UTC timestamp of the creation of this record in the NFTT system.
          type: string
          format: date-time
          readOnly: true
        newformaMessageId:
          description: The id of the database record in the customer Newforma database.
          type: string
        newformaMessageProjectId:
          description: >-
            The project id in the database record in the customer Newforma
            database.
          type: string
        newformaMessageDatetime:
          description: >-
            The timestamp of the database record in the customer Newforma
            database.
          type: string
        newformaMessageProjectPath:
          description: >-
            The project path defined in the database record in the customer
            Newforma database.
          type: string
        newformaMessageRelativePath:
          description: >-
            The relative path defined in the database record in the customer
            Newforma database.
          type: string
        newformaMessageFilename:
          description: >-
            The email message file name defined in the database record in the
            customer Newforma database.
          type: string
    NfttEmail:
      title: Nftt Email File as uploaded to NFTT
      type: object
      description: >
        A file that has been uploaded from the customers network file system to
        the NFTT cloud.
      required:
        - organizationId
      properties:
        organizationId:
          description: >-
            The GUID of the NFTT customer organization that owns this record,
            used as a double-check since our data is multi-tenanted
          type: string
        doe:
          description: The UTC timestamp of the creation of this record in the NFTT system.
          type: string
          format: date-time
          readOnly: true
        messageStagingProjectId:
          description: >-
            The id of the Staging Project in NFTT that the email file is
            assigned to.
          type: string
        messageServer:
          description: >-
            The server component of the path to the email file on the customers
            file system.
          type: string
        messagePath:
          description: >-
            The path to the email file (on the customers file system) without
            the server component or filename.
          type: string
        messageFilename:
          description: The file name (including extension) of the email file.
          type: string
        discovered_datetime:
          description: >-
            The UTC timestamp when the record is created (ie. the timestamp of
            when the system first knew about this email file).
          type: string
          format: date-time
        uploaded_datetime:
          description: The UTC timestamp when the email file was uploaded into the cloud.
          type: string
          format: date-time
        processed_datetime:
          description: >-
            The UTC timestamp when the email file was analysed to determine the
            project.
          type: string
          format: date-time
        ingested_datetime:
          description: >-
            The UTC timestamp when the email file was sent to the email ingestor
            of the TonicDM production system.
          type: string
          format: date-time
        rulePathCache:
          description: >-
            The text of the project number as determined by the Path Cache
            system.
          type: string
        rulePathTemplate:
          description: >-
            The text of the project number as determined by the Path Template
            system.
          type: string
        ruleNewformaEmailTable:
          description: >-
            The text of the project number as determined by looking up the email
            in the Newforma Email table.
          type: string
        ruleNewformaProjectPath:
          description: >-
            The text of the project number as determined by looking for the path
            in the Newforma Project Path table.
          type: string
        error:
          description: >-
            Text describing any error that occurs when dealing with this email
            file.
          type: string
        error_datetime:
          description: The UTC timestamp of the error referenced above.
          type: string
          format: date-time
    NfttEmailWithId:
      allOf:
        - type: object
          properties:
            id:
              description: 32 char GUID
              type: string
        - $ref: '#/components/schemas/NfttEmail'
  examples:
    NfttOrganizationsWithIdArray:
      summary: >-
        Sample data array that would be returned for an array of the NFTT
        Organization object.
      value:
        - id: da9c62640a894f61b247801a2e300c44
          doe: '2024-02-25'
          name: Pacific Architects
        - id: ecc7799f61194f9191f6f51ab8260280
          doe: '2024-02-25'
          name: Argo Structural
    NfttOrganizationWithId:
      summary: Sample data that would be returned for the NFTT Organization object.
      value:
        id: da9c62640a894f61b247801a2e300c44
        doe: '2024-02-25'
        name: Pacific Architects
    NfttNodeWithIdArray:
      summary: >-
        Sample data array that would be returned for an array of the NFTT Node
        object.
      value:
        - id: be26af2278974fddb5fcf67d83c10de3
          organizationId: da9c62640a894f61b247801a2e300c44
          doe: '2024-02-25'
          name: New Orleans
          run: false
        - id: ecc7799f61194f9191f6f51ab8260280
          organizationId: da9c62640a894f61b247801a2e300c44
          doe: '2024-02-25'
          name: Atlanta
          run: true
    NfttNodeWithId:
      summary: Sample data that would be returned for the NFTT Node object.
      value:
        id: bf75ccde7a074d598c708351f4f26af4
        organizationId: da9c62640a894f61b247801a2e300c44
        doe: '2024-02-25'
        name: New York
        run: true
    NfttHeartbeatWithIdArray:
      summary: >-
        Sample data array that would be returned for an array of the NFTT
        Heartbeat object.
      value:
        - id: be26af2278974fddb5fcf67d83c10de3
          organizationId: da9c62640a894f61b247801a2e300c44
          doe: '2024-02-25'
          nodeId: New Orleans
          cpuPercent: 34
          ramGbFree: 3.5
          diskGbFree: 76.43
        - id: ecc7799f61194f9191f6f51ab8260280
          organizationId: da9c62640a894f61b247801a2e300c44
          doe: '2024-02-26'
          nodeId: Atlanta
          cpuPercent: 43
          ramGbFree: 5.3
          diskGbFree: 67.34
    NfttHeartbeatResponse:
      summary: >-
        Sample data that would be returned to the customer node (machine) when
        it checks in with a heartbeat.
      value:
        id: 0544b59244d1449db0e3b6f3cec38e2f
        name: Get all Projects
        jobType: sql
        jobText: SELECT * FROM
        resultsDestination: s3
        run: true
    NfttTemplateWithIdArray:
      summary: Sample data that would be returned for the NFTT Template object.
      value:
        - id: b8eebbeb396148768733209b744a3988
          name: Get all Projects
          commandType: sql
          commandText: SELECT * FROM
          resultsDestination: s3
        - id: 04ec5ca2445a4fe68711ad63be0c5ed2
          name: Upload Emails
          commandType: powershell
          commandText: rclone -r
          resultsDestination: s3
    NfttTemplateWithId:
      summary: Sample data that would be returned for the NFTT Template object.
      value:
        id: b8eebbeb396148768733209b744a3988
        name: Get all Projects
        commandType: sql
        commandText: SELECT * FROM
        resultsDestination: s3
    NfttTemplateVariableWithIdArray:
      summary: Sample data that would be returned for the NFTT TemplateVariable object.
      value:
        - id: f6ca0dd2bd9042c38daebc78540b63e4
          TemplateId: b8eebbeb396148768733209b744a3988
          name: project_folder
        - id: 3dcb009c7eea40eba2758eca0cf77cf7
          TemplateId: b8eebbeb396148768733209b744a3988
          name: server_unc
    NfttTemplateVariableWithId:
      summary: Sample data that would be returned for the NFTT TemplateVariable object.
      value:
        id: f6ca0dd2bd9042c38daebc78540b63e4
        TemplateId: b8eebbeb396148768733209b744a3988
        name: project_folder
    NfttJobWithIdArray:
      summary: Sample data that would be returned for the NFTT Job object.
      value:
        - id: 09505ee7a6c348579c403043ff115ad5
          nodeId: bf75ccde7a074d598c708351f4f26af4
          TemplateId: b8eebbeb396148768733209b744a3988
          status: draft
        - id: 04ec5ca2445a4fe68711ad63be0c5ed2
          nodeId: bf75ccde7a074d598c708351f4f26af4
          TemplateId: b8eebbeb396148768733209b744a3988
          status: complete
    NfttJobWithId:
      summary: Sample data that would be returned for the NFTT Job object.
      value:
        id: 09505ee7a6c348579c403043ff115ad5
        nodeId: bf75ccde7a074d598c708351f4f26af4
        TemplateId: b8eebbeb396148768733209b744a3988
        status: draft
    NfttJobVariableArray:
      summary: Sample data that would be returned for the NFTT JobVariable object.
      value:
        - jobId: 09505ee7a6c348579c403043ff115ad5
          variableId: f6ca0dd2bd9042c38daebc78540b63e4
          value: 12-004 Rocky Mountain Cafe
        - jobId: 09505ee7a6c348579c403043ff115ad5
          variableId: 3dcb009c7eea40eba2758eca0cf77cf7
          value: \\projects
    NfttJobVariable:
      summary: Sample data that would be returned for the NFTT JobVariable object.
      value:
        jobId: 09505ee7a6c348579c403043ff115ad5
        variableId: f6ca0dd2bd9042c38daebc78540b63e4
        value: 12-004 Rocky Mountain Cafe
    NfttPathTemplateWithIdArray:
      summary: >-
        Sample data that would be returned for an array of the NFTT Path
        Template object with ID.
      value:
        - id: 9a005fcc1ce94b1cade18d9a35fb1598
          organizationId: 9d77d49320c34b7f8408400bcb29cc34
          pathTemplate: \\projects\\\d{6}\b
          doe: 2024-03-18T09:17:11.000+0000
        - id: 0d3dfbe0208549919405f19cbb447294
          organizationId: 9d77d49320c34b7f8408400bcb29cc34
          pathTemplate: \\archive\\\d{6}\b
          doe: 2024-03-18T09:17:12.000+0000
    NfttPathTemplateWithId:
      summary: >-
        Sample data that would be returned for the NFTT Path Template object
        with ID.
      value:
        id: 9a005fcc1ce94b1cade18d9a35fb1598
        organizationId: 9d77d49320c34b7f8408400bcb29cc34
        pathTemplate: \\projects\\\d{6}\b
        doe: 2024-03-18T09:17:11.000+0000
    NfttProjectStagingArray:
      summary: >-
        An array of representations of a project in the customer Newforma
        database.
      value:
        - organizationId: da9c62640a894f61b247801a2e300c44
          doe: 2024-03-18T09:17:11.000+0000
          stagingProjectId: 9d77d49320c34b7f8408400bcb29cc34
          stagingProjectNameLong: Rocky Mountain Cafe
        - organizationId: da9c62640a894f61b247801a2e300c44
          doe: 2024-03-18T09:17:12.000+0000
          stagingProjectId: 14d337d8eb4048d080f853ac03370c5e
          stagingProjectNameLong: Coal Mining Historical Museum
    NfttProjectStaging:
      summary: The representation of a project in the customer Newforma database.
      value:
        organizationId: da9c62640a894f61b247801a2e300c44
        doe: 2024-03-18T09:17:11.000+0000
        stagingProjectId: 9d77d49320c34b7f8408400bcb29cc34
        stagingProjectNameLong: Rocky Mountain Cafe
    NfttProjectNewformaArray:
      summary: >-
        An array of representations of a project in the customer Newforma
        database.
      value:
        - organizationId: da9c62640a894f61b247801a2e300c44
          doe: 2024-03-18T09:17:11.000+0000
          newformaProjectId: 9d77d49320c34b7f8408400bcb29cc34
          newformaProjectName: Rocky Mountain Cafe
        - organizationId: da9c62640a894f61b247801a2e300c44
          doe: 2024-03-18T09:17:12.000+0000
          newformaProjectId: 14d337d8eb4048d080f853ac03370c5e
          newformaProjectName: Coal Mining Historical Museum
    NfttProjectNewforma:
      summary: The representation of a project in the customer Newforma database.
      value:
        organizationId: da9c62640a894f61b247801a2e300c44
        doe: 2024-03-18T09:17:11.000+0000
        newformaProjectId: 9d77d49320c34b7f8408400bcb29cc34
        newformaProjectName: Rocky Mountain Cafe
    NfttProjectNewformaPathWithIdArray:
      summary: >-
        Sample data that would be returned for the NFTT Project Newforma Path
        object.
      value:
        - id: 9a005fcc1ce94b1cade18d9a35fb1598
          newformaProjectId: 9d77d49320c34b7f8408400bcb29cc34
          newformaPath: /projects/12-034 Coal Mining Historical Museum/
          doe: 2024-03-18T09:17:11.000+0000
        - id: 0d3dfbe0208549919405f19cbb447294
          newformaProjectId: 9d77d49320c34b7f8408400bcb29cc34
          newformaPath: /archive/12-034 Coal Mining Historical Museum/
          doe: 2024-03-18T09:17:12.000+0000
    NfttProjectNewformaPathWithId:
      summary: >-
        Sample data that would be returned for the NFTT Project Newforma Path
        object with ID.
      value:
        id: 9a005fcc1ce94b1cade18d9a35fb1598
        newformaProjectId: 9d77d49320c34b7f8408400bcb29cc34
        newformaPath: /projects/12-034 Coal Mining Historical Museum/
        doe: 2024-03-18T09:17:11.000+0000
    NfttEmailNewformaArray:
      summary: Sample data that would be returned for the NFTT Email Newforma object.
      value:
        - organizationId: da9c62640a894f61b247801a2e300c44
          doe: 2024-03-18T09:17:11.000+0000
          newformaMessageId: ce9c7ba48461470690ea1278204da679
          newformaMessageProjectId: 9d77d49320c34b7f8408400bcb29cc34
          newformaMessageDatetime: 2024-02-23T15:09:01.000+0000
          newformaMessageProjectPath: /projects/12-034 Coal Mining Historical Museum/emails
          newformaMessageRelativePath: 12-034 Coal Mining Historical Museum/emails
          newformaMessageFilename: 2024-03-18 plans for earth moving.msg
        - organizationId: da9c62640a894f61b247801a2e300c44
          doe: 2024-03-18T09:17:12.000+0000
          newformaMessageId: ce9c7ba48461470690ea1278204da679
          newformaMessageProjectId: 9d77d49320c34b7f8408400bcb29cc34
          newformaMessageDatetime: 2024-03-07T12:07:59.000+0000
          newformaMessageProjectPath: /projects/12-034 Coal Mining Historical Museum/emails
          newformaMessageRelativePath: 12-034 Coal Mining Historical Museum/emails
          newformaMessageFilename: 2024-03-18 plans for earth moving.msg
    NfttEmailWithIdArray:
      summary: >-
        Sample data that would be returned for email files uploaded to the NFTT
        cloud.
      value:
        - id: eeade24a8ad64d86b3cb8f9149cf228b
          organizationId: da9c62640a894f61b247801a2e300c44
          doe: 2024-03-18T09:17:11.000+0000
          messageServer: //devenneygroup/files
          messagePath: /projects/12-034 Coal Mining Historical Museum/emails
          messageFilename: 2024-03-18 plans for earth moving.msg
          discovered_datetime: 2024-03-18T09:17:11.000+0000
          uploaded_datetime: 2024-03-18T09:17:11.000+0000
          processed_datetime: 2024-03-18T09:17:11.000+0000
          ingested_datetime: 2024-03-18T09:17:11.000+0000
          rulePathCache: 12-034
          rulePathTemplate: ''
          ruleNewformaEmailTable: ''
          ruleNewformaProjectPath: ''
          error: Invalid Filename
          error_datetime: 2024-03-18T09:17:11.000+0000
        - id: e0bc491a6bc94b4aaec839eccacb69ee
          organizationId: da9c62640a894f61b247801a2e300c44
          doe: 2024-03-18T09:17:12.000+0000
          messageServer: //devenneygroup/files
          messagePath: /projects/14-009 Cafe Titanic/emails
          messageFilename: 2014-09-12 seating layout options.msg
          discovered_datetime: 2024-03-18T09:17:11.000+0000
          uploaded_datetime: 2024-03-18T09:17:11.000+0000
          processed_datetime: 2024-03-18T09:17:11.000+0000
          ingested_datetime: 2024-03-18T09:17:11.000+0000
          rulePathCache: 14-009
    NfttEmailWithId:
      summary: >-
        Sample data that would be returned for an email file uploaded to the
        NFTT cloud.
      value:
        id: eeade24a8ad64d86b3cb8f9149cf228b
        organizationId: da9c62640a894f61b247801a2e300c44
        doe: 2024-03-18T09:17:11.000+0000
        messageServer: //devenneygroup/files
        messagePath: /projects/12-034 Coal Mining Historical Museum/emails
        messageFilename: 2024-03-18 plans for earth moving.msg
        discovered_datetime: 2024-03-18T09:17:11.000+0000
        uploaded_datetime: 2024-03-18T09:17:11.000+0000
        processed_datetime: 2024-03-18T09:17:11.000+0000
        ingested_datetime: 2024-03-18T09:17:11.000+0000
        rulePathCache: 12-034
        rulePathTemplate: ''
        ruleNewformaEmailTable: ''
        ruleNewformaProjectPath: ''
        error: Invalid Filename
        error_datetime: 2024-03-18T09:17:11.000+0000
  responses:
    NoContentSuccess:
      description: >-
        No content. The request was successfully executed on the server but
        there is no data to return.
    BadRequestError:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
    AuthenticationError:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
    NoAccessError:
      description: >-
        Authentication succeeded, but the user does not have access to the
        resource
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
    NotFoundError:
      description: The resource cannot be found, client-side error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
    RateLimitExceededError:
      description: Surpassed the max number of request units for the current hour.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
    UnexpectedError:
      description: Unexpected error. Consumer may try to send the request again.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
