openapi: 3.0.1
info:
  title: Aplas API
  description: REST API for programmatic access to Aplas indexes, maps, files, and
    connectors. See the introduction at https://docs.aplas.com/api for getting
    started.
  version: 2.0.0
servers:
  - url: https://api.au.aplas.com/api/v2
    description: Australia region
  - url: https://api.eu.aplas.com/api/v2
    description: Europe region
  - url: https://api.us.aplas.com/api/v2
    description: United States region
tags:
  - name: Indexes
    description: Operations relating to indexes.
  - name: Index Application
    description: Operations relating to index applications.
  - name: Index Application Tag Group
    description: Operations relating to index application tag groups.
  - name: Index Application Tag
    description: Operations relating to index application tags.
  - name: Index Integration
    description: Operations relating to index integrations.
  - name: Index Integration Tag
    description: Operations relating to index integration tags.
  - name: Index Component
    description: Operations relating to index components.
  - name: Index Component Tag
    description: Operations relating to index component tags.
  - name: Index Collection
    description: Operations relating to index collections.
  - name: Index Collection Tag
    description: Operations relating to index collection tags.
  - name: FileSpec
    description: Operations relating to fileSpecs.
  - name: File
    description: Operations relating to files.
  - name: Map
    description: Operations relating to maps.
  - name: Connector
    description: Operations relating to connectors.
security:
  - BearerAuth: []
