openapi: 3.1.0
info:
  description: Dataflow Automation is a long-term secured data storage, and data refinery.  Dataflow Automation is based on the Trust No One (TNO) architecture.  Data is encrypted while at rest and can only be decrypted by selected individuals.  In addition, Dataflow Automation provides ability to filter, transform and push to other 3rd party systems.
  title: Dataflow Automation
  version: ''
servers:
  - url: https://dataflownode.zerionsoftware.com/zcrypt/v1.0/
paths:
  /claimSharedDataflow/{dataflowId}:
    post:
      operationId: post-claim-shared-dataflow-dataflow-id
      summary: Request an Access to a Dataflow
      description: Request an access to someone's Dataflow
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    success: 0
              schema:
                type: object
                properties:
                  success:
                    description: success is 1 when request is completed
                    type: number
      security:
        - oauth2: []
      tags: []
  /confirmAccessDataflow/{dataflowId}:
    post:
      operationId: post-confirm-access-dataflow-dataflow-id
      summary: Confirm Access to the Dataflow
      description: Confirm the Access to the dataflow by the Shared User.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    dataflow: {}
              schema:
                type: object
                properties:
                  dataflow:
                    description: the shared dataflow will be returned to the shared user
                    type: object
                    properties: {}
      security:
        - oauth2: []
      tags: []
  /connections:
    get:
      operationId: get-connections
      summary: Get Connections
      description: Get Connections.
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    - _id: 56f5ee16dbfeb2ebea4c76dc
                      action: Edit
                      config:
                        sqlServerDb: xxxxxxxxxx
                        sqlServerHost: xxxxxxxxxx
                        sqlServerPassword: xxxxxxxxxx
                        sqlServerPort: '1433'
                        sqlServerSchema: xxxxxxxxxx
                        sqlServerUsername: xxxxxxxxxx
                        subdomain: ''
                      connectionName: sql_server_bad
                      createById: 5684058f159fffbe29ff9912
                      createdBy: user_5000
                      description: test bad connection
                      owningEntity: user_5000
                      trustedEntities: []
                      type: db
              schema:
                type: object
                properties:
                  id:
                    description: id of the Connection
                    type: string
                  action:
                    description: Not used
                    type: string
                  config:
                    type: object
                    properties:
                      action:
                        description: depending of what type of action
                        type: string
                      condition_expression:
                        description: Condition Expression
                        type: string
                      condition_helper_code:
                        description: Condition Helper Code
                        type: string
                  connection_name:
                    description: Name of the Connection
                    type: string
                  create_by_id:
                    description: Creator Entity Id
                    type: string
                  created_by:
                    description: Name of the creator
                    type: string
                  description:
                    description: Description of the Connection
                    type: string
                  owning_entity:
                    description: Connection owner
                    type: string
                  trusted_entities:
                    description: Array of Entity Ids that have permission to use this connection
                  type:
                    description: type of the Connection (db, iform_oauth2, slack, smtp, zoho)
                    type: string
      security:
        - oauth2: []
      tags: []
    post:
      operationId: post-connections
      summary: Create WebMerge Connection
      description: Create WebMerge Connection.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                config:
                  type: object
                  properties:
                    webmerge_api_key:
                      description: WebMerge Api Key
                      type: string
                    webmerge_api_secret:
                      description: WebMerge Api Secret
                      type: string
                  required:
                    - webmergeApiKey
                    - webmergeApiSecret
                connection_name:
                  description: Name of the connection
                  type: string
                description:
                  description: Description of the connection
                  type: string
                type_webmerge:
                  description: Connection Type
                  type: string
              examples:
                - config:
                    webmergeApiKey: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                    webmergeApiSecret: xxxxxxxxxxxxxxx
                  connectionName: zoho_connection
                  description: test
                  type: webmerge
              required:
                - connectionName
                - type 'webmerge'
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    _id: 574bcd24d96535adaf730a63
              schema:
                type: object
                properties:
                  id:
                    description: the created Post Action Id
                    type: string
      security:
        - oauth2: []
      tags: []
  /connections/{connectionId}:
    delete:
      operationId: delete-connections-connection-id
      summary: Delete Connection
      description: Delete Connection.
      parameters:
        - name: connectionId
          in: path
          description: id of the Connection
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    _id: 574bcd24d96535adaf730a63
              schema:
                type: object
                properties:
                  id:
                    description: the delete Connection Id
                    type: string
      security:
        - oauth2: []
      tags: []
    get:
      operationId: get-connections-connection-id
      summary: Get Specific Connection
      description: Get Specific Connection.
      parameters:
        - name: connectionId
          in: path
          description: id of the Connection
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    _id: 56f5ee16dbfeb2ebea4c76dc
                    action: Edit
                    config:
                      sqlServerDb: xxxxxxxxxx
                      sqlServerHost: xxxxxxxxxx
                      sqlServerPassword: xxxxxxxxxx
                      sqlServerPort: '1433'
                      sqlServerSchema: xxxxxxxxxx
                      sqlServerUsername: xxxxxxxxxx
                      subdomain: ''
                    connectionName: sql_server_bad
                    createById: 5684058f159fffbe29ff9912
                    createdBy: user_5000
                    description: test bad connection
                    owningEntity: user_5000
                    trustedEntities: []
                    type: db
              schema:
                type: object
                properties:
                  id:
                    description: id of the Connection
                    type: string
                  action:
                    description: Not used
                    type: string
                  config:
                    type: object
                    properties:
                      action:
                        description: depending of what type of action
                        type: string
                      condition_expression:
                        description: Condition Expression
                        type: string
                      condition_helper_code:
                        description: Condition Helper Code
                        type: string
                  connection_name:
                    description: Name of the Connection
                    type: string
                  create_by_id:
                    description: Creator Entity Id
                    type: string
                  created_by:
                    description: Name of the creator
                    type: string
                  description:
                    description: Description of the Connection
                    type: string
                  owning_entity:
                    description: Connection owner
                    type: string
                  trusted_entities:
                    description: Array of Entity Ids that have permission to use this connection
                  type:
                    description: type of the Connection (db, iform_oauth2, slack, smtp, zoho)
                    type: string
      security:
        - oauth2: []
      tags: []
    put:
      operationId: put-connections-connection-id
      summary: Update Connection
      description: Update Connection.
      parameters:
        - name: connectionId
          in: path
          description: id of the Connection
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  description: Connection Id
                  type: string
                config:
                  description: Configuration based on connection type
                  type: object
                  properties: {}
                connection_name:
                  description: Connection Name
                  type: string
                created_by:
                  description: Created by entity name
                  type: string
                created_by_id:
                  description: Created by entity Id
                  type: string
                description:
                  description: Connection description
                  type: string
                owning_entity:
                  description: Owner's name
                  type: string
                trusted_entities:
                  description: Array of Entities that have permission to this connection
                  type: array
                type:
                  description: Connection type (email, iform_oauth2, )
                  type: string
              required:
                - _id
                - connectionName
                - type
                - config
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    _id: 574bcd24d96535adaf730a63
              schema:
                type: object
                properties:
                  id:
                    description: the updated Connection Id
                    type: string
      security:
        - oauth2: []
      tags: []
  /dataflows:
    get:
      operationId: get-dataflows
      summary: Get Dataflows
      description: Return assigned Dataflows.
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    - _id: 56ee30b8b251c553547ac88e
                      description: ''
                      maxObjectsPerDataflow: 20
                      name: DF14
                      owningEntity: demo_5000
              schema:
                type: object
                properties:
                  id:
                    description: id of the Dataflow
                    type: string
                  description:
                    description: description of the Dataflow
                    type: string
                  max_objects_per_dataflow:
                    description: Number of objects allowed per Dataflow
                    type: number
                  name:
                    description: name of the Dataflow
                    type: string
                  owning_entity:
                    description: owner of the Dataflow
                    type: string
      security:
        - oauth2: []
      tags: []
    post:
      operationId: post-dataflows
      summary: Create a Dataflow
      description: Create a Dataflow.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                body:
                  description: |-
                    {
                        "name": "new_dataflow",
                        "description" : "dataflow description"
                    }
                  type: string
                description:
                  description: description of the Dataflow
                  type: string
                enable_error_email_notifications:
                  description: Indicates if the error email notifications will be enabled.
                  type: string
                error_notification_email:
                  description: The email or email addresses to send error notifications to. Multiple emails must be separated by a comma.
                  type: string
                name:
                  description: name of the Dataflow
                  type: string
              examples:
                - Body: ''
                  description: ''
                  enableErrorEmailNotifications: ''
                  errorNotificationEmail: ''
                  name: ''
              required:
                - name
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    CREATED_BY: 5684058f159fffbe29ff9912
                    CREATED_DATE: 2016-04-24T03:14:48.797Z
                    MODIFIED_BY: 5684058f159fffbe29ff9912
                    MODIFIED_DATE: 2016-04-24T03:14:48.797Z
                    _id: 571c3a28d5ae983a0060b57f
                    description: test 5
                    name: tes55
                    owningEntity: demo_5
                    trustedEntities:
                      - accessLevel: READWRITE
                        entity: 5684058f159fffbe29ff9913
              schema:
                type: object
                properties:
                  created_by:
                    description: name of entity that created the Dataflow
                    type: string
                  created_date:
                    description: Creation date of the Dataflow
                    type: string
                  modified_by:
                    description: name of entity last modified the Dataflow
                    type: string
                  modified_date:
                    description: Modified date of the Dataflow
                    type: string
                  id:
                    description: id of the Dataflow
                    type: string
                  description:
                    description: description of the Dataflow
                    type: string
                  enable_error_email_notifications:
                    description: Indicates if the error email notifications will be enabled.
                    type: string
                  error_notification_email:
                    description: The email or email addresses to send error notifications to. Multiple emails must be separated by a comma.
                    type: string
                  name:
                    description: name of the Dataflow
                    type: string
                  owning_entity:
                    description: owner of the Dataflow
                    type: string
                  trusted_entities:
                    type: array
                    items: {}
                required:
                  - name
      security:
        - oauth2: []
      tags: []
  /dataflows/count/{matchingText}:
    get:
      operationId: get-dataflows-count-matching-text
      summary: Get Dataflow count
      description: Get Number of dataflows by the matchingText.
      parameters:
        - name: matchingText
          in: path
          description: string that matches dataflow name, Id, description, or the owner's name. Leave it empty for no matching text.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    count: 3
              schema:
                type: object
                properties:
                  count:
                    type: number
      security:
        - oauth2: []
      tags: []
  /dataflows/countByPolicy/{matchingText}:
    get:
      operationId: get-dataflows-count-by-policy-matching-text
      summary: Get Dataflow count by ZIM policy
      description: By ZIM policy, user can also get a number of dataflows that owned by others.
      parameters:
        - name: matchingText
          in: path
          description: string that matches dataflow name, Id, description, or the owner's name. Leave it empty for no matching text
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    count: 3
              schema:
                type: object
                properties:
                  count:
                    type: number
      security:
        - oauth2: []
      tags: []
  /dataflows/page/{itemsPerPage}/{pageNumber}/{matchingText}:
    get:
      operationId: get-dataflows-page-items-per-page-page-number-matching-text
      summary: Get Dataflows by Page
      description: Get dataflows by paginations.
      parameters:
        - name: itemsPerPage
          in: path
          description: Number of dataflows per page
          required: true
          schema:
            type: string
        - name: pageNumber
          in: path
          description: Current Page Number
          required: true
          schema:
            type: string
        - name: matchingText
          in: path
          description: String that matches dataflow name, Id, description, or the owner's name. Leave it empty for no matching text.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    - _id: 56ee30b8b251c553547ac88e
                      description: ''
                      maxObjectsPerDataflow: 20
                      name: DF14
                      owningEntity: demo_5000
              schema:
                type: object
                properties:
                  id:
                    description: id of the Dataflow
                    type: string
                  description:
                    description: description of the Dataflow
                    type: string
                  max_objects_per_dataflow:
                    description: Number of objects allowed per Dataflow
                    type: number
                  name:
                    description: name of the Dataflow
                    type: string
                  owning_entity:
                    description: owner of the Dataflow
                    type: string
      security:
        - oauth2: []
      tags: []
  /dataflows/{dataflowId}:
    delete:
      operationId: delete-dataflows-dataflow-id
      summary: Delete a Dataflow
      description: 'Delete a Dataflow.  Deleting a Dataflow will also result in deleting all of its components: (RecordSets, Webhooks, Post Actions and data).'
      parameters:
        - name: dataflowId
          in: path
          description: ID of the Dataflow
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    _id: 5743cbbccd7b08254a5a6ec0
              schema:
                type: object
                properties:
                  id:
                    description: the deleted Dataflow Id
                    type: string
      security:
        - oauth2: []
      tags: []
    get:
      operationId: get-dataflows-dataflow-id
      summary: Get Specific Dataflow
      description: Return specific Dataflow.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    CREATED_BY: 5684058f159fffbe29ff9912
                    CREATED_DATE: 2016-03-21T18:08:59.656Z
                    MODIFIED_BY: 5684058f159fffbe29ff9912
                    MODIFIED_DATE: 2016-03-21T18:08:59.656Z
                    _id: 56ee30b8b251c553547ac88e
                    description: ''
                    links:
                      - source: 0
                        target: 3
                        value: 1
                    maxObjectsPerDataflow: 20
                    name: DF14
                    nodes:
                      - _id: 56ee30c2b251c553547ac88f
                        name: df14
                        node: 0
                        nodeType: node
                        recordCount: 0
                        type: recordset
                      - _id: 56eec562b251c553547ac8ad
                        name: df24
                        node: 1
                        nodeType: node
                        recordCount: 0
                        type: recordset
                      - _id: 56ef61e1f67f7c386d75852e
                        name: wh_df24
                        node: 2
                        nodeRecordSetId: 56eec562b251c553547ac8ad
                        nodeType: input
                        type: webhook
                      - _id: 56f038bbf67f7c386d7585fa
                        name: ss
                        node: 3
                        nodeRecordSetId: 56ee30c2b251c553547ac88f
                        nodeType: output
                        type: slack
                    owningEntity: demo_5000
                    status: 0
                    trustedEntities:
                      - accessLevel: READWRITE
                        entity: 5684058f159fffbe29ff9912
              schema:
                type: object
                properties:
                  created_by:
                    description: Name of the person created this Dataflow
                    type: string
                  created_date:
                    description: Created Date
                    type: string
                  modified_by:
                    description: Name of the last person modified this Dataflow
                    type: string
                  modified_date:
                    description: Modified Date
                    type: string
                  id:
                    description: id of the Dataflow
                    type: string
                  description:
                    description: description of the Dataflow
                    type: string
                  enable_error_email_notifications:
                    description: Indicates if the error email notifications will be enabled.
                    type: string
                  error_notification_email:
                    description: The email or email addresses to send error notifications to. Multiple emails must be separated by a comma.
                    type: string
                  links:
                    type: array
                    items: {}
                  max_objects_per_dataflow:
                    description: Number of objects allowed per Dataflow
                    type: number
                  name:
                    description: name of the Dataflow
                    type: string
                  nodes:
                    type: array
                    items: {}
                  owning_entity:
                    description: owner of the Dataflow
                    type: string
                  status:
                    description: Currently not used
                    type: number
                  trusted_entities:
                    type: array
                    items: {}
      security:
        - oauth2: []
      tags: []
    put:
      operationId: put-dataflows-dataflow-id
      summary: Update a Dataflow
      description: Update a Dataflow.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                autocleani_form_data:
                  description: true/false
                  type: boolean
                description:
                  description: description of the Dataflow
                  type: string
                enable_error_email_notifications:
                  description: Indicates if the error email notifications will be enabled.
                  type: string
                error_notification_email:
                  description: The email or email addresses to send error notifications to. Multiple emails must be separated by a comma.
                  type: string
                name:
                  description: name of the Dataflow
                  type: string
                status:
                  description: 1 is for active, 0 is for inactive. By default, status is set to 1. In case of defective dataflow, it should be set to 0
                  type: number
              required:
                - name
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    _id: 5743cbbccd7b08254a5a6ec0
              schema:
                type: object
                properties:
                  id:
                    description: the updated Dataflow Id
                    type: string
      security:
        - oauth2: []
      tags: []
  /dataflows/{dataflowId}/inactiveNode/nodeId/{nodeId}/status/{status}:
    put:
      operationId: put-dataflows-dataflow-id-inactive-node-node-id-node-id-status-status
      summary: De-activate/Re-activate an object in Dataflow
      description: De-activate/Re-activate an object in Dataflow.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: nodeId
          in: path
          description: id of the node/object inside the Dataflow
          required: true
          schema:
            type: string
        - name: status
          in: path
          description: node/object status (1 for activate itself, 2 for activate itself and children, and -1 for de-activate itself, -2 for de-activate itself and children)
          required: true
          schema:
            type: number
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    _id: 5743cbbccd7b08254a5a6ec0
              schema:
                type: object
                properties:
                  id:
                    description: the updated Dataflow Id
                    type: string
      security:
        - oauth2: []
      tags: []
  /dataflows/{dataflowId}/recordsets:
    get:
      operationId: get-dataflows-dataflow-id-recordsets
      summary: Get RecordSets
      description: Get RecordSets for the given dataflowId
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    - _id
                    - recordSetName
                    - owningEntity
                    - owningCollection
                    - description
                    - dataflowId
                    - version
              schema:
                type: array
                items: {}
      security:
        - oauth2: []
      tags: []
    post:
      operationId: post-dataflows-dataflow-id-recordsets
      summary: Create a RecordSet
      description: Create a RecordSet.
      parameters:
        - name: dataflowId
          in: path
          description: ID of the Dataflow
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  description: description of the recordSet
                  type: string
                parent_record_set_id:
                  description: parent recordSet that connects to the new recordSet. Set it null or do not include the field if the new recordSet has no parent recordSet
                  type: string
                record_set_name:
                  description: name of the recordSet
                  type: string
              examples:
                - description: sample description
                  parentRecordSetId: null
                  recordSetName: sample_recordSet
              required:
                - recordSetName
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    _id: 574bc94ed96535adaf730a62
                    dataflowId: 574bc854d96535adaf730a60
                    description: description of rs4
                    owningCollection: 574bc854d96535adaf730a60_rs4
                    owningEntity: demo_5000
                    recordSetName: rs4
                    trustedEntities:
                      - entity: demo_5000
                    version: '2.0'
              schema:
                type: object
                properties:
                  id:
                    description: id of the RecordSet
                    type: string
                  dataflow_id:
                    description: Dataflow Id this RecordSet belongs to
                    type: string
                  description:
                    description: Description of this RecordSet
                    type: string
                  owning_collection:
                    description: Collection of this RecordSet
                    type: string
                  owning_entity:
                    description: Entity owning this RecordSet
                    type: string
                  record_set_name:
                    description: RecordSet name
                    type: string
                  trusted_entities:
                    description: Entities that have access to this RecordSet
                    type: array
                    items: {}
                  version:
                    description: RecordSet structure version
                    type: string
      security:
        - oauth2: []
      tags: []
  /dataflows/{dataflowId}/recordsets/{recordSetId}:
    delete:
      operationId: delete-dataflows-dataflow-id-recordsets-record-set-id
      summary: Delete a RecordSet
      description: Delete a RecordSet.  Deleting a RecordSet will also delete its data.
      parameters:
        - name: dataflowId
          in: path
          description: ID of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: ID of the RecordSet
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    _id: 5743cbbccd7b08254a5a6ec0
              schema:
                type: object
                properties:
                  id:
                    description: the deleted RecordSet Id
                    type: string
      security:
        - oauth2: []
      tags: []
    get:
      operationId: get-dataflows-dataflow-id-recordsets-record-set-id
      summary: Get Specific RecordSet
      description: Get specific RecordSet for the given dataflowId and recordSetId
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    _id: 56f22f5651e8009d94e23f86
                    dataflowId: 56f22f5651e8009d94e23f84
                    description: ''
                    owningCollection: 56f22f5651e8009d94e23f84_df10
                    owningEntity: user_5000
                    recordSetName: df10
                    version: '2.0'
              schema:
                type: array
                items: {}
      security:
        - oauth2: []
      tags: []
    put:
      operationId: put-dataflows-dataflow-id-recordsets-record-set-id
      summary: Update a RecordSet
      description: Update a RecordSet.
      parameters:
        - name: dataflowId
          in: path
          description: ID of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: ID of the RecordSet
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  type: string
                record_set_name:
                  type: string
              examples:
                - description: sample description new
                  recordSetName: sample_recordSet_new
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    _id: 574bc854d96535adaf730a60
              schema:
                type: object
                properties:
                  id:
                    description: the updated RecordSet Id
                    type: string
      security:
        - oauth2: []
      tags: []
  /dataflows/{dataflowId}/recordsets/{recordSetId}/datarefinery:
    get:
      operationId: get-dataflows-dataflow-id-recordsets-record-set-id-datarefinery
      summary: Get Data Refinery
      description: Get Data Refinery for the selected RecordSet.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    parameters:
                      filterExpression: ''
                      filterHelperCode: ''
                      previewInputData: ''
                      transformationExpression: record
                      transformationHelperCode: ''
                    _id: 5773f32155a1fddf760479b0
                    entityId: 5684058f159fffbe29ff9912
                    inputRecordSetId: 5773f2a355a1fddf760479ae
                    type: PREPROCESSING
              schema:
                type: object
                properties:
                  parameters:
                    properties:
                      filter_expression:
                        type: string
                      filter_helper_code:
                        type: string
                      preview_input_data:
                        type: string
                      transformation_expression:
                        type: string
                      transformation_helper_code:
                        type: string
                    type: object
                  id:
                    description: id of the Data Refinery
                    type: string
                  entity_id:
                    type: string
                  input_record_set_id:
                    description: RecordSet Id for this Data Refinery
                    type: string
                  type:
                    description: Type of Data Refinery (PREPROCESSING, AGGREGATION)
                    type: string
      security:
        - oauth2: []
      tags: []
    post:
      operationId: post-dataflows-dataflow-id-recordsets-record-set-id-datarefinery
      summary: Create Aggregation Data Refinery
      description: Create Aggregation Data Refinery.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                parameters:
                  required:
                    - previewInputData
                  properties:
                    aggregation_expression:
                      type: string
                    aggregation_helper_code:
                      type: string
                    filter_expression:
                      type: string
                    filter_helper_code:
                      type: string
                    group_by_expression:
                      type: string
                    preview_input_data:
                      description: Preview data
                      type: string
                  type: object
                delete_on_each_run:
                  description: Currently not used
                  type: boolean
                entity_id:
                  description: id of the Entity
                  type: string
                status:
                  description: Currently not used
                  type: number
                type_aggregation:
                  description: Data Refinery type (PREPROCESSING or AGGREGATION)
                  type: string
              examples:
                - parameters:
                    aggregationExpression:
                      Test:
                        fields:
                          - model
                        map: gnosiz.count.map
                        reduce: gnosiz.count.reduce
                    aggregationHelperCode: ''
                    filterExpression: ''
                    filterHelperCode: ''
                    groupByExpression: o.make
                    previewInputData:
                      CREATED_BY: gnosiz
                      CREATED_DATE: 2015-07-01 10:26:47
                      CREATED_DEVICE_ID: Server
                      CREATED_LOCATION: Server
                      ID: '9'
                      MODIFIED_BY: gnosiz
                      MODIFIED_DATE: 2015-07-01 10:26:47
                      MODIFIED_DEVICE_ID: Server
                      MODIFIED_LOCATION: Server
                      PAGE_ID: '290759158'
                      PARENT_ELEMENT_ID: '0'
                      PARENT_PAGE_ID: '0'
                      PARENT_RECORD_ID: '0'
                      PROFILE_ID: '10845'
                      SERVER_MODIFIED_DATE: 2015-07-01 10:26:47
                      color: Soul Red
                      make: Mazda
                      model: Miata
                      year: '2016'
                  deleteOnEachRun: true
                  entityId: 5684058f159fffbe29ff9912
                  status: null
                  type: AGGREGATION
              required:
                - entityId
      responses: {}
      security:
        - oauth2: []
      tags: []
  /dataflows/{dataflowId}/recordsets/{recordSetId}/datarefinery/{refineryId}:
    delete:
      operationId: delete-dataflows-dataflow-id-recordsets-record-set-id-datarefinery-refinery-id
      summary: Delete Data Refinery
      description: Delete Data Refinery.
      parameters:
        - name: dataflowId
          in: path
          description: ID of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: ID of the RecordSet
          required: true
          schema:
            type: string
        - name: refineryId
          in: path
          description: id of the Data Refinery
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    _id: 5743cbbccd7b08254a5a6ec0
              schema:
                type: object
                properties:
                  id:
                    description: the deleted Data Refinery Id
                    type: string
      security:
        - oauth2: []
      tags: []
    put:
      operationId: put-dataflows-dataflow-id-recordsets-record-set-id-datarefinery-refinery-id
      summary: Update Data Refinery
      description: Update Data Refinery.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
        - name: refineryId
          in: path
          description: id of the Data Refinery
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                parameters:
                  required:
                    - previewInputData
                  properties:
                    filter_expression:
                      type: string
                    filter_helper_code:
                      type: string
                    preview_input_data:
                      description: Preview data
                      type: string
                    transformation_expression:
                      type: string
                    transformation_helper_code:
                      type: string
                  type: object
                id:
                  description: id of Data Refinery
                  type: string
                delete_on_each_run:
                  description: Currently not used
                  type: boolean
                entity_id:
                  description: id of the Entity
                  type: string
                status:
                  description: Currently not used
                  type: number
                type_preprocessing:
                  description: Data Refinery type (PREPROCESSING or AGGREGATION)
                  type: string
              required:
                - _id
                - entityId
      responses: {}
      security:
        - oauth2: []
      tags: []
  /dataflows/{dataflowId}/recordsets/{recordSetId}/errors:
    get:
      operationId: get-dataflows-dataflow-id-recordsets-record-set-id-errors
      summary: Get RecordSet Errors
      description: Get errors for the selected RecordSet.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    - _id: '###########'
                      data: {}
                      entityId: '##############'
                      entityName: '########'
                      errorMessage: Cannot read properties of undefined (reading 'user')
                      errorStack: 'TypeError: ######'
                      failedDate: 2022-10-13T11:33:14.228Z
                      postActionId: '###########'
                      retries: 1
              schema:
                type: array
                items: {}
      security:
        - oauth2: []
      tags: []
  /dataflows/{dataflowId}/recordsets/{recordSetId}/postactions:
    get:
      operationId: get-dataflows-dataflow-id-recordsets-record-set-id-postactions
      summary: Get Post Actions
      description: Get Post Actions for the selected RecordSet.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    - _id: 56f2b4a821f04e0ea484dfd4
                      actionName: email_me
                      actionType: email
                      conditions:
                        - action:
                            connectionId: 56f2b34ca70e0243a2d5846e
                            emailBcc: ''
                            emailCc: ''
                            emailFrom: support@gnosiz.com
                            emailSubject: hi
                            emailTemplate: hi
                            emailTo: wl@zerionsoftware.com
                          conditionExpression: ''
                          conditionHelperCode: ''
                      entityId: 5684058f159fffbe29ff9912
                      inputRecordSetId: 56f2b48b21f04e0ea484dfd3
                      status: 1
                      type: POST_ACTION
                      version: '2.1'
              schema:
                type: object
                properties:
                  id:
                    description: id of the Post Action
                    type: string
                  action_name:
                    description: name of the Post Action
                    type: string
                  action_type:
                    description: action type of the Post Action
                    type: string
                  conditions:
                    type: array
                    items: {}
                  entity_id:
                    description: id of the Entity that created this Post Action
                    type: string
                  input_record_set_id:
                    description: Id of the RecordSet for this Post Action
                    type: string
                  status:
                    description: Currently not used
                    type: number
                  type:
                    description: type
                    type: string
                  version:
                    description: version of the Post Action structure
                    type: string
      security:
        - oauth2: []
      tags: []
    post:
      operationId: post-dataflows-dataflow-id-recordsets-record-set-id-postactions
      summary: Create Zoho Post Action
      description: Create Zoho Post Action.  Allows data to be sent to Zoho.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                action_name:
                  description: Name of the Post Action
                  type: string
                actiontype_zoho:
                  description: Post Action Type
                  type: string
                conditions:
                  type: array
                entity_id:
                  description: Entity Id
                  type: string
                input_record_set_id:
                  description: RecordSet Id for this Post Action
                  type: string
                status_1:
                  description: Status
                  type: number
                type_postaction:
                  description: Type
                  type: string
                version_21:
                  description: Version
                  type: string
              required:
                - entityId
                - inputRecordSetId
                - actionType 'zoho'
                - actionName
                - version '2.1'
                - type 'POST_ACTION'
                - status 1
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    _id: 574bcd24d96535adaf730a63
              schema:
                type: object
                properties:
                  id:
                    description: the created Post Action Id
                    type: string
      security:
        - oauth2: []
      tags: []
  /dataflows/{dataflowId}/recordsets/{recordSetId}/postactions/{actionId}:
    delete:
      operationId: delete-dataflows-dataflow-id-recordsets-record-set-id-postactions-action-id
      summary: Delete Post Action
      description: Delete Post Action.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
        - name: actionId
          in: path
          description: id of the Post Action
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    _id: 574bcd24d96535adaf730a63
              schema:
                type: object
                properties:
                  id:
                    description: the delete Post Action Id
                    type: string
      security:
        - oauth2: []
      tags: []
    get:
      operationId: get-dataflows-dataflow-id-recordsets-record-set-id-postactions-action-id
      summary: Get Specific Post Action
      description: Get specific Post Action for the selected RecordSet.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
        - name: actionId
          in: path
          description: id of the Post Action
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    _id: 56f2b4a821f04e0ea484dfd4
                    actionName: email_me
                    actionType: email
                    conditions:
                      - action:
                          connectionId: 56f2b34ca70e0243a2d5846e
                          emailBcc: ''
                          emailCc: ''
                          emailFrom: support@gnosiz.com
                          emailSubject: hi
                          emailTemplate: hi
                          emailTo: wl@zerionsoftware.com
                        conditionExpression: ''
                        conditionHelperCode: ''
                    entityId: 5684058f159fffbe29ff9912
                    inputRecordSetId: 56f2b48b21f04e0ea484dfd3
                    status: 1
                    type: POST_ACTION
                    version: '2.1'
              schema:
                type: object
                properties:
                  id:
                    description: id of the Post Action
                    type: string
                  action_name:
                    description: name of the Post Action
                    type: string
                  action_type:
                    description: action type of the Post Action
                    type: string
                  conditions:
                    type: array
                    items: {}
                  entity_id:
                    description: id of the Entity that created this Post Action
                    type: string
                  input_record_set_id:
                    description: Id of the RecordSet for this Post Action
                    type: string
                  status:
                    description: Currently not used
                    type: number
                  type:
                    description: type
                    type: string
                  version:
                    description: version of the Post Action structure
                    type: string
      security:
        - oauth2: []
      tags: []
    put:
      operationId: put-dataflows-dataflow-id-recordsets-record-set-id-postactions-action-id
      summary: Update Post Action
      description: Update Post Action.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
        - name: actionId
          in: path
          description: id of the Post Action
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    _id: 574bcd24d96535adaf730a63
              schema:
                type: object
                properties:
                  id:
                    description: the updated Post Action Id
                    type: string
      security:
        - oauth2: []
      tags: []
  /dataflows/{dataflowId}/recordsets/{recordSetId}/records:
    delete:
      operationId: delete-dataflows-dataflow-id-recordsets-record-set-id-records
      summary: Delete All Records
      description: Delete Records.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
      responses: {}
      security:
        - oauth2: []
      tags: []
    get:
      operationId: get-dataflows-dataflow-id-recordsets-record-set-id-records
      summary: Get Records
      description: |-
        Get records for the selected RecordSet.

        <p><b>Note</b>: similar to the iForm API, you can use <b>limit</b> and <b>offset</b> to control the data being returned.   If not defined, the default limit is 100 records. </p>
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
        - name: offset
          in: query
          description: 'skip that many records before beginning to return Example: 0'
          required: false
          schema:
            type: number
        - name: limit
          in: query
          description: 'maximum count of the records returned Example: 100.'
          required: false
          schema:
            type: number
      responses:
        '200':
          description: OK
          headers:
            Total-Count:
              schema:
                type: string
          content:
            application/json:
              examples:
                response:
                  value:
                    - CREATED_BY: gnosiz
                      CREATED_DATE: 2015-07-01 10:26:47
                      CREATED_DEVICE_ID: Server
                      CREATED_LOCATION: Server
                      ID: '9'
                      MODIFIED_BY: gnosiz
                      MODIFIED_DATE: 2015-07-01 10:26:47
                      MODIFIED_DEVICE_ID: Server
                      MODIFIED_LOCATION: Server
                      PARENT_ELEMENT_ID: '0'
                      PARENT_PAGE_ID: '0'
                      PARENT_RECORD_ID: '0'
                      SERVER_MODIFIED_DATE: 2015-07-01 10:26:47
                      _id: 570c2d9306d0249655af393c
                      color: Silver
                      make: Ford
                      year: '2017'
              schema:
                type: object
                properties:
                  id:
                    description: id of the Record
                    type: string
      security:
        - oauth2: []
      tags: []
    post:
      operationId: post-dataflows-dataflow-id-recordsets-record-set-id-records
      summary: Create a Record
      description: Create a Record.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
      responses: {}
      security:
        - oauth2: []
      tags: []
  /dataflows/{dataflowId}/recordsets/{recordSetId}/records/count:
    get:
      operationId: get-dataflows-dataflow-id-recordsets-record-set-id-records-count
      summary: Get Record Count
      description: Get a count of records for the selected RecordSet.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    count: 3
              schema:
                type: object
                properties:
                  count:
                    description: record count
                    type: number
      security:
        - oauth2: []
      tags: []
  /dataflows/{dataflowId}/recordsets/{recordSetId}/records/{recordId}:
    delete:
      operationId: delete-dataflows-dataflow-id-recordsets-record-set-id-records-record-id
      summary: Delete a Record
      description: Delete a Record.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
        - name: recordId
          in: path
          description: id of the Record
          required: true
          schema:
            type: string
      responses: {}
      security:
        - oauth2: []
      tags: []
    get:
      operationId: get-dataflows-dataflow-id-recordsets-record-set-id-records-record-id
      summary: Get a Specific Record
      description: Get specific record for the selected RecordSet.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
        - name: recordId
          in: path
          description: id of the Record
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    CREATED_BY: gnosiz
                    CREATED_DATE: 2015-07-01 10:26:47
                    CREATED_DEVICE_ID: Server
                    CREATED_LOCATION: Server
                    ID: '9'
                    MODIFIED_BY: gnosiz
                    MODIFIED_DATE: 2015-07-01 10:26:47
                    MODIFIED_DEVICE_ID: Server
                    MODIFIED_LOCATION: Server
                    PARENT_ELEMENT_ID: '0'
                    PARENT_PAGE_ID: '0'
                    PARENT_RECORD_ID: '0'
                    SERVER_MODIFIED_DATE: 2015-07-01 10:26:47
                    _id: 570c2d9306d0249655af393a
                    color: Ceramic
                    make: Mazda
                    year: '2016'
              schema:
                type: object
                properties:
                  id:
                    description: id of the Record
                    type: string
      security:
        - oauth2: []
      tags: []
    put:
      operationId: put-dataflows-dataflow-id-recordsets-record-set-id-records-record-id
      summary: Update a Record
      description: Update a Record.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
        - name: recordId
          in: path
          description: id of the Record
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    _id: 577c3ae35cbf6e4bc5faa30b
              schema:
                type: object
                properties:
                  id:
                    description: the deleted Webhook Id
                    type: string
      security:
        - oauth2: []
      tags: []
  /dataflows/{dataflowId}/recordsets/{recordSetId}/webhooks:
    get:
      operationId: get-dataflows-dataflow-id-recordsets-record-set-id-webhooks
      summary: Get Webhooks for dataflowId and RecordSetId
      description: Get Webhooks for the selected dataflowId and RecordSetId.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    - _id: 570b394503f0ca524cb7d430
                      entityId: 5684058f159fffbe29ff9912
                      recordSetId: 570b394403f0ca524cb7d42f
                      requestedBy: demo_5000
                      status: 1
                      webhookName: wh_rs2
                      webhookUrl: https://<host url>/domain/development/services/webhooks/200a9acbb5dd025f0d5429bf9b22a8c2fcb0e0d1-d095ef0a802d02c3143dac9f9c17f6675de83d28
              schema:
                type: object
                properties:
                  id:
                    description: id of the Webhook
                    type: string
                  record_set_id:
                    description: RecordSet Id
                    type: string
                  requested_by:
                    description: requestor name
                    type: string
                  status:
                    description: Not used
                    type: number
                  webhook_name:
                    description: Webhook name
                    type: string
                  webhook_url:
                    description: Webhook URL
                    type: string
      security:
        - oauth2: []
      tags: []
    post:
      operationId: post-dataflows-dataflow-id-recordsets-record-set-id-webhooks
      summary: Create a Webhook
      description: Create a Webhook.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                requested_server:
                  description: set "https://dataflownode.zerionsoftware.com" for production Environment and "https://{{serverId}}-dataflownode.zerionsoftware.com" for a specific serverId if they do not share the same domain with production.
                  type: string
                secure_webhook:
                  description: true for secured webhook, and false for insecured webhook
                  type: string
                webhook_name:
                  description: name for the new webhook
                  type: string
              examples:
                - requestedServer: https://dataflownode.zerionsoftware.com
                  secureWebhook: true
                  webhookName: new_webhook_name
              required:
                - webhookName
                - requestedServer
                - secureWebhook
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    _id: 574bcd24d96535adaf730a63
                    recordSetId: 574bc94ed96535adaf730a62
                    requestedDate: 2016-05-30T05:18:28.352Z
                    webhookName: wh_rs4
                    webhookUrl: '{{serverId}}/domain/development/services/webhooks/ab6d48dd056c7f7a705b40d3c3b2b99b43695a1f-99e3d8c3044d3b35f264e5cda0f19eaad6c4e79d'
              schema:
                type: object
                properties:
                  id:
                    description: webhook name
                    type: string
                  key:
                    description: if secureWebhook is included, the returns will contain a public key for the webhook signature
                    type: string
                  record_set_id:
                    description: recordSet that connects to the webhook
                    type: string
                  requested_date:
                    description: created date
                    type: string
                  secure:
                    description: true if secureWebhook is included with true value, false for other cases
                    type: boolean
                  webhook_name:
                    description: webhook name
                    type: string
                  webhook_url:
                    description: webhook URL
                    type: string
      security:
        - oauth2: []
      tags: []
  /dataflows/{dataflowId}/recordsets/{recordSetId}/webhooks/{webhookId}:
    delete:
      operationId: delete-dataflows-dataflow-id-recordsets-record-set-id-webhooks-webhook-id
      summary: Delete a Webhook
      description: Delete a Webhook.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
        - name: webhookId
          in: path
          description: id of the Webhook
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    _id: 574bcd24d96535adaf730a63
              schema:
                type: object
                properties:
                  id:
                    description: the deleted Webhook Id
                    type: string
      security:
        - oauth2: []
      tags: []
    get:
      operationId: get-dataflows-dataflow-id-recordsets-record-set-id-webhooks-webhook-id
      summary: Get a Specific Webhook
      description: Get specific Webhook for the selected RecordSet.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordSetId
          in: path
          description: id of the RecordSet
          required: true
          schema:
            type: string
        - name: webhookId
          in: path
          description: id of the Webhook
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    _id: ''
                    recordSetId: ''
                    requestedBy: ''
                    status: 0
                    webhookName: ''
                    webhookUrl: ''
              schema:
                type: object
                properties:
                  id:
                    description: id of the Webhook
                    type: string
                  record_set_id:
                    description: RecordSet Id
                    type: string
                  requested_by:
                    description: requestor name
                    type: string
                  status:
                    description: |-
                      Not used

                      +Body

                      {
                          "_id": "570b394503f0ca524cb7d430",
                          "requestedBy": "demo_5000",
                          "webhookName": "wh_rs2",
                          "recordSetId": "570b394403f0ca524cb7d42f",
                          "webhookUrl": "https://<host url>/domain/development/services/webhooks/200a9acbb5dd025f0d5429bf9b22a8c2fcb0e0d1-d095ef0a802d02c3143dac9f9c17f6675de83d28",
                          "status": 1
                      }
                    type: number
                  webhook_name:
                    description: Webhook name
                    type: string
                  webhook_url:
                    description: Webhook URL
                    type: string
      security:
        - oauth2: []
      tags: []
  /dataflows/{dataflowId}/recordsets/{recordsetId}/postactions/{actionId}/errors:
    get:
      operationId: get-dataflows-dataflow-id-recordsets-recordset-id-postactions-action-id-errors
      summary: Get Post Action Errors
      description: Get errors for the selected RecordSet.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: recordsetId
          in: path
          description: id of the preceeding Recordset
          required: true
          schema:
            type: string
        - name: actionId
          in: path
          description: id of the Action
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    - _id: '###########'
                      data: {}
                      entityId: '##############'
                      entityName: '########'
                      errorMessage: Cannot read properties of undefined (reading 'user')
                      errorStack: 'TypeError: ######'
                      failedDate: 2022-10-13T11:33:14.228Z
                      postActionId: '###########'
                      retries: 1
              schema:
                type: array
                items: {}
      security:
        - oauth2: []
      tags: []
  /dataflowsByPolicy/page/{itemsPerPage}/{pageNumber}/{matchingText}:
    get:
      operationId: get-dataflows-by-policy-page-items-per-page-page-number-matching-text
      summary: Get Dataflows by ZIM policy
      description: By ZIM permission, a user may also list dataflows that owned by other users in the same company.
      parameters:
        - name: itemsPerPage
          in: path
          description: Number of dataflows per page
          required: true
          schema:
            type: string
        - name: pageNumber
          in: path
          description: Current Page Number
          required: true
          schema:
            type: string
        - name: matchingText
          in: path
          description: String that matches dataflow name, Id, description, or the owner's name. Leave it empty for no matching text.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    - _id: 56ee30b8b251c553547ac88e
                      description: ''
                      maxObjectsPerDataflow: 20
                      name: DF14
                      owningEntity: demo_5000
              schema:
                type: object
                properties:
                  id:
                    description: id of the Dataflow
                    type: string
                  description:
                    description: description of the Dataflow
                    type: string
                  max_objects_per_dataflow:
                    description: Number of objects allowed per Dataflow
                    type: number
                  name:
                    description: name of the Dataflow
                    type: string
                  owning_entity:
                    description: owner of the Dataflow
                    type: string
      security:
        - oauth2: []
      tags: []
  /removeAccessEntity/dataflows/{dataflowId}/entity/{entityId}:
    post:
      operationId: post-remove-access-entity-dataflows-dataflow-id-entity-entity-id
      summary: Remove a Shared User out from a Dataflow
      description: Remove a shared User out from a Dataflow by the owner
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: entityId
          in: path
          description: id of the shared User
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    success: 0
              schema:
                type: object
                properties:
                  success:
                    description: success is 1 when request is completed
                    type: number
      security:
        - oauth2: []
      tags: []
  /responseRequestedDataflow/dataflows/{dataflowId}:
    post:
      operationId: post-response-requested-dataflow-dataflows-dataflow-id
      summary: Response to the Shared Request
      description: Response to the Shared Request by the Owner.
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  description: approve/reject the request (1 is for approve and -1 is for reject)
                  type: number
                entity_id:
                  description: entity Id of the requested user
                  type: string
                expired_time:
                  description: expiration Time for sharing (in hours). Do not include this field for no expiration Time
                  type: number
              examples:
                - action: 1
                  entityId: 5684058f159fffbe29ff9912
                  expiredTime: 24
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    success: 0
              schema:
                type: object
                properties:
                  success:
                    description: success is 1 when request is completed
                    type: number
      security:
        - oauth2: []
      tags: []
  /sharedDataflowToGroup/{dataflowId}:
    post:
      operationId: post-shared-dataflow-to-group-dataflow-id
      summary: Share a Dataflow to multiple Users
      description: Share a Dataflow to multiple Users by the owner
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: array
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    success: 0
              schema:
                type: object
                properties:
                  success:
                    description: success is 1 when request is completed
                    type: number
      security:
        - oauth2: []
      tags: []
  /updateSharedTime/dataflows/{dataflowId}/entity/{entityId}/expiredTime/{expiredTime}:
    put:
      operationId: put-update-shared-time-dataflows-dataflow-id-entity-entity-id-expired-time-expired-time
      summary: Update Expiration Time for a Shared User
      description: Remove a shared User out from a Dataflow by the owner
      parameters:
        - name: dataflowId
          in: path
          description: id of the Dataflow
          required: true
          schema:
            type: string
        - name: entityId
          in: path
          description: id of the shared User
          required: true
          schema:
            type: string
        - name: expiredTime
          in: path
          description: new expiration Time (in hours). Leave it blank for no expiration Time
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              examples:
                response:
                  value:
                    expiredTime: ''
              schema:
                type: object
                properties:
                  expired_time:
                    description: expiration Date
                    type: string
      security:
        - oauth2: []
      tags: []
components:
  schemas:
    Connections_Resource: {}
    Data_Refinery_Resource: {}
    Dataflows_Resource: {}
    Post_Actions_Resource: {}
    RecordSets_Resource: {}
    Records_Resource: {}
    Share_Dataflow_Resource: {}
    Webhooks_Resource: {}
  securitySchemes:
    oauth2:
      flows:
        authorizationCode:
          authorizationUrl: /
          scopes: {}
          tokenUrl: /
      type: oauth2
tags: []
