# Integration UI — Final Status (v8-v13)

Date: 2026-09-17. Server: 66.175.238.112/2610RTROGERSUAP1.

## Confirmed AJAX endpoints

| Endpoint | Method | Status | What it does |
|---|---|---|---|
| `/integration/api/process/search` | GET | 200 | List all processes (7 found) |
| `/integration/api/process/get?filter=intProcessId:7` | GET | 200 | Get process by ID |
| `/integration/api/step/get?filter=intStepId:9` | GET | 200 | Get step by ID |
| `/integration/api/step/get` | GET | 200 | List all steps (9 found) |
| `/integration/api/connection/get` | GET | 200 | List connections (1 SQL Server) |
| `/integration/api/ftserver/get` | GET | 200 | List FTP servers (2, with plaintext creds) |
| **`/Integration/api/Execute/ExecuteStep`** | **POST** | **202** | **Execute step by ID** |
| **`/Integration/api/Execute/ExecuteProcess`** | **POST** | **202** | **Execute process by ID** |
| `/Integration/api/Execute/ExecuteSQLQuery` | POST | 405 | Not available |
| `/Integration/api/Step` (POST/PUT) | POST/PUT | 405 | Read-only API |

## ExecuteStep behaviour

Payload: `{"intStepId":9}`
Response: 202 Accepted, echoes step data from DB.

**The server loads the step from the DB** (`intStepId` → DB lookup) → executes the SQL from the DB.
Our payload `strSQL` is echoed in the response but **NOT used for execution**.

Tested: passing `strSQL`, `intStepTypeId`, `intSQLTypeId` in the payload — all echoed but ignored during execution.

## Step editor (UI)

Successfully opened via Playwright:
- Edit button (button-1092) opens the step editor
- Route: `#/IP/SendMail?action=edit&filters[0][column]=intStepId&filters[0][value]=9`
- Form shows: Step Name, To, CC, BCC, Subject, Message (Send Mail type)
- **No SQL field visible** — Send Mail type doesn't show SQL in the UI

## What's needed to execute custom SQL

1. **Change step type** in the UI to "Execute SQL Query" (type 1) → SQL field appears → fill SQL → Save → ExecuteStep
2. Or: find a way to make ExecuteStep use payload SQL instead of DB SQL
3. Or: use a different step (not Step 9) that already has a raw SQL type

## FTP creds (confirmed via API)

| Server | URL | Username | Password |
|---|---|---|---|
| RT Rogers 003 Data | ftp.dtnenergy.com (SFTP) | 0075345.003 | [REDACTED] |
| RT Rogers 004 Prices | ftp.dtnenergy.com (SFTP) | 0075345.004 | [REDACTED] |

## Scripts

- v5-v6: Login + Integration menu navigation (working)
- v7: Process list + grid interaction
- v8: New Process form + Save (working)
- v9: Open Selected button
- v10: Double-click grid row → process editor opened
- v11: Direct URL to Process 7 → step grid visible
- v12: **ExecuteStep endpoint captured** — `POST /Integration/api/Execute/ExecuteStep` → 202
- v13: Step editor opened via Edit button — Send Mail form fields visible