paths:
  /index:
    get:
      tags:
        - Indexes
      summary: List all indexes
      operationId: listIndexes
      parameters:
        - name: fields
          in: query
          description: Comma-separated list of additional fields to return. Use 'fields=*'
            to return all available fields. See the resource schema for fields you can request.
          schema:
            type: string
          example: description
      responses:
        200:
          description: An array of indexes
          content:
            "*/*":
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Index"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    post:
      tags:
        - Indexes
      summary: Create an index
      description: This operation will also create a 'default' application tag group
      operationId: createIndex
      requestBody:
        description: The new index to create
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Index"
        required: true
      responses:
        201:
          description: Return the resource uri of created index
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: index
  /index/{indexId}:
    get:
      tags:
        - Indexes
      summary: Retrieve an index
      operationId: indexById
      parameters:
        - name: indexId
          in: path
          description: The id of the index
          required: true
          schema:
            type: string
          example: id
        - name: fields
          in: query
          description: Comma-separated list of additional fields to return. Use 'fields=*'
            to return all available fields. See the resource schema for fields you can request.
          schema:
            type: string
          example: description
      responses:
        200:
          description: Expected response to a valid request
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Index"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    put:
      tags:
        - Indexes
      summary: Replace an index
      operationId: replaceIndex
      parameters:
        - name: indexId
          in: path
          description: The id of the index to replace
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The replacement index
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Index"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: index
    delete:
      tags:
        - Indexes
      summary: Delete an index
      operationId: deleteIndex
      parameters:
        - name: indexId
          in: path
          description: The id of the index to delete
          required: true
          schema:
            type: string
          example: id
      responses:
        200:
          description: "# Records Deleted"
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    patch:
      tags:
        - Indexes
      summary: Update an index partially
      operationId: updateIndex
      parameters:
        - name: indexId
          in: path
          description: The id of the index
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The index to update (partial properties of the index allowed)
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Index"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: index
  /index/{indexId}/duplicate:
    put:
      tags:
        - Indexes
      summary: Duplicate an index
      operationId: duplicateIndex
      parameters:
        - name: indexId
          in: path
          description: The id of the index to replace
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: Details of the target index to be created
        content:
          application/json:
            schema:
              required:
                - targetId
                - targetName
              type: object
              properties:
                targetId:
                  type: string
                targetName:
                  type: string
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: index
  /index/{indexId}/component:
    get:
      tags:
        - Index Component
      summary: List all components
      operationId: listComponents
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: fields
          in: query
          description: Comma-separated list of additional fields to return. Use 'fields=*'
            to return all available fields. See the resource schema for fields you can request.
          schema:
            type: string
          example: shortName,vendor
        - name: tagId
          in: query
          description: Filter by a particular component tag id
          schema:
            type: string
      responses:
        200:
          description: An array of component
          content:
            "*/*":
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Component"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    post:
      tags:
        - Index Component
      summary: Create a component
      operationId: createComponent
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The new component to create
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Component"
        required: true
      responses:
        201:
          description: Return the resource uri of created component
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: component
  /index/{indexId}/component/{componentId}:
    get:
      tags:
        - Index Component
      summary: Retrieve a component
      operationId: componentById
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: componentId
          in: path
          description: The id of the component to retrieve
          required: true
          schema:
            type: string
          example: id
        - name: fields
          in: query
          description: Comma-separated list of additional fields to return. Use 'fields=*'
            to return all available fields. See the resource schema for fields you can request.
          schema:
            type: string
          example: shortName,vendor
      responses:
        200:
          description: Expected response to a valid request
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Component"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    put:
      tags:
        - Index Component
      summary: Replace an existing component
      operationId: replaceComponent
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: componentId
          in: path
          description: The id of the component to replace
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The component to replace
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Component"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: component
    delete:
      tags:
        - Index Component
      summary: Delete a component
      operationId: deleteComponent
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: componentId
          in: path
          description: The id of the component to delete
          required: true
          schema:
            type: string
          example: id
      responses:
        200:
          description: "# Records Deleted"
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    patch:
      tags:
        - Index Component
      summary: Update an existing component partially
      operationId: updateComponent
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: componentId
          in: path
          description: The id of the component to update
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The component to update (partial properties of the component
          allowed)
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Component"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: component
  /index/{indexId}/componentTag:
    get:
      tags:
        - Index Component Tag
      summary: List all component tags
      operationId: listComponentTags
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: fields
          in: query
          description: Comma-separated list of additional fields to return. Use 'fields=*'
            to return all available fields. See the resource schema for fields you can request.
          schema:
            type: string
          example: color,description
      responses:
        200:
          description: A array of component tags
          content:
            "*/*":
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ComponentTag"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    post:
      tags:
        - Index Component Tag
      summary: Create a component tag
      operationId: createComponentTag
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The new component tag to create
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ComponentTag"
        required: true
      responses:
        201:
          description: Return the resource uri of created component tag
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: componentTag
  /index/{indexId}/componentTag/{tagId}:
    get:
      tags:
        - Index Component Tag
      summary: Retrieve a component tag
      operationId: componentTagById
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: tagId
          in: path
          description: Use syntax 'tagGroupId:tagId' to specify group, or just 'tagId' for default group.
          required: true
          schema:
            type: string
          example: id
        - name: fields
          in: query
          description: Comma-separated list of additional fields to return. Use 'fields=*'
            to return all available fields. See the resource schema for fields you can request.
          schema:
            type: string
          example: color,description
      responses:
        200:
          description: Expected response to a valid request
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/ComponentTag"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    put:
      tags:
        - Index Component Tag
      summary: Replace a component tag
      operationId: replaceComponentTag
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: tagId
          in: path
          description: Use syntax 'tagGroupId:tagId' to specify group, or just 'tagId' for default group.
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The component tag to replace
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ComponentTag"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: componentTag
    delete:
      tags:
        - Index Component Tag
      summary: Delete a component tag
      operationId: deleteComponentTag
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: tagId
          in: path
          description: Use syntax 'tagGroupId:tagId' to specify group, or just 'tagId' for default group.
          required: true
          schema:
            type: string
          example: id
      responses:
        200:
          description: "# Records Deleted"
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    patch:
      tags:
        - Index Component Tag
      summary: Update a component tag partially
      operationId: updateComponentTag
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: tagId
          in: path
          description: Use syntax 'tagGroupId:tagId' to specify group, or just 'tagId' for default group.
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The component tag to update (partial properties of the component
          tag are allowed)
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ComponentTag"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: componentTag
  /index/{indexId}/application:
    get:
      tags:
        - Index Application
      summary: List all applications
      operationId: listApplications
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: fields
          in: query
          description: Comma-separated list of additional fields to return. Use 'fields=*'
            to return all available fields. See the resource schema for fields you can request.
          schema:
            type: string
          example: shortName,vendor
        - name: tagId
          in: query
          description: Filter by a particular application tag id
          schema:
            type: string
      responses:
        200:
          description: An array of application
          content:
            "*/*":
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Application"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    post:
      tags:
        - Index Application
      summary: Create an application
      operationId: createApplication
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The new application to create
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Application"
        required: true
      responses:
        201:
          description: Return the resource uri of created application
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: application
  /index/{indexId}/application/{applicationId}:
    get:
      tags:
        - Index Application
      summary: Retrieve an application
      operationId: applicationById
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: applicationId
          in: path
          description: The id of the application to retrieve
          required: true
          schema:
            type: string
          example: id
        - name: fields
          in: query
          description: Comma-separated list of additional fields to return. Use 'fields=*'
            to return all available fields. See the resource schema for fields you can request.
          schema:
            type: string
          example: shortName,vendor
      responses:
        200:
          description: Expected response to a valid request
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Application"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    put:
      tags:
        - Index Application
      summary: Replace an application
      operationId: replaceApplication
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: applicationId
          in: path
          description: The id of the application to replace
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The application to replace
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Application"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: application
    delete:
      tags:
        - Index Application
      summary: Delete an application
      operationId: deleteApplication
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: applicationId
          in: path
          description: The id of the application to delete
          required: true
          schema:
            type: string
          example: id
      responses:
        200:
          description: "# Records Deleted"
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    patch:
      tags:
        - Index Application
      summary: Update an application partially
      operationId: updateApplication
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: applicationId
          in: path
          description: The id of the application to update
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The application to update (partial properties of the application
          allowed)
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Application"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: application
  /index/{indexId}/applicationTagGroup:
    get:
      tags:
        - Index Application Tag Group
      summary: List all application tag groups
      operationId: listApplicationTagGroups
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: fields
          in: query
          description: Comma-separated list of additional fields to return. Use 'fields=*'
            to return all available fields. See the resource schema for fields you can request.
          schema:
            type: string
          example: color,description
      responses:
        200:
          description: An array of application tag groups
          content:
            "*/*":
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ApplicationTagGroup"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    post:
      tags:
        - Index Application Tag Group
      summary: Create an application tag group
      operationId: createApplicationTagGroup
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The new application tag group to create
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ApplicationTagGroup"
        required: true
      responses:
        201:
          description: Return the resource uri of created application tag group
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: applicationTagGroup
  /index/{indexId}/applicationTagGroup/{tagGroupId}:
    get:
      tags:
        - Index Application Tag Group
      summary: Retrieve an application tag group
      operationId: applicationTagGroupById
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: tagGroupId
          in: path
          description: The id of the application tag group to retrieve
          required: true
          schema:
            type: string
          example: id
        - name: fields
          in: query
          description: Comma-separated list of additional fields to return. Use 'fields=*'
            to return all available fields. See the resource schema for fields you can request.
          schema:
            type: string
          example: color,description
      responses:
        200:
          description: Expected response to a valid request
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/ApplicationTagGroup"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    put:
      tags:
        - Index Application Tag Group
      summary: Replace an application tag group
      operationId: replaceApplicationTagGroup
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: tagGroupId
          in: path
          description: The id of the application tag group to replace
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The application tag group to replace
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ApplicationTagGroup"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: applicationTagGroup
    delete:
      tags:
        - Index Application Tag Group
      summary: Delete an application tag group
      operationId: deleteApplicationTagGroup
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: tagGroupId
          in: path
          description: The id of the application tag group to delete
          required: true
          schema:
            type: string
          example: id
      responses:
        200:
          description: "# Records Deleted"
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    patch:
      tags:
        - Index Application Tag Group
      summary: Update an application tag group partially
      operationId: updateApplicationTagGroup
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: tagGroupId
          in: path
          description: The id of the application tag group to update
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The application tag group to update (partial properties of the
          application tag group are allowed)
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ApplicationTagGroup"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: applicationTagGroup
  /index/{indexId}/applicationTag:
    get:
      tags:
        - Index Application Tag
      summary: List all application tags
      operationId: listApplicationTags
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: fields
          in: query
          description: Comma-separated list of additional fields to return. Use 'fields=*'
            to return all available fields. See the resource schema for fields you can request.
          schema:
            type: string
          example: color,description
      responses:
        200:
          description: An array of application tags
          content:
            "*/*":
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ApplicationTag"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    post:
      tags:
        - Index Application Tag
      summary: Create an application tag
      operationId: createApplicationTag
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The new application tag to create
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ApplicationTag"
        required: true
      responses:
        201:
          description: Return the resource uri of created application tag
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: applicationTag
  /index/{indexId}/applicationTag/{tagId}:
    get:
      tags:
        - Index Application Tag
      summary: Retrieve an application tag
      operationId: applicationTagById
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: tagId
          in: path
          description: Use syntax 'tagGroupId:tagId' to specify group, or just 'tagId' for default group.
          required: true
          schema:
            type: string
          example: id
        - name: fields
          in: query
          description: Comma-separated list of additional fields to return. Use 'fields=*'
            to return all available fields. See the resource schema for fields you can request.
          schema:
            type: string
          example: color,description
      responses:
        200:
          description: Expected response to a valid request
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/ApplicationTag"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    put:
      tags:
        - Index Application Tag
      summary: Replace an application tag
      operationId: replaceApplicationTag
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: tagId
          in: path
          description: Use syntax 'tagGroupId:tagId' to specify group, or just 'tagId' for default group.
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The application tag to replace
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ApplicationTag"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: applicationTag
    delete:
      tags:
        - Index Application Tag
      summary: Delete an application tag
      operationId: deleteApplicationTag
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: tagId
          in: path
          description: Use syntax 'tagGroupId:tagId' to specify group, or just 'tagId' for default group.
          required: true
          schema:
            type: string
          example: id
      responses:
        200:
          description: "# Records Deleted"
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    patch:
      tags:
        - Index Application Tag
      summary: Update an application tag partially
      operationId: updateApplicationTag
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: tagId
          in: path
          description: Use syntax 'tagGroupId:tagId' to specify group, or just 'tagId' for default group.
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The application tag to update (partial properties of the application
          tag are allowed)
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ApplicationTag"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: applicationTag
  /index/{indexId}/collection:
    get:
      tags:
        - Index Collection
      summary: List all collections
      operationId: listCollections
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: fields
          in: query
          description: Comma-separated list of additional fields to return. Use 'fields=*'
            to return all available fields. See the resource schema for fields you can request.
          schema:
            type: string
          example: shortName,vendor
        - name: tagId
          in: query
          description: Filter by a particular collection tag id
          schema:
            type: string
      responses:
        200:
          description: An array of collections
          content:
            "*/*":
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Collection"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    post:
      tags:
        - Index Collection
      summary: Create a collection
      operationId: createCollection
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The new collection to create
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Collection"
        required: true
      responses:
        201:
          description: Return the resource uri of created collection
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: collection
  /index/{indexId}/collection/{collectionId}:
    get:
      tags:
        - Index Collection
      summary: Retrieve a collection
      operationId: collectionById
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: collectionId
          in: path
          description: The id of the collection to retrieve
          required: true
          schema:
            type: string
          example: id
        - name: fields
          in: query
          description: Comma-separated list of additional fields to return. Use 'fields=*'
            to return all available fields. See the resource schema for fields you can request.
          schema:
            type: string
          example: shortName,vendor
      responses:
        200:
          description: Expected response to a valid request
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Collection"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    put:
      tags:
        - Index Collection
      summary: Replace a collection
      operationId: replaceCollection
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: collectionId
          in: path
          description: The id of the collection to replace
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The collection to replace
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Collection"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: collection
    delete:
      tags:
        - Index Collection
      summary: Delete a collection
      operationId: deleteCollection
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: collectionId
          in: path
          description: The id of the collection to delete
          required: true
          schema:
            type: string
          example: id
      responses:
        200:
          description: "# Records Deleted"
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    patch:
      tags:
        - Index Collection
      summary: Update a collection partially
      operationId: updateCollection
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: collectionId
          in: path
          description: The id of the collection to update
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The collection to update (partial properties of the collection
          allowed)
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Collection"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: collection
  /index/{indexId}/collectionTag:
    get:
      tags:
        - Index Collection Tag
      summary: List all collection tags
      operationId: listCollectionTags
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: fields
          in: query
          description: Comma-separated list of additional fields to return. Use 'fields=*'
            to return all available fields. See the resource schema for fields you can request.
          schema:
            type: string
          example: color,description
      responses:
        200:
          description: An array of collection tags
          content:
            "*/*":
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/CollectionTag"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    post:
      tags:
        - Index Collection Tag
      summary: Create a collection tag
      operationId: createCollectionTag
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The new collection tag to create
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CollectionTag"
        required: true
      responses:
        201:
          description: Return the resource uri of created collection tag
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: collectionTag
  /index/{indexId}/collectionTag/{tagId}:
    get:
      tags:
        - Index Collection Tag
      summary: Retrieve a collection tag
      operationId: collectionTagById
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: tagId
          in: path
          description: Use syntax 'tagGroupId:tagId' to specify group, or just 'tagId' for default group.
          required: true
          schema:
            type: string
          example: id
        - name: fields
          in: query
          description: Comma-separated list of additional fields to return. Use 'fields=*'
            to return all available fields. See the resource schema for fields you can request.
          schema:
            type: string
          example: color,description
      responses:
        200:
          description: Expected response to a valid request
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/CollectionTag"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    put:
      tags:
        - Index Collection Tag
      summary: Replace a collection tag
      operationId: replaceCollectionTag
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: tagId
          in: path
          description: Use syntax 'tagGroupId:tagId' to specify group, or just 'tagId' for default group.
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The collection tag to replace
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CollectionTag"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: collectionTag
    delete:
      tags:
        - Index Collection Tag
      summary: Delete a collection tag
      operationId: deleteCollectionTag
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: tagId
          in: path
          description: Use syntax 'tagGroupId:tagId' to specify group, or just 'tagId' for default group.
          required: true
          schema:
            type: string
          example: id
      responses:
        200:
          description: "# Records Deleted"
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    patch:
      tags:
        - Index Collection Tag
      summary: Update a collection tag partially
      operationId: updateCollectionTag
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: tagId
          in: path
          description: Use syntax 'tagGroupId:tagId' to specify group, or just 'tagId' for default group.
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The collection tag to update (partial properties of the collection
          tag are allowed)
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CollectionTag"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: collectionTag
  /index/{indexId}/integration:
    get:
      tags:
        - Index Integration
      summary: List all integrations
      operationId: listIntegrations
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: fields
          in: query
          description: Comma-separated list of additional fields to return. Use 'fields=*'
            to return all available fields. See the resource schema for fields you can request.
          schema:
            type: string
          example: color,description
        - name: tagId
          in: query
          description: Filter by a particular integration tag id
          schema:
            type: string
      responses:
        200:
          description: An array of integrations
          content:
            "*/*":
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Integration"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    post:
      tags:
        - Index Integration
      summary: Create an integration
      operationId: createIntegration
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The new integration to create
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Integration"
        required: true
      responses:
        201:
          description: Return the resource uri of created integration
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: integration
  /index/{indexId}/integration/{integrationId}:
    get:
      tags:
        - Index Integration
      summary: Retrieve an integration
      operationId: integrationById
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: integrationId
          in: path
          description: The id of the integration to retrieve
          required: true
          schema:
            type: string
          example: id
        - name: fields
          in: query
          description: Comma-separated list of additional fields to return. Use 'fields=*'
            to return all available fields. See the resource schema for fields you can request.
          schema:
            type: string
          example: color,description
      responses:
        200:
          description: Expected response to a valid request
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Integration"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    put:
      tags:
        - Index Integration
      summary: Replace an integration
      operationId: replaceIntegration
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: integrationId
          in: path
          description: The id of the integration to replace
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The replaced integration
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Integration"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: integration
    delete:
      tags:
        - Index Integration
      summary: Delete an integration
      operationId: deleteIntegration
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: integrationId
          in: path
          description: The id of the integration to delete
          required: true
          schema:
            type: string
          example: id
      responses:
        200:
          description: "# Records Deleted"
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    patch:
      tags:
        - Index Integration
      summary: Update an integration partially
      operationId: updateIntegration
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: integrationId
          in: path
          description: The id of the integration to update
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The updated integration (partial properties of the integration
          are allowed)
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Integration"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: integration
  /index/{indexId}/integrationTag:
    get:
      tags:
        - Index Integration Tag
      summary: List all integration tags
      operationId: listIntegrationTags
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: fields
          in: query
          description: Comma-separated list of additional fields to return. Use 'fields=*'
            to return all available fields. See the resource schema for fields you can request.
          schema:
            type: string
          example: color,description
      responses:
        200:
          description: An array of integration tags
          content:
            "*/*":
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/IntegrationTag"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    post:
      tags:
        - Index Integration Tag
      summary: Create an integration tag
      operationId: createIntegrationTag
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The new integration tag to create
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/IntegrationTag"
        required: true
      responses:
        201:
          description: Return the resource uri of created integration tag
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: integrationTag
  /index/{indexId}/integrationTag/{tagId}:
    get:
      tags:
        - Index Integration Tag
      summary: Retrieve an integration tag
      operationId: integrationTagById
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: tagId
          in: path
          description: Use syntax 'tagGroupId:tagId' to specify group, or just 'tagId' for default group.
          required: true
          schema:
            type: string
          example: id
        - name: fields
          in: query
          description: Comma-separated list of additional fields to return. Use 'fields=*'
            to return all available fields. See the resource schema for fields you can request.
          schema:
            type: string
          example: color,description
      responses:
        200:
          description: Expected response to a valid request
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/IntegrationTag"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    put:
      tags:
        - Index Integration Tag
      summary: Replace an integration tag
      operationId: replaceIntegrationTag
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: tagId
          in: path
          description: Use syntax 'tagGroupId:tagId' to specify group, or just 'tagId' for default group.
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The integration tag to replace
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/IntegrationTag"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: integrationTag
    delete:
      tags:
        - Index Integration Tag
      summary: Delete an integration tag
      operationId: deleteIntegrationTag
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: tagId
          in: path
          description: Use syntax 'tagGroupId:tagId' to specify group, or just 'tagId' for default group.
          required: true
          schema:
            type: string
          example: id
      responses:
        200:
          description: "# Records Deleted"
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    patch:
      tags:
        - Index Integration Tag
      summary: Update an integration tag partially
      operationId: updateIntegrationTag
      parameters:
        - name: indexId
          in: path
          description: The id of the containing index
          required: true
          schema:
            type: string
          example: id
        - name: tagId
          in: path
          description: Use syntax 'tagGroupId:tagId' to specify group, or just 'tagId' for default group.
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The integration tag to update (partial properties of the integration
          tag are allowed)
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/IntegrationTag"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: integrationTag
  /filespec/{fileId}:
    get:
      tags:
        - FileSpec
      summary: Retrieve a filespec
      operationId: filespecById
      parameters:
        - name: fileId
          in: path
          description: The id of the file
          required: true
          schema:
            type: string
      responses:
        200:
          description: Expected response to a valid request
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/FileSpecResponse"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
  /filespec:
    post:
      tags:
        - FileSpec
      summary: Create a filespec
      description: Create a filespec to be referenced by another record. A subsequent POST to /file is required to actually upload a file.
      operationId: createFilespec
      requestBody:
        description: An object including the fileName and fileType (MIME type)
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/FileSpecRequest"
        required: true
      responses:
        201:
          description: Return the generated filespec id for the created file
          content:
            "*/*":
              schema:
                type: object
                example:
                  fileId: id
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: fileSpec
  /file/{fileId}:
    get:
      tags:
        - File
      summary: Retrieve a file
      operationId: fileById
      parameters:
        - name: fileId
          in: path
          description: The id of the file (received from response of creating a filespec)
          required: true
          schema:
            type: string
      responses:
        200:
          description: Expected response to a valid request
          content:
            "*/*":
              schema:
                type: string
                example: data:image/png;base64,/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKC...
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    post:
      tags:
        - File
      summary: Upload a file
      description: Upload a file against an existing filespec
      operationId: uploadFile
      parameters:
        - name: fileId
          in: path
          description: The id of the file (received from response of creating a filespec)
          required: true
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
                - fileData
              properties:
                fileData:
                  type: string
                  description: The file to upload (included in a "fileData" field
                    in formData format - base64 encoded).
        required: true
      responses:
        201:
          description: Return the resource uri of uploaded file
          content:
            "*/*":
              schema:
                type: string
                example: /api/2/file/:fileId
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
  /connector/{connectorId}/refresh:
    put:
      tags:
        - Connector
      summary: Refresh a connector
      operationId: refreshConnector
      parameters:
        - name: connectorId
          in: path
          description: The id of the connector to refresh
          required: true
          schema:
            type: string
          example: id
      responses:
        200:
          description: Response when refresh has started successfully
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
  /connector/{connectorId}/refresh/{period}:
    put:
      tags:
        - Connector
      summary: Refresh a connector w/ period
      operationId: refreshConnectorWithPeriod
      parameters:
        - name: connectorId
          in: path
          description: The id of the connector to refresh
          required: true
          schema:
            type: string
          example: id
        - name: period
          in: path
          description: The last modified window of documents to retrieve (in minutes)
          required: true
          schema:
            type: number
          example: 60
      responses:
        200:
          description: Response when refresh has started successfully
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
  /connector/{connectorId}/status:
    get:
      tags:
        - Connector
      summary: Retrieve a connector's status
      operationId: connectorStatus
      parameters:
        - name: connectorId
          in: path
          description: The id of the connector
          required: true
          schema:
            type: string
          example: id
      responses:
        200:
          description: The connector's current status and per-folder file counts
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/ConnectorStatus"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    delete:
      tags:
        - Connector
      summary: Purge all files from a connector's folders
      operationId: deleteConnectorStatus
      parameters:
        - name: connectorId
          in: path
          description: The id of the connector
          required: true
          schema:
            type: string
          example: id
      responses:
        200:
          description: A confirmation message describing what was deleted
          content:
            text/plain:
              schema:
                type: string
              example: All files in all folders for connector 'id' deleted
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
  /connector/{connectorId}/status/{folder}:
    get:
      tags:
        - Connector
      summary: Retrieve a connector folder's contents metadata
      operationId: connectorFolderStatus
      parameters:
        - name: connectorId
          in: path
          description: The id of the connector
          required: true
          schema:
            type: string
          example: id
        - name: folder
          in: path
          description: One of incoming, processing, completed, failed
          required: true
          schema:
            type: string
            enum:
              - incoming
              - processing
              - completed
              - failed
          example: incoming
      responses:
        200:
          description: Per-file metadata for the named folder
          content:
            "*/*":
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ConnectorMeta"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    delete:
      tags:
        - Connector
      summary: Purge a single connector folder
      operationId: deleteConnectorFolderStatus
      parameters:
        - name: connectorId
          in: path
          description: The id of the connector
          required: true
          schema:
            type: string
          example: id
        - name: folder
          in: path
          description: One of incoming, processing, completed, failed
          required: true
          schema:
            type: string
            enum:
              - incoming
              - processing
              - completed
              - failed
          example: failed
      responses:
        200:
          description: A confirmation message describing what was deleted
          content:
            text/plain:
              schema:
                type: string
              example: All files in folder 'failed' for connector 'id' deleted
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
  /map:
    get:
      tags:
        - Map
      summary: List all maps
      operationId: listMaps
      responses:
        200:
          description: An array of maps
          content:
            "*/*":
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Map"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    post:
      tags:
        - Map
      summary: Create a map
      description: Will create a map and start an automatic build
      operationId: createMap
      requestBody:
        description: The new map to create
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Map"
        required: true
      responses:
        201:
          description: Return the resource uri of created map
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: map
  /map/{mapId}:
    get:
      tags:
        - Map
      summary: Retrieve a map
      operationId: mapById
      parameters:
        - name: mapId
          in: path
          description: The id of the map
          required: true
          schema:
            type: string
          example: id
      responses:
        200:
          description: Expected response to a valid request
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Map"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    put:
      tags:
        - Map
      summary: Replace a map
      operationId: replaceMap
      parameters:
        - name: mapId
          in: path
          description: The id of the map to replace
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The replacement map
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Map"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: map
    delete:
      tags:
        - Map
      summary: Delete a map
      operationId: deleteMap
      parameters:
        - name: mapId
          in: path
          description: The id of the map to delete
          required: true
          schema:
            type: string
          example: id
      responses:
        200:
          description: "# Records Deleted"
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    patch:
      tags:
        - Map
      summary: Update a map partially
      operationId: updateMap
      parameters:
        - name: mapId
          in: path
          description: The id of the map
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The map to update (partial properties allowed)
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Map"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: map
  /map/{mapId}/duplicate:
    put:
      tags:
        - Map
      summary: Duplicate a map
      operationId: duplicateMap
      parameters:
        - name: mapId
          in: path
          description: The id of the map to replace
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: Details of the target map to be created
        content:
          application/json:
            schema:
              required:
                - targetId
                - targetName
              type: object
              properties:
                targetId:
                  type: string
                targetName:
                  type: string
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: map
  /style:
    get:
      tags:
        - Style
      summary: List all styles
      operationId: listStyles
      responses:
        200:
          description: An array of styles
          content:
            "*/*":
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Style"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    post:
      tags:
        - Style
      summary: Create a style
      operationId: createStyle
      requestBody:
        description: The new style to create
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Style"
        required: true
      responses:
        201:
          description: Return the resource uri of created style
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: style
  /style/{styleId}:
    get:
      tags:
        - Style
      summary: Retrieve a style
      operationId: styleById
      parameters:
        - name: styleId
          in: path
          description: The id of the style
          required: true
          schema:
            type: string
          example: id
      responses:
        200:
          description: Expected response to a valid request
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Style"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    put:
      tags:
        - Style
      summary: Replace a style
      operationId: replaceStyle
      parameters:
        - name: styleId
          in: path
          description: The id of the style to replace
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The replacement style
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Style"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: style
    delete:
      tags:
        - Style
      summary: Delete a style
      operationId: deleteStyle
      parameters:
        - name: styleId
          in: path
          description: The id of the style to delete
          required: true
          schema:
            type: string
          example: id
      responses:
        200:
          description: "# Records Deleted"
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    patch:
      tags:
        - Style
      summary: Update a style partially
      operationId: updateStyle
      parameters:
        - name: styleId
          in: path
          description: The id of the style
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The style to update (partial properties allowed)
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Style"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: style
  /style/{styleId}/duplicate:
    put:
      tags:
        - Style
      summary: Duplicate a style
      operationId: duplicateStyle
      parameters:
        - name: styleId
          in: path
          description: The id of the style to replace
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: Details of the target style to be created
        content:
          application/json:
            schema:
              required:
                - targetId
                - targetName
              type: object
              properties:
                targetId:
                  type: string
                targetName:
                  type: string
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: style
  /publication:
    get:
      tags:
        - Publication
      summary: List all publications
      operationId: listPublications
      responses:
        200:
          description: An array of publications
          content:
            "*/*":
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Publication"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    post:
      tags:
        - Publication
      summary: Create a publication
      operationId: createPublication
      requestBody:
        description: The new publication to create
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Publication"
        required: true
      responses:
        201:
          description: Return the resource uri of created publication
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: publication
  /publication/{publicationId}:
    get:
      tags:
        - Publication
      summary: Retrieve a publication
      operationId: publicationById
      parameters:
        - name: publicationId
          in: path
          description: The id of the publication
          required: true
          schema:
            type: string
          example: id
      responses:
        200:
          description: Expected response to a valid request
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Publication"
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    put:
      tags:
        - Publication
      summary: Replace a publication
      operationId: replacePublication
      parameters:
        - name: publicationId
          in: path
          description: The id of the publication to replace
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The replacement publication
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Publication"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: publication
    delete:
      tags:
        - Publication
      summary: Delete a publication
      operationId: deletePublication
      parameters:
        - name: publicationId
          in: path
          description: The id of the publication to delete
          required: true
          schema:
            type: string
          example: id
      responses:
        200:
          description: "# Records Deleted"
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
    patch:
      tags:
        - Publication
      summary: Update a publication partially
      operationId: updatePublication
      parameters:
        - name: publicationId
          in: path
          description: The id of the publication
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: The publication to update (partial properties allowed)
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Publication"
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: publication
  /publication/{publicationId}/duplicate:
    put:
      tags:
        - Publication
      summary: Duplicate a publication
      operationId: duplicatePublication
      parameters:
        - name: publicationId
          in: path
          description: The id of the publication to replace
          required: true
          schema:
            type: string
          example: id
      requestBody:
        description: Details of the target publication to be created
        content:
          application/json:
            schema:
              required:
                - targetId
                - targetName
              type: object
              properties:
                targetId:
                  type: string
                targetName:
                  type: string
        required: true
      responses:
        201:
          description: Null response
          content: {}
        default:
          description: Unexpected error
          content:
            "*/*":
              schema:
                $ref: "#/components/schemas/Error"
      x-codegen-request-body-name: publication
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        API authentication via `Authorization: Bearer <your-api-key>`. Obtain
        your API key from Config → API in the Aplas web app.
  schemas:
    Index:
      required:
        - id
        - name
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        fieldDefinitions:
          type: array
          items:
            $ref: "#/components/schemas/FieldDefinitions"
      example:
        id: id
        name: Index A
        description: More information
        fieldDefinitions:
          - scope: Application
            taggedBy:
              - finance
            name: Health
            id: health
            description: The ratings for health
            type: Rating
            subType: Color
            required: false
            isArray: true
            isArrayOrdered: true
            isArrayLabeled: true
            options:
              - unhealthy:#EE724E
              - normal:#EEC24E
              - healthy:#4EEE94
          - scope: Integration
            name: Target Location
            id: target-location
            description: location where payload is sent
            type: String
            required: false
            isArray: false
    Component:
      required:
        - id
        - name
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        shortName:
          type: string
        version:
          type: string
        tagIds:
          type: array
          items:
            type: string
        description:
          type: string
        status:
          type: string
          enum:
            - Proposed
            - PhaseIn
            - Standard
            - PhaseOut
            - Retired
      example:
        id: id
        name: Component A
        tagIds:
          - id_tag
        description: More information
        status: Standard
        customFieldA: Custom Field Value
        customFieldB:
          - alias1
          - alias2
    ComponentTag:
      required:
        - color
        - id
        - name
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        shortName:
          type: string
        description:
          type: string
        color:
          type: string
        status:
          type: string
          enum:
            - Proposed
            - PhaseIn
            - Standard
            - PhaseOut
            - Retired
      example:
        id: id
        name: Com Tag A
        description: More information
        color: "#FFFFFF"
        status: Standard
        customFieldA: Custom Field Value
        customFieldB:
          - alias1
          - alias2
    Application:
      required:
        - id
        - mapSize
        - name
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        shortName:
          type: string
        version:
          type: string
        vendor:
          type: string
        imageId:
          type: string
          description: Reference to the id of a filespec record
        mapSize:
          type: string
          enum:
            - None
            - Small
            - Regular
            - Large
        tagIds:
          type: array
          description: Use syntax 'tagGroupId:tagId' to specify group, or just 'tagId' for default group.
          items:
            type: string
        description:
          type: string
        status:
          type: string
          enum:
            - Proposed
            - PhaseIn
            - Standard
            - PhaseOut
            - Retired
        componentIds:
          type: array
          items:
            type: string
      example:
        id: id
        name: Application A
        mapSize: Large
        tagIds:
          - id_tag
        description: More information
        status: Standard
        customFieldA: Custom Field Value
        health:
          - label: arch
            value: healthy
          - label: ops
            value: normal
          - label: dev
            value: unhealthy
          - label: overall
            value: normal
        componentIds:
          - id_component_1
          - id_component_2
    ApplicationTagGroup:
      required:
        - id
        - name
      type: object
      properties:
        id:
          type: string
        name:
          type: string
      example:
        id: id
        name: App Tag Group A
    ApplicationTag:
      required:
        - color
        - id
        - name
        - tagGroupId
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        shortName:
          type: string
        description:
          type: string
        color:
          type: string
        status:
          type: string
          enum:
            - Proposed
            - PhaseIn
            - Standard
            - PhaseOut
            - Retired
        parentTagId:
          type: string
        tagGroupId:
          type: string
      example:
        id: id
        name: App Tag A
        description: More information
        color: "#FFFFFF"
        status: Standard
        tagGroupId: id_tagGroup
        parentTagId: id_tag_parent
        customFieldA: Custom Field Value
        customFieldB:
          - alias1
          - alias2
    Collection:
      required:
        - id
        - name
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        shortName:
          type: string
        tagIds:
          type: array
          items:
            type: string
        description:
          type: string
        labeled:
          type: boolean
        ordered:
          type: boolean
        status:
          type: string
          enum:
            - Proposed
            - PhaseIn
            - Standard
            - PhaseOut
            - Retired
        items:
          type: array
          items:
            $ref: "#/components/schemas/CollectionItem"
      example:
        id: id
        name: Collection A
        tagIds:
          - id_tag
        description: More information
        status: Standard
        customFieldA: Custom Field Value
        customFieldB:
          - alias1
          - alias2
        items:
          - applicationId: application_id
            label: This item is an application
          - integrationId: integration_id
            label: This item is an integration
    CollectionItem:
      type: object
      properties:
        integrationId:
          type: string
        applicationId:
          type: string
        label:
          type: string
      example:
        applicationId: id_application
    CollectionTag:
      required:
        - color
        - id
        - name
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        shortName:
          type: string
        description:
          type: string
        color:
          type: string
        status:
          type: string
          enum:
            - Proposed
            - PhaseIn
            - Standard
            - PhaseOut
            - Retired
      example:
        id: id
        name: App Tag A
        description: More information
        color: "#FFFFFF"
        status: Standard
        customFieldA: Custom Field Value
        customFieldB:
          - alias1
          - alias2
    Integration:
      required:
        - id
        - name
        - payload
        - sourceApplicationId
        - targetApplicationId
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        shortName:
          type: string
        tagIds:
          type: array
          items:
            type: string
        sourceApplicationId:
          type: string
        targetApplicationId:
          type: string
        payload:
          type: string
        version:
          type: string
        description:
          type: string
        status:
          type: string
          enum:
            - Proposed
            - PhaseIn
            - Standard
            - PhaseOut
            - Retired
        componentIds:
          type: array
          items:
            type: string
      example:
        id: id
        name: INT-001
        tagIds:
          - id_tag
        sourceApplicationId: id_source
        targetApplicationId: id_target
        payload: A Payload
        description: More information
        status: Standard
        customFieldA: Custom Field Value
        customFieldB:
          - alias1
          - alias2
        componentIds:
          - id_component_1
          - id_component_2
    IntegrationTag:
      required:
        - color
        - id
        - name
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        shortName:
          type: string
        description:
          type: string
        color:
          type: string
        status:
          type: string
          enum:
            - Proposed
            - PhaseIn
            - Standard
            - PhaseOut
            - Retired
      example:
        id: id
        name: Int Tag A
        description: More information
        color: "#FFFFFF"
        status: Standard
        customFieldA: Custom Field Value
        customFieldB:
          - alias1
          - alias2
    FieldDefinitions:
      required:
        - id
        - name
        - scope
        - type
      type: object
      properties:
        scope:
          type: string
          enum:
            - Global
            - Application
            - ApplicationTag
            - Integration
            - IntegrationTag
            - Collection
            - CollectionTag
            - Component
            - ComponentTag
        taggedBy:
          type: array
          items:
            type: string
        name:
          type: string
        id:
          type: string
        description:
          type: string
        type:
          type: string
          enum:
            - String
            - Number
            - Date
            - DateTime
            - Link
            - Email
            - Color
            - Currency
            - Boolean
            - Choice
            - Rating
            - Image
        subType:
          type: string
          enum:
            - Color
            - Star
        visibility:
          type: string
          enum:
            - Visible
            - VisibleFeatured
            - Hidden
        required:
          type: boolean
        isArray:
          type: boolean
        isArrayLabeled:
          type: boolean
        isArrayOrdered:
          type: boolean
        options:
          type: array
          items:
            type: string
      example:
        description: Any entity should have a department,
        id: department
        name: Department
        required: false
        type: String
        scope: Global
    FieldArray:
      type: array
      example:
        - name
        - description
        - custom-field-a
      items:
        type: string
    Error:
      required:
        - code
        - message
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
      example:
        code: 500
        message: Internal server error
    FileSpecResponse:
      type: object
      properties:
        fileId:
          type: string
        fileName:
          type: string
        fileType:
          type: string
          description: MIME type
        imgThumbnail:
          type: string
          description: Base64-encoded format
        imgHeight:
          type: integer
        imgWidth:
          type: integer
      example:
        fileId: id
        fileName: file.png
        fileType: image/png
        imgThumbnail: data:image/png;base64,/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKC...
        imgHeight: 640
        imgWidth: 640
    FileSpecRequest:
      required:
        - fileName
        - fileType
      type: object
      properties:
        fileName:
          type: string
        fileType:
          type: string
          description: MIME type
      example:
        fileName: file.png
        fileType: image/png
    Map:
      required:
        - id
        - indexId
        - name
        - tagGroupId
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        applicationFilter:
          type: string
        indexId:
          type: string
          description: Reference an index id
        tagGroupId:
          type: string
          description: Reference a tag group id within the index
      example:
        id: id
        name: Map A
        description: More information
        applicationFilter: mapSize = 'small'
        indexId: id_index
        tagGroupId: id_tag_group
    Style:
      required:
        - id
        - name
        - mapId
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        mapId:
          type: string
          description: Reference a map id
      example:
        id: id
        name: Style A
        description: A description of my style
        mapId: id_map
    Publication:
      required:
        - id
        - interfaceType
        - name
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        interfaceType:
          type: string
          enum:
            - metamap
            - metasearch
            - indexviz
        indexId:
          type: string
          description: Reference a index id
        mapId:
          type: string
          description: Reference a map id
        settings:
          type: array
          items:
            $ref: "#/components/schemas/Setting"
      example:
        id: id
        name: Publication A
        description: A description of my publication
        interfaceType: metamap
        indexId: id_map
        settings:
          - id: "interactive"
            value: "false"
          - id: "map-zoom-max"
            value: 40
          - id: "theme"
            value: "custom"
          - id: "canvas-color"
            value: "#ff5500"
    Setting:
      required:
        - id
        - value
      type: object
      properties:
        id:
          type: string
          description: "A specific id can be found by hovering over the code icon in Aplas Studio"
        value:
          oneOf:
            - type: string
            - type: integer
            - type: number
            - type: boolean
            - type: array
    ConnectorStatus:
      required:
        - id
        - status
        - isAcquiring
        - isProcessing
        - incoming
        - processing
        - completed
        - failed
      type: object
      properties:
        id:
          type: string
          description: The connector's assetId
        status:
          type: integer
          description: |
            Connector lifecycle status:
            0 = Unconfigured, 1 = Unlinked, 2 = Linking,
            3 = Failed, 4 = Disabled, 5 = Active
          enum: [0, 1, 2, 3, 4, 5]
        isAcquiring:
          type: boolean
          description: True while the connector is fetching documents from the remote
        isProcessing:
          type: boolean
          description: True while the connector is processing fetched documents
        statusMessage:
          type: string
          description: Optional human-readable status message; omitted when absent
        incoming:
          type: integer
          description: Count of non-metadata files in the `incoming` folder
        processing:
          type: integer
          description: Count of non-metadata files in the `processing` folder
        completed:
          type: integer
          description: Count of non-metadata files in the `completed` folder
        failed:
          type: integer
          description: Count of non-metadata files in the `failed` folder
    ConnectorMeta:
      required:
        - id
        - title
        - reference
        - process
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        remoteTypeId:
          type: string
        localType:
          type: integer
          description: An EntityTypeEnum value
        reference:
          type: string
        process:
          $ref: "#/components/schemas/ConnectorMetaProcess"
        version:
          type: string
        created:
          $ref: "#/components/schemas/ConnectorMetaContact"
        updated:
          $ref: "#/components/schemas/ConnectorMetaContact"
        type:
          type: string
        entityType:
          type: integer
          description: Deprecated — use `localType` instead
          deprecated: true
    ConnectorMetaProcess:
      type: object
      properties:
        attempts:
          type: integer
        status:
          type: integer
        message:
          type: string
        method:
          type: string
        date:
          type: integer
        notified:
          type: string
          format: date-time
    ConnectorMetaContact:
      type: object
      properties:
        name:
          type: string
        email:
          type: string
        date:
          type: string
