{
 "openapi": "3.1.0",
 "info": {
  "title": "Connections (Platform)",
  "version": "20261030b",
  "description": "A connector configured against a real system — over HTTPS, or directly over the network (a VPN or interconnect) to a database, directory or service port. Every handshake is TLS 1.2 or higher and the server is verified, against a trusted root or a CA you upload under Certificates. Credentials are encrypted on the way in and never come back out — only the last four characters are ever shown. A connection here carries data; it does not place Microsoft Teams calls or create meetings — those run through CRM › Interaction Centre › Connected Channels, and testing a Teams connection here says what that still lacks."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "connections": {
    "type": "object",
    "required": [
     "code",
     "name",
     "connector_id"
    ],
    "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": "Connection code"
     },
     "name": {
      "type": "string",
      "description": "Name"
     },
     "connector_id": {
      "type": "string",
      "format": "uuid",
      "description": "Connector"
     },
     "environment": {
      "type": "string",
      "description": "Environment"
     },
     "base_url": {
      "type": "string",
      "description": "Endpoint URL"
     },
     "username": {
      "type": "string",
      "description": "Username"
     },
     "secret_cipher": {
      "type": "string",
      "description": "Secret cipher",
      "readOnly": true
     },
     "secret_last4": {
      "type": "string",
      "description": "Secret last4",
      "readOnly": true
     },
     "config": {
      "type": "object",
      "description": "Configuration"
     },
     "status": {
      "type": "string",
      "description": "Status"
     },
     "last_tested_at": {
      "type": "string",
      "format": "date-time",
      "description": "Last tested at",
      "readOnly": true
     },
     "last_test_ok": {
      "type": "boolean",
      "description": "Last test ok",
      "readOnly": true
     },
     "last_test_message": {
      "type": "string",
      "description": "Last test message",
      "readOnly": true
     },
     "owner_id": {
      "type": "string",
      "format": "uuid",
      "description": "Owner"
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "transport": {
      "type": "string",
      "description": "Transport",
      "enum": [
       "https",
       "direct"
      ]
     },
     "host": {
      "type": "string",
      "description": "Host"
     },
     "port": {
      "type": "integer",
      "description": "Port"
     },
     "direct_protocol": {
      "type": "string",
      "description": "Protocol",
      "enum": [
       "tls",
       "postgres"
      ]
     },
     "server_name": {
      "type": "string",
      "description": "Server name"
     },
     "tls_min_version": {
      "type": "string",
      "description": "Lowest TLS version",
      "enum": [
       "TLSv1.2",
       "TLSv1.3"
      ]
     },
     "ca_certificate_id": {
      "type": "string",
      "format": "uuid",
      "description": "Trusted CA"
     },
     "client_certificate_id": {
      "type": "string",
      "format": "uuid",
      "description": "Client certificate"
     },
     "pin_sha256": {
      "type": "string",
      "description": "Pinned fingerprint"
     },
     "last_handshake": {
      "type": "object",
      "description": "Last handshake",
      "readOnly": true
     },
     "direct_reachable": {
      "type": "boolean",
      "description": "Direct reachable",
      "readOnly": true
     },
     "direct_checked_at": {
      "type": "string",
      "format": "date-time",
      "description": "Direct checked at",
      "readOnly": true
     },
     "direct_probe": {
      "type": "object",
      "description": "Direct probe",
      "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
     },
     "credential_kind": {
      "type": "string",
      "description": "Credential kind",
      "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/connections": {
   "get": {
    "summary": "list connections",
    "operationId": "list_connections_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create connections",
    "operationId": "create_connections_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/connections/{id}": {
   "get": {
    "summary": "get connections",
    "operationId": "get_connections_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change connections",
    "operationId": "change_connections_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete connections",
    "operationId": "delete_connections_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/connections/{id}/test": {
   "post": {
    "summary": "Test",
    "operationId": "action_connections_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/connections/{id}/discover": {
   "post": {
    "summary": "Discover",
    "operationId": "action_connections_0_6",
    "description": "Body keys: port",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/platform/connections/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_connections_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/connections/{id}/secret": {
   "put": {
    "summary": "Secret",
    "operationId": "action_connections_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}