{
 "openapi": "3.1.0",
 "info": {
  "title": "Data Pipelines (Platform)",
  "version": "20261030b",
  "description": "Outbound: extract from a TRANXACT source, apply the field mapping, stage for a destination. Inbound: read an external API through its source connection, stage what came in, check it, have somebody else approve it, then load it through the target screen itself."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "pipelines": {
    "type": "object",
    "required": [
     "code",
     "name"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "code": {
      "type": "string",
      "description": "Pipeline code"
     },
     "name": {
      "type": "string",
      "description": "Name"
     },
     "source_connection_id": {
      "type": "string",
      "format": "uuid",
      "description": "Source connection"
     },
     "source_resource": {
      "type": "string",
      "description": "Source resource"
     },
     "destination_connection_id": {
      "type": "string",
      "format": "uuid",
      "description": "Destination connection"
     },
     "destination_resource": {
      "type": "string",
      "description": "Destination resource"
     },
     "sync_mode": {
      "type": "string",
      "description": "Sync mode"
     },
     "cursor_field": {
      "type": "string",
      "description": "Cursor field"
     },
     "cursor_value": {
      "type": "string",
      "description": "Cursor value",
      "readOnly": true
     },
     "primary_key": {
      "type": "string",
      "description": "Primary key"
     },
     "schedule_cron": {
      "type": "string",
      "description": "Schedule (cron)"
     },
     "batch_size": {
      "type": "integer",
      "description": "Batch size"
     },
     "status": {
      "type": "string",
      "description": "Status",
      "enum": [
       "draft",
       "active",
       "paused",
       "error",
       "archived",
       "inactive"
      ]
     },
     "last_run_at": {
      "type": "string",
      "format": "date-time",
      "description": "Last run at",
      "readOnly": true
     },
     "last_run_status": {
      "type": "string",
      "description": "Last run status",
      "readOnly": true
     },
     "total_records_synced": {
      "type": "string",
      "format": "decimal",
      "description": "Total records synced",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     },
     "exception_override": {
      "type": "object",
      "description": "Exception override",
      "readOnly": true
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/platform/pipelines": {
   "get": {
    "summary": "list pipelines",
    "operationId": "list_pipelines_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create pipelines",
    "operationId": "create_pipelines_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/pipelines/{id}": {
   "get": {
    "summary": "get pipelines",
    "operationId": "get_pipelines_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change pipelines",
    "operationId": "change_pipelines_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete pipelines",
    "operationId": "delete_pipelines_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/pipelines/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_pipelines_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/pipelines/{parentId}/mappings": {
   "get": {
    "summary": "Mappings",
    "operationId": "action_pipelines_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Mappings",
    "operationId": "action_pipelines_1_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/pipelines/{parentId}/mappings/{lineId}": {
   "put": {
    "summary": "Mappings",
    "operationId": "action_pipelines_0_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Mappings",
    "operationId": "action_pipelines_1_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/pipelines/{id}/run": {
   "post": {
    "summary": "Run",
    "operationId": "action_pipelines_0_6",
    "description": "Body keys: triggeredBy",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}