{"openapi":"3.0.3","info":{"title":"SteelFrame REST Admin API","version":"1.0.0","description":"REST admin API for SteelFrame Server (GAPS-ROADMAP 3.1, ESCWA-parity).\n\n## Authentication\nEvery endpoint except the public ones (`POST /api/logon`,\n`GET /api/openapi.json`, `GET /api/health`, `GET /metrics`)\nrequires `Authorization: Bearer <token>`. Two kinds of token exist:\n\n- **Session tokens** — returned by `POST /api/logon` (TSO userid +\n  password). Interactive operator sessions; carry the wildcard scope\n  `*` (every permission).\n- **API tokens** — minted with `POST /api/tokens` (requires the\n  `admin` scope), persisted across restarts, carrying an explicit\n  scope list. The token value is returned once at creation and stored\n  hashed. Intended for CI, the modernization IDE, and automation.\n\n## Scopes\nEach operation declares its required scope in `x-required-scope`.\nA token satisfies a scope if it holds `*`, the exact scope, or — for\n`<area>.read` — the same area's `.write` or `.admin` scope\n(mutation rights imply read rights within an area). A request with a\nvalid token but an insufficient scope gets `403`.\n\n## Conventions\n- Datasets are EBCDIC at rest. The `records` endpoints move raw\n  records as uppercase hex strings (binary-safe: packed decimal, zoned\n  overpunch signs and binary fields round-trip exactly); the `member`\n  endpoints move text lines converted at the API boundary.\n- Job spool, syslog and subsystem logs are returned as text/line arrays\n  exactly as a 3270 user would see them.\n- CICS JSON web services (URIMAP-style paths defined in the CSD via\n  JSONSERVICE definitions) are served OUTSIDE /api/ at their defined\n  URIs; they are application endpoints, not admin surfaces, and are\n  documented by their CSD definitions.\n\n## WebSocket endpoints\n- `/ws/terminal` — the 3270 terminal stream (JSON screen protocol).\n  `?sub=ims` connects to the IMS TM region (MFS) instead of CICS.\n- `/ws/events` — JES2 job lifecycle events (JSON, one object per\n  message)."},"servers":[{"url":"http://{host}:{port}","variables":{"host":{"default":"localhost"},"port":{"default":"3270"}}}],"tags":[{"name":"session"},{"name":"tokens"},{"name":"vault"},{"name":"system"},{"name":"jobs"},{"name":"fileshare"},{"name":"uow"},{"name":"cics"},{"name":"instances"},{"name":"snapshots"},{"name":"apps"},{"name":"onboard"},{"name":"debug"},{"name":"datasets"},{"name":"develop"},{"name":"sql"},{"name":"modernize"},{"name":"verify"},{"name":"tso"},{"name":"db2"},{"name":"ims"},{"name":"mq"},{"name":"ndvr"},{"name":"sched"},{"name":"racf"},{"name":"import"},{"name":"estates"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Session token from POST /api/logon or an API token from POST /api/tokens"}}},"x-scopes":{"admin":"manage API tokens (POST/GET/DELETE /api/tokens)","datasets.read":"read the catalog, dataset contents, members, records, VSAM info","datasets.write":"allocate/delete/rename/copy datasets and members, write records, define/alter VSAM","jobs.read":"list jobs, read job status and spool files, read the syslog via jobs surfaces","jobs.write":"submit JCL, purge jobs","tso.exec":"run TSO/ISPF commands and edit macros","db2.exec":"execute SQL through the SPUFI endpoint","cics.read":"read the CSD and the CICS region log","cics.admin":"CEDA-style resource definition","ims.read":"read the IMS TM region configuration, queues and log","ims.admin":"configure the IMS TM control region","mq.read":"browse the queue manager, queues, messages and processes","ndvr.read":"browse the Endevor-style repository and elements","ndvr.admin":"reset the Endevor-style repository","sched.read":"browse the ZWS scheduler store, jobs and cycles","sched.admin":"order/demand cycles, set symbols/options/conditions, reset the store","racf.read":"browse the RACF store and general-resource classes","racf.admin":"reset the RACF store","system.read":"system information, syslog, logon-user list","accounting.read":"read per-job/per-transaction accounting records (G11 chargeback export)","system.admin":"listener lifecycle verbs (start/stop network listeners)","instances.read":"list/inspect ephemeral child instances","instances.admin":"provision and dispose ephemeral child instances","snapshots.read":"list/inspect/download snapshots","snapshots.admin":"create/delete snapshots, restore a snapshot into a child instance","debug.exec":"arm/control interactive debug sessions (breakpoints, step, variable inspection)","apps.read":"browse the application registry: bundles, versions, manifests, diffs, deployments","apps.write":"package/upload/delete application bundle versions","apps.admin":"deploy, promote and roll back applications on target systems"},"paths":{"/api/logon":{"post":{"operationId":"logon","summary":"Log on with a TSO userid; returns a bearer session token (scope * for a RACF SPECIAL user, a fixed non-admin working set otherwise). With `appl`, the password field may carry a single-use PassTicket for that application (W4.3: evaluated first when a PTKTDATA profile exists, then as a normal password)","tags":["session"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user":{"description":"TSO userid"},"password":{"description":"password (or a PassTicket when appl is given)"},"appl":{"description":"application name for PassTicket evaluation (optional)"}}}}}},"responses":{"200":{"description":"{ token, user, scopes }"},"401":{"description":"Password not authorized or userid revoked (IKJ564xxI message in error)"}},"security":[]}},"/api/me":{"get":{"operationId":"whoami","summary":"The user behind the presented bearer token (authoritative token→user mapping; both web surfaces refresh their cached user from this at boot)","tags":["session"],"responses":{"200":{"description":"{ user, scopes }"},"401":{"description":"Missing or invalid token"}},"security":[]}},"/api/passticket":{"post":{"operationId":"generatePassticket","summary":"Generate a single-use PassTicket (W4.3 analog): requires a PTKTDATA application profile with an SSIGNON key in the vault; under enforcement the caller needs UPDATE on IRRPTAUTH.<appl>.<user>. Valid ≤60s, consumed on first evaluation","tags":["session"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"appl":{"description":"PTKTDATA application name"},"user":{"description":"target userid (default: the caller)"}}}}}},"responses":{"200":{"description":"{ ticket, user, appl, validSeconds, singleUse } — the ticket is shown once and never stored"},"400":{"description":"No PTKTDATA profile / no SSIGNON key / vault unconfigured"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (racf.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"racf.admin"}},"/api/openapi.json":{"get":{"operationId":"openapi","summary":"This document (generated live from the route registry)","tags":["session"],"responses":{"200":{"description":"OpenAPI 3.0 document"}},"security":[]}},"/api/tokens":{"post":{"operationId":"createToken","summary":"Mint a persistent API token with an explicit scope list; admin callers may mint on behalf of a user (plane gateways do — audit then carries the real user)","tags":["tokens"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"token label (e.g. \"ide\", \"ci\")"},"scopes":{"description":"array from the x-scopes list, or [\"*\"]"},"user":{"description":"act-as userid (optional; must exist in the logon map)"}}}}}},"responses":{"200":{"description":"{ id, name, token, scopes, user } — token value is shown only once, stored hashed"},"400":{"description":"Missing name, unknown scope, or unknown act-as user"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"admin"},"get":{"operationId":"listTokens","summary":"List API tokens (metadata only, never the token value)","tags":["tokens"],"responses":{"200":{"description":"[{ id, name, scopes, user, created }]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"admin"}},"/api/tokens/{id}":{"delete":{"operationId":"deleteToken","summary":"Revoke an API token","tags":["tokens"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"token id from creation/list"}],"responses":{"200":{"description":"{ ok }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (admin)"},"404":{"description":"No such token"}},"security":[{"bearerAuth":[]}],"x-required-scope":"admin"}},"/api/vault":{"get":{"operationId":"listVaultSecrets","summary":"Secrets vault posture: provider, key-configured flag, and secret METADATA (name/created/rotated) — never values","tags":["vault"],"responses":{"200":{"description":"{ provider, configured, secrets: [{ name, created, rotated }] }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"admin"}},"/api/vault/secrets/{name}":{"put":{"operationId":"putVaultSecret","summary":"Store (or rotate) a secret in the region vault — encrypted at rest (AES-256-GCM), value never readable back through the API","tags":["vault"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"secret name (letters, digits, . _ -; case-sensitive)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"description":"the secret value (string)"}}}}}},"responses":{"200":{"description":"{ name, rotated } — rotated=true when an existing secret was replaced"},"400":{"description":"Invalid name or empty value"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (admin)"},"503":{"description":"Vault not configured (no key material)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"admin"},"delete":{"operationId":"deleteVaultSecret","summary":"Delete a secret from the region vault","tags":["vault"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"secret name"}],"responses":{"200":{"description":"{ ok }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (admin)"},"404":{"description":"No such secret"}},"security":[{"bearerAuth":[]}],"x-required-scope":"admin"}},"/api/system/info":{"get":{"operationId":"systemInfo","summary":"Instance information: product/release, uptime, data root, subsystem status, engine-wide security posture","tags":["system"],"responses":{"200":{"description":"{ product, release, apiVersion, started, uptimeSeconds, pid, osUser, node, port, dataRoot, catalogDatasets, jes2Jobs, subsystems, security: { enforce, cmdsec, ressec, secprfx } (the ENGINE-WIDE W7 posture — there are no per-region security profiles), debug: { allowDynamic } (the region's dynamic-debug gate), entitlement: { org, plan, seats, cores, maxInstances, expires, verified } | null (engine-local license doc; verified null = no public key to check) }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (system.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"system.read"}},"/api/jes/utilities":{"get":{"operationId":"jesUtilities","summary":"The utility alias table (read-only): every registered built-in program name with its implementing module and alias grouping (names sharing a handler — SORT/ICEMAN/IERRCO00, IEBGENER/ICEGENER, ZWSRACF/SFRACF). This registry IS what EXEC PGM= dispatch consults before the loadlib search","tags":["jobs"],"responses":{"200":{"description":"[{ name, module (file:line of the registering module), aliasOf (primary name when the row is an alias, else null) }]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.read"}},"/api/region/validate":{"post":{"operationId":"regionValidate","summary":"Region-config Validate action (the ESCWA/ESMAC Validate page): lint a region definition and compute auto-fixes. Safe fixes (casing, type coercions, duplicate-listener suffixing) are pre-applied in the returned fixed config; behavior-changing ones are suggested only. No body config = validate THIS engine's region.json; apply:true persists the fixed config back to it","tags":["system"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"description":"a region.json-shaped object to validate (optional — default: this engine's region.json)"},"apply":{"description":"true to write the fixed config back to this engine's region.json (ignored when a body config was supplied; takes effect at next boot)"}}}}}},"responses":{"200":{"description":"{ source, problems: [{ item, problem, fix, applied }], changed, fixed, written }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (system.admin)"},"404":{"description":"No region.json in the data root (and no body config supplied)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"system.admin"}},"/api/fileshare/locks":{"get":{"operationId":"fileshareLocks","summary":"The Fileshare-class lock table (W2.1/A6.3): every record with a live hold or waiter in the region's record-lock broker (SHR/EX mode, holder owners, wait queue with ages), broker counters (grants/waits/timeouts/deadlocks/breaks), plus the file-level SYSDSN/VSAMWR ENQ contention snapshot — the ESCWA \"Locks\" view","tags":["fileshare"],"responses":{"200":{"description":"{ records: [{ res (base cluster dsn), key (hex primary key | R<rrn>), holders: [{ owner, mode: SHR|EX, heldMs }], waiters: [{ owner, mode, waitedMs }] }], stats: { granted, waits, timeouts, deadlocks, breaks }, txTimeoutMs, files: [{ qname, rname, holders, waiters }] }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (system.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"system.read"}},"/api/fileshare/status":{"get":{"operationId":"fileshareStatus","summary":"Fileshare recovery posture (W2.2/A6.3b): the dbase registry (files under journal care with their /o option letters and update sequence numbers), the current recovery log (.Lnn generation, flush cadence, size), backup directory, and the last rollforward report","tags":["fileshare"],"responses":{"200":{"description":"{ configured, log: { name, file (.Lnn), gen, flushEvery, diskPct, sizeBytes, open } | null, backupDir, txTimeoutSec, files: [{ dsn, log, seq, tp, seq }], lastRecovery }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (system.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"system.read"}},"/api/fileshare/config":{"post":{"operationId":"fileshareConfig","summary":"The `fs /d dbase.ref` verb family: addFile (/f dsn [/o l|s|t — each letter DISABLES logging/sequence-numbers/transaction-processing]), eraseFile (/f /e), setLog (/l name [/lc flushEvery] [/p diskPct] — a name with an extension is corrected with FS180-W), eraseLog, setBackup (/backup dir), setTxTimeout (/t seconds, 0 disables the idle-transaction break)","tags":["fileshare"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"description":"'addFile' | 'eraseFile' | 'setLog' | 'eraseLog' | 'setBackup' | 'setTxTimeout'"},"dsn":{"description":"cataloged VSAM cluster (addFile/eraseFile)"},"options":{"description":"MF option letters for addFile, e.g. 'l', 'tl' (each PRESENT letter disables the feature)"},"name":{"description":"recovery log name (setLog)"},"flushEvery":{"description":"log flush cadence in records (setLog, default 100 — the /lc option)"},"diskPct":{"description":"free-disk warning threshold percent (setLog, default 5 — the /p option)"},"dir":{"description":"backup directory (setBackup; null/empty clears it)"},"seconds":{"description":"transaction timeout in seconds (setTxTimeout)"}}}}}},"responses":{"200":{"description":"action-shaped result; setLog may carry warning FS180-W"},"400":{"description":"unknown action / dsn not a cataloged VSAM cluster / SQL-hosted cluster (MFDBFH recovery belongs to the RDBMS)"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (system.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"system.admin"}},"/api/fileshare/backup":{"post":{"operationId":"fileshareBackup","summary":"Hot backup NOW: copy every registered file to the backup directory (each under its EXCLUSIVE writer lease — a consistent committed image), archive the current recovery log as .Bnn and continue on .L(nn+1). The same sequence runs automatically at every startup when a backup directory is configured","tags":["fileshare"],"responses":{"200":{"description":"{ files: [dsn], dir, log (the new .Lnn) }"},"400":{"description":"no recovery log / no backup directory configured"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (system.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"system.admin"}},"/api/fileshare/rollforward":{"post":{"operationId":"fileshareRollforward","summary":"Rollforward recovery (fs /r): restore every registered file from the backup directory, then reapply the COMMITTED journal units logged since that backup in order — sequence continuity verified per file (FS038-S on mismatch), in-flight units at crash time NOT reapplied (FS290-W), optional point-in-time stop (/dt). Runs automatically at boot when the previous session left no terminating record","tags":["fileshare"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dt":{"description":"point-in-time stop, YYMMDDHHMMSS (the /dt option; omit = full replay)"},"verbose":{"description":"true for per-unit detail (/v)"}}}}}},"responses":{"200":{"description":"{ backupTs, log, upTo, files, unitsApplied, opsApplied, warnings (FS290-W...), errors (FS038-S...), detail }"},"400":{"description":"no log/backup configured, no manifest, bad /dt"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (system.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"system.admin"}},"/api/uow":{"get":{"operationId":"uowList","summary":"The 2PC coordinator's unit-of-work monitor (W2.4/A4.14): in-flight UOWs (state active/preparing/prepared/committing with each enlisted resource manager's vote), IN-DOUBT units (a forced commit decision whose phase-2 legs are not all complete — re-drivable), and the coordinator counters. Protocol is presumed abort: only commit decisions are logged; prepared state without a decision backs out at restart","tags":["uow"],"responses":{"200":{"description":"{ live: [{ id, owner, state, started, meta, rms: [{ name, vote, state, error }] }], indoubt: [{ id, verdict, decidedAt, owner, meta, rms: [{ name, done, error }] }], stats: { begun, committed, backedOut, vetoes, onePhase, twoPhase, readOnly, redriven, heuristics } }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (system.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"system.read"}},"/api/uow/resolve":{"post":{"operationId":"uowResolve","summary":"Operator resolution of an IN-DOUBT unit of work (the CEMT SET UOW analog): action 'commit' re-drives the decided outcome's unfinished legs now; action 'backout' is a HEURISTIC abandonment of a decided-commit's unfinished legs (recorded in the in-doubt log — the heuristic-mixed hazard is the operator's, exactly like SET UOW BACKOUT against an in-doubt unit)","tags":["uow"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"the in-doubt UOW id (from GET /api/uow)"},"action":{"description":"'commit' (default — re-drive now) | 'backout' (heuristic)"}}}}}},"responses":{"200":{"description":"{ outcome: 'committed' | 'in-doubt' (some legs still failing, with per-leg errors) | 'heuristic-backout' (with warning) }"},"400":{"description":"unknown UOW id / bad action"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (system.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"system.admin"}},"/api/cics/journals":{"get":{"operationId":"cicsJournals","summary":"User journals (EXEC CICS WRITE JOURNALNAME/JOURNALNUM targets): per-journal record/byte tallies, last write, and the journal-name policy disposition (default mapping vs installed JOURNALMODEL)","tags":["cics"],"responses":{"200":{"description":"[{ name, records, bytes, lastWrite, lastJtypeid, model: 'default' | 'model' | 'none-matched' }]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (cics.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"cics.read"}},"/api/users":{"get":{"operationId":"listUsers","summary":"Logon-capable userids (no passwords; full RACF detail is under /api/racf)","tags":["system"],"responses":{"200":{"description":"[{ user, revoked }]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (system.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"system.read"},"post":{"operationId":"addUser","summary":"Add a logon user (the plane gateway's SSO JIT-provisioning path; RACF ADDUSER via TSO remains the native route)","tags":["system"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user":{"description":"userid (1-8 chars)"},"password":{"description":"initial password"}}}}}},"responses":{"200":{"description":"{ ok, user }"},"400":{"description":"Bad userid or user exists"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"admin"}},"/api/syslog":{"get":{"operationId":"syslog","summary":"Console syslog (last 300 lines)","tags":["system"],"responses":{"200":{"description":"[string]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (system.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"system.read"}},"/api/health":{"get":{"operationId":"health","summary":"Liveness/readiness probe (public)","tags":["system"],"responses":{"200":{"description":"{ status: 'UP', release, version, apiVersion, uptimeSeconds, subsystems }"}},"security":[]}},"/metrics":{"get":{"operationId":"metrics","summary":"Prometheus metrics (text format 0.0.4, public: counts only)","tags":["system"],"responses":{"200":{"description":"each series under BOTH prefixes (rename step 1): {zosweb|steelframe}_info, _uptime_seconds, _sessions_active, _api_tokens, _catalog_datasets, _jes_jobs{status}, _mq_queue_depth{qmgr,queue}, _ims_queue_depth{trancode}, _api_requests_total{op,status}"}},"security":[]}},"/api/listeners":{"get":{"operationId":"listListeners","summary":"Listener registry: name/type/endpoint/status rows for every network endpoint, generated from live config (TLS key material redacted)","tags":["system"],"responses":{"200":{"description":"[{ name, cp, connectorType: web|json-svc|websocket|sfapp-deploy|ftp-jes|pgwire|tn3270e|na, endpoint: { proto, host, port }, actual, status: Started|Stopped|Disabled|Blocked|NotResponding, lastStatusChange (ISO timestamp of the last observed status transition), configBlob, config (imported rows: { sections (verbatim INI), per-type parse — web: paths/allow/security/options, tn3270e: tn3270e/defaultTerminalType/dcas…, json-svc: operation/responseHeaders — plus recognizedUnapplied[] and unknown[] honesty lists), tls, source: builtin|imported, description, lifecycle (boolean: start/stop verbs available) }]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (system.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"system.read"}},"/api/listeners/{name}":{"get":{"operationId":"getListener","summary":"One listener registry row (status evaluated live)","tags":["system"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"listener name from the registry list"}],"responses":{"200":{"description":"listener row"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (system.read)"},"404":{"description":"No such listener"}},"security":[{"bearerAuth":[]}],"x-required-scope":"system.read"}},"/api/listeners/{name}/start":{"post":{"operationId":"startListener","summary":"Start a stopped listener (W8 lifecycle verb — rows whose protocol module registered a start handle, tn3270e first; others answer 409)","tags":["system"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"listener name from the registry list"}],"responses":{"200":{"description":"listener row with status re-evaluated live"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (system.admin)"},"404":{"description":"No such listener"},"409":{"description":"No lifecycle handle / already started / bind failed"}},"security":[{"bearerAuth":[]}],"x-required-scope":"system.admin"}},"/api/listeners/{name}/stop":{"post":{"operationId":"stopListener","summary":"Stop a started listener: close the server and end its live sessions (W8 lifecycle verb)","tags":["system"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"listener name from the registry list"}],"responses":{"200":{"description":"listener row with status re-evaluated live"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (system.admin)"},"404":{"description":"No such listener"},"409":{"description":"No lifecycle handle / not started"}},"security":[{"bearerAuth":[]}],"x-required-scope":"system.admin"}},"/api/instances":{"post":{"operationId":"createInstance","summary":"Provision a scratch child instance and wait until it is healthy","tags":["instances"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"label (default = id)"},"seed":{"description":"'fresh' (seeded new system, default) or 'clone' (copy of this instance's data root)"},"ttlSeconds":{"description":"auto-dispose after N seconds (1..86400, optional)"},"description":{"description":"free-text operator description (the region-grid Description column, max 200 chars, optional)"}}}}}},"responses":{"200":{"description":"{ id, name, seed, description, status: RUNNING|FAILED, url, port, ftpPort, dataDir, created, ttlSeconds }"},"400":{"description":"Bad seed/ttl"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (instances.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"instances.admin"},"get":{"operationId":"listInstances","summary":"List ephemeral child instances (your own; a SPECIAL admin sees all)","tags":["instances"],"responses":{"200":{"description":"[instance]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (instances.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"instances.read"}},"/api/instances/{id}":{"get":{"operationId":"getInstance","summary":"One child instance (FAILED instances include their boot log tail)","tags":["instances"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"instance id"}],"responses":{"200":{"description":"instance"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (instances.read)"},"404":{"description":"No such instance"}},"security":[{"bearerAuth":[]}],"x-required-scope":"instances.read"},"delete":{"operationId":"destroyInstance","summary":"Dispose a child instance: kill the process, delete its data dir","tags":["instances"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"instance id"}],"responses":{"200":{"description":"{ ok, id }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (instances.admin)"},"404":{"description":"No such instance"}},"security":[{"bearerAuth":[]}],"x-required-scope":"instances.admin"}},"/api/instances/{id}/stop":{"post":{"operationId":"stopInstance","summary":"Stop a child instance in place (process killed; data dir and registry entry kept, restartable) — the Operate region-grid inline stop","tags":["instances"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"instance id"}],"responses":{"200":{"description":"instance (status STOPPED)"},"400":{"description":"Instance is not running"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (instances.admin)"},"404":{"description":"No such instance"}},"security":[{"bearerAuth":[]}],"x-required-scope":"instances.admin"}},"/api/instances/{id}/start":{"post":{"operationId":"startInstance","summary":"Start a stopped/down child instance on its original ports and data dir; waits until healthy","tags":["instances"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"instance id"}],"responses":{"200":{"description":"instance (status RUNNING|FAILED)"},"400":{"description":"Instance already running"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (instances.admin)"},"404":{"description":"No such instance"}},"security":[{"bearerAuth":[]}],"x-required-scope":"instances.admin"}},"/api/snapshots":{"post":{"operationId":"createSnapshot","summary":"Take a consistent snapshot: JES2 drains (running job finishes), then the data root is tarred","tags":["snapshots"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"label (default = id)"}}}}}},"responses":{"200":{"description":"{ id, name, created, bytes, sha256, quiesced, jesQueuedAtSnap }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (snapshots.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"snapshots.admin"},"get":{"operationId":"listSnapshots","summary":"List snapshots","tags":["snapshots"],"responses":{"200":{"description":"[snapshot meta]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (snapshots.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"snapshots.read"}},"/api/snapshots/{id}":{"get":{"operationId":"getSnapshot","summary":"One snapshot (metadata incl. sha256)","tags":["snapshots"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"snapshot id"}],"responses":{"200":{"description":"snapshot meta"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (snapshots.read)"},"404":{"description":"No such snapshot"}},"security":[{"bearerAuth":[]}],"x-required-scope":"snapshots.read"},"delete":{"operationId":"deleteSnapshot","summary":"Delete a snapshot archive + metadata","tags":["snapshots"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"snapshot id"}],"responses":{"200":{"description":"{ ok, id }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (snapshots.admin)"},"404":{"description":"No such snapshot"}},"security":[{"bearerAuth":[]}],"x-required-scope":"snapshots.admin"}},"/api/snapshots/{id}/download":{"get":{"operationId":"downloadSnapshot","summary":"Download the snapshot archive (tar.gz; verify against the meta sha256)","tags":["snapshots"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"snapshot id"}],"responses":{"200":{"description":"tar.gz bytes"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (snapshots.read)"},"404":{"description":"No such snapshot"}},"security":[{"bearerAuth":[]}],"x-required-scope":"snapshots.read"}},"/api/snapshots/{id}/restore":{"post":{"operationId":"restoreSnapshot","summary":"Boot the snapshot as an ephemeral child instance (in-place restore: tools/restore.mjs offline)","tags":["snapshots"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"snapshot id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"instance label (optional)"},"ttlSeconds":{"description":"auto-dispose (optional)"}}}}}},"responses":{"200":{"description":"instance (see createInstance)"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (snapshots.admin)"},"404":{"description":"No such snapshot"}},"security":[{"bearerAuth":[]}],"x-required-scope":"snapshots.admin"}},"/api/apps":{"post":{"operationId":"appPackage","summary":"Package an application version from the live estate (datasets under the given HLQ prefixes)","tags":["apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"application name"},"version":{"description":"version label (immutable once created)"},"description":{"description":"free text (optional)"},"hlqs":{"description":"dataset name prefixes to package, e.g. ['CARDDEMO', 'AWS.M2.CARDDEMO']"}}}}}},"responses":{"200":{"description":"{ name, version, created, bytes, sha256, summary }"},"400":{"description":"Bad name/version, version exists, or no datasets under the prefixes"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.write)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.write"},"get":{"operationId":"appList","summary":"List applications in the registry","tags":["apps"],"responses":{"200":{"description":"[{ name, versions, latest, updated }]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.read"}},"/api/apps/upload":{"post":{"operationId":"appUpload","summary":"Import a .sfapp bundle (raw tar.gz body); content sha256s are verified before it enters the registry","tags":["apps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"(raw)":{"description":"the .sfapp bytes as the request body"}}}}}},"responses":{"200":{"description":"bundle meta"},"400":{"description":"Not an sfapp, integrity failure, or version exists"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.write)"},"413":{"description":"Body over the upload cap"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.write"}},"/api/apps/{name}":{"get":{"operationId":"appVersions","summary":"Version history of one application","tags":["apps"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"application name"}],"responses":{"200":{"description":"[bundle meta]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.read)"},"404":{"description":"No such application"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.read"}},"/api/apps/{name}/deployments":{"get":{"operationId":"appDeployments","summary":"Deployment history of an application (deploys and rollbacks, newest first)","tags":["apps"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"application name"}],"responses":{"200":{"description":"[deployment record]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.read"}},"/api/apps/{name}/deployments/{id}":{"get":{"operationId":"appDeployment","summary":"One deployment record: per-step status with the target jobids (poll while state=RUNNING)","tags":["apps"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"application name"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"deployment id"}],"responses":{"200":{"description":"deployment record"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.read)"},"404":{"description":"No such deployment"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.read"}},"/api/apps/{name}/{version}/deploy":{"post":{"operationId":"appDeploy","summary":"Deploy a bundle version to a target system: allocate + load source + seed data + assemble BMS + compile-link every COBOL program (real JCL jobs on the target) + install CSD. Returns immediately; poll the deployment record","tags":["apps"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"application name"},{"name":"version","in":"path","required":true,"schema":{"type":"string"},"description":"version label"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"description":"{ url?, instanceId?, token?, user?, password? } — default: this system with the caller’s own token"},"options":{"description":"{ loadlib (default IBMUSER.LOADLIB), replaceData (default false: live data kept on redeploy), excludePrograms: [names] (skip programs that intentionally do not compile) }"}}}}}},"responses":{"200":{"description":"deployment record (state RUNNING)"},"400":{"description":"No such version, target unreachable, or deploy already in progress for this app+target"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.admin"}},"/api/apps/{name}/rollback":{"post":{"operationId":"appRollback","summary":"Roll back the last successful deploy on a target: restore the pre-deploy load library and replaced CSD entries (source members and seeded data stay — load-library-level rollback)","tags":["apps"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"application name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target":{"description":"same shape as appDeploy"}}}}}},"responses":{"200":{"description":"rollback deployment record"},"400":{"description":"No successful deployment on that target"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.admin"}},"/api/apps/{name}/diff":{"get":{"operationId":"appDiff","summary":"Source-level diff between two versions (members added/removed/changed with line diffs, dataset and CSD deltas)","tags":["apps"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"application name"},{"name":"from","in":"query","required":false,"schema":{"type":"string"},"description":"base version"},{"name":"to","in":"query","required":false,"schema":{"type":"string"},"description":"other version"}],"responses":{"200":{"description":"{ members, datasets, csd }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.read)"},"404":{"description":"No such version"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.read"}},"/api/apps/{name}/{version}":{"get":{"operationId":"appManifest","summary":"Bundle meta + full manifest of one version","tags":["apps"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"application name"},{"name":"version","in":"path","required":true,"schema":{"type":"string"},"description":"version label"}],"responses":{"200":{"description":"{ meta, manifest }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.read)"},"404":{"description":"No such version"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.read"},"delete":{"operationId":"appDelete","summary":"Delete one bundle version from the registry","tags":["apps"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"application name"},{"name":"version","in":"path","required":true,"schema":{"type":"string"},"description":"version label"}],"responses":{"200":{"description":"{ ok, name, version }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.admin)"},"404":{"description":"No such version"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.admin"}},"/api/apps/{name}/{version}/download":{"get":{"operationId":"appDownload","summary":"Download the .sfapp bundle (verify against the meta sha256)","tags":["apps"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"application name"},{"name":"version","in":"path","required":true,"schema":{"type":"string"},"description":"version label"}],"responses":{"200":{"description":"tar.gz bytes"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.read)"},"404":{"description":"No such version"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.read"}},"/api/onboard":{"post":{"operationId":"onboardCreate","summary":"Start an estate onboarding (the rehost funnel)","tags":["onboard"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"onboarding/application name"},"hlq":{"description":"target HLQ for loaded libraries (default: name)"}}}}}},"responses":{"200":{"description":"onboarding state"},"400":{"description":"Bad name"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.write)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.write"},"get":{"operationId":"onboardList","summary":"List onboardings (state + compile tallies)","tags":["onboard"],"responses":{"200":{"description":"[onboarding head]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.read"}},"/api/onboard/{id}":{"get":{"operationId":"onboardGet","summary":"Full onboarding state (plan, load, compile results)","tags":["onboard"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"onboarding id"}],"responses":{"200":{"description":"onboarding state"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.read)"},"404":{"description":"No such onboarding"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.read"},"delete":{"operationId":"onboardDelete","summary":"Delete an onboarding (staged files included; loaded datasets stay)","tags":["onboard"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"onboarding id"}],"responses":{"200":{"description":"{ ok, id }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.write)"},"404":{"description":"No such onboarding"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.write"}},"/api/onboard/{id}/upload":{"post":{"operationId":"onboardUpload","summary":"Upload an estate archive (zip / tar.gz / single file as raw body; ?filename= names it). Big estates: use FTP (TYPE I + SITE RECFM/LRECL) instead","tags":["onboard"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"onboarding id"}],"responses":{"200":{"description":"{ ok, stagedFiles }"},"400":{"description":"Bad archive (zip64 unsupported — use FTP)"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.write)"},"404":{"description":"No such onboarding"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.write"}},"/api/onboard/{id}/plan":{"post":{"operationId":"onboardPlan","summary":"Classify the staged estate and build the readiness plan: members by language, program facts, missing copybooks, blocked jobs, VSAM geometry harvested from the estate's own IDCAMS statements, detected RACF/scheduler importables","tags":["onboard"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"onboarding id"}],"responses":{"200":{"description":"plan"},"400":{"description":"Nothing staged"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.write)"},"404":{"description":"No such onboarding"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.write"},"put":{"operationId":"onboardOverride","summary":"Override proposed data-file DSN/LRECL/RECFM (the wizard grid edits)","tags":["onboard"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"onboarding id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dataFiles":{"description":"[{ path, dsn?, lrecl?, recfm? }]"}}}}}},"responses":{"200":{"description":"plan"},"400":{"description":"No plan yet"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.write)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.write"}},"/api/onboard/{id}/load":{"post":{"operationId":"onboardLoad","summary":"Load the planned estate into this system: allocate libraries, write members, write PS data records (VSAM clusters stay with the estate's own DEFINE/REPRO JCL — the authentic path)","tags":["onboard"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"onboarding id"}],"responses":{"200":{"description":"{ libraries, members, datasets, skipped }"},"400":{"description":"Not planned yet"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.write)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.write"}},"/api/onboard/{id}/compile":{"post":{"operationId":"onboardCompile","summary":"Compile every COBOL program through the real IGYWCL pipeline; per-program RC + first diagnostics harvested from SYSPRINT","tags":["onboard"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"onboarding id"}],"responses":{"200":{"description":"{ clean, failed, results }"},"400":{"description":"Not loaded yet"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.write)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.write"}},"/api/onboard/{id}/import":{"post":{"operationId":"onboardImport","summary":"Run a detected import through its native path: racf (ZWSRACF unload→deck→IKJEFT01), esf (SFESF ESF-rules→deck→IKJEFT01), or ca7/ctm (ZWSCHED)","tags":["onboard"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"onboarding id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"description":"'racf' | 'esf' | 'ca7' | 'ctm'"}}}}}},"responses":{"200":{"description":"{ kind, jobid, maxcc }"},"400":{"description":"Nothing detected for that kind"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.write)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.write"}},"/api/onboard/{id}/report":{"get":{"operationId":"onboardReport","summary":"The exportable readiness/conformance report","tags":["onboard"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"onboarding id"}],"responses":{"200":{"description":"report"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.read)"},"404":{"description":"No such onboarding"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.read"}},"/api/onboard/{id}/finish":{"post":{"operationId":"onboardFinish","summary":"Package the loaded estate as a draft .sfapp and optionally provision a fresh instance and deploy it there","tags":["onboard"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"onboarding id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"app":{"description":"{ name?, version? } (defaults: onboarding name, 0.1)"},"provision":{"description":"{ name?, ttlSeconds? } — omit to only package"},"deployOptions":{"description":"appDeploy options (loadlib, excludePrograms, …)"}}}}}},"responses":{"200":{"description":"{ bundle, instance, deployment }"},"400":{"description":"Not loaded yet"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.admin"}},"/api/debug/sessions":{"post":{"operationId":"debugArm","summary":"Arm a debug session for a PARM=TEST-compiled program; the next matching run stops under the debugger","tags":["debug"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"program":{"description":"program id (compiled with PARM=TEST); shorthand for criteria { type:JCL, program }"},"breakpoints":{"description":"[{line} | {paragraph}, + optional condition/hitCondition per line — see debugBp] — empty = stop at the first statement"},"criteria":{"description":"{ type: JCL|CICS|WS, program?, jobname?, stepname?, user?, transaction?, termid?, servicename? } — absent field = wildcard; most-specific match wins; WS selects JSON web-service tasks by their JSONSERVICE name (SPEC-W6 §2.1-2.2)"}}}}}},"responses":{"200":{"description":"{ id, program, kind, criteria, state: ARMED, breakpoints }"},"400":{"description":"No debug artifacts (compile with PARM=TEST), invalid criteria, or identical criteria already registered"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (debug.exec)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"debug.exec"},"get":{"operationId":"debugSessions","summary":"List debug sessions (your own; a SPECIAL admin sees all)","tags":["debug"],"responses":{"200":{"description":"[session]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (debug.exec)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"debug.exec"}},"/api/debug/sessions/{id}":{"get":{"operationId":"debugSession","summary":"One session: state (ARMED/WAITING/RUNNING/STOPPED/ENDED), position, breakpoints, event log","tags":["debug"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"session id"}],"responses":{"200":{"description":"session"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (debug.exec)"},"404":{"description":"No such session"}},"security":[{"bearerAuth":[]}],"x-required-scope":"debug.exec"},"delete":{"operationId":"debugKill","summary":"Disarm (if not yet running) or terminate the debugged program","tags":["debug"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"session id"}],"responses":{"200":{"description":"{ ok, id, state }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (debug.exec)"},"404":{"description":"No such session"}},"security":[{"bearerAuth":[]}],"x-required-scope":"debug.exec"}},"/api/debug/sessions/{id}/fields":{"get":{"operationId":"debugFields","summary":"Inspectable fields (name, PIC, usage, offset within its 01 group)","tags":["debug"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"session id"}],"responses":{"200":{"description":"[{ name, base01, offset, size, pic, usage }]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (debug.exec)"},"404":{"description":"No such session"}},"security":[{"bearerAuth":[]}],"x-required-scope":"debug.exec"}},"/api/debug/sessions/{id}/var":{"get":{"operationId":"debugVar","summary":"Read one variable from the stopped program (live memory, decoded by PIC/USAGE + hex)","tags":["debug"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"session id"},{"name":"name","in":"query","required":false,"schema":{"type":"string"},"description":"COBOL data name"}],"responses":{"200":{"description":"{ name, pic, usage, size, hex, value }"},"400":{"description":"Session not stopped / unknown field"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (debug.exec)"},"404":{"description":"No such session"}},"security":[{"bearerAuth":[]}],"x-required-scope":"debug.exec"},"post":{"operationId":"debugSetVar","summary":"Modify one variable in the stopped program (watch/modify — value encoded per PIC/USAGE, written to live memory, re-read back)","tags":["debug"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"session id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"COBOL data name"},"value":{"description":"new value (text, or numeric for COMP-3/BINARY/numeric DISPLAY)"}}}}}},"responses":{"200":{"description":"{ name, pic, usage, size, hex, value }"},"400":{"description":"Session not stopped / unknown field / value does not fit the PIC"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (debug.exec)"},"404":{"description":"No such session"}},"security":[{"bearerAuth":[]}],"x-required-scope":"debug.exec"}},"/api/debug/sessions/{id}/bp":{"post":{"operationId":"debugBp","summary":"Set or clear a breakpoint (by line or paragraph) on a session; optional condition/hit count (C1/C2)","tags":["debug"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"session id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"line":{"description":"source line"},"paragraph":{"description":"paragraph name (alternative)"},"clear":{"description":"true to remove"},"condition":{"description":"optional COBOL comparison '<data-name> <op> <literal>' (ops = <> > < >= <=) — the stop only surfaces when TRUE; false auto-continues"},"hitCondition":{"description":"optional positive integer N — the stop surfaces from the Nth condition-passing hit on"}}}}}},"responses":{"200":{"description":"session"},"400":{"description":"Malformed condition or hit condition"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (debug.exec)"},"404":{"description":"No such session (or NO SUCH FIELD in a condition — the NO-SUCH family maps to 404, the debugVar precedent)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"debug.exec"}},"/api/debug/sessions/{id}/continue":{"post":{"operationId":"debugContinue","summary":"Resume until the next breakpoint (returns when stopped again or ended)","tags":["debug"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"session id"}],"responses":{"200":{"description":"session"},"400":{"description":"Not stopped"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (debug.exec)"},"404":{"description":"No such session"}},"security":[{"bearerAuth":[]}],"x-required-scope":"debug.exec"}},"/api/debug/sessions/{id}/step":{"post":{"operationId":"debugStep","summary":"Execute one statement and stop again","tags":["debug"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"session id"}],"responses":{"200":{"description":"session"},"400":{"description":"Not stopped"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (debug.exec)"},"404":{"description":"No such session"}},"security":[{"bearerAuth":[]}],"x-required-scope":"debug.exec"}},"/api/audit":{"get":{"operationId":"auditRead","summary":"Structured audit trail of mutating API calls (in-process tail of ROOT/audit.jsonl)","tags":["system"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"string"},"description":"max entries, newest last (default 200)"},{"name":"user","in":"query","required":false,"schema":{"type":"string"},"description":"filter by userid"},{"name":"op","in":"query","required":false,"schema":{"type":"string"},"description":"filter by operationId"}],"responses":{"200":{"description":"[{ t, user, tokenKind, op, method, path, status, ...detail }]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"admin"}},"/api/accounting":{"get":{"operationId":"accountingRead","summary":"G11 accounting records for chargeback: one JOB record per finished job (per-step CCs, elapsed, abends) and one TRAN record per CICS transaction, from ROOT/accounting JSONL (the same records tools/acctexport.mjs exports). ?format=csv serves the same CSV acctexport renders (accounting.js renderCsv is the single implementation)","tags":["system"],"parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string"},"description":"inclusive start date on the record end timestamp (YYYY-MM-DD)"},{"name":"to","in":"query","required":false,"schema":{"type":"string"},"description":"inclusive end date on the record end timestamp (YYYY-MM-DD)"},{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"record type: 'JOB' or 'TRAN' (case-insensitive; default both — but csv REQUIRES one type, the two record shapes have different columns)"},{"name":"format","in":"query","required":false,"schema":{"type":"string"},"description":"'json' (default) or 'csv' (text/csv; identical bytes to tools/acctexport.mjs --format csv)"}],"responses":{"200":{"description":"{ enabled, count, records } (json) or the CSV text (csv) — enabled is the live ZWS_ACCOUNTING flag; the flag gates WRITING only, so records from when it was on are still served, and an engine that never wrote any answers { enabled: false, count: 0, records: [] } / a header-only CSV rather than an error"},"400":{"description":"Bad from/to date (want YYYY-MM-DD), bad type (want JOB or TRAN), bad format (want json or csv), or format=csv without a type"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (accounting.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"accounting.read"}},"/api/datasets":{"get":{"operationId":"listDatasets","summary":"List catalog entries matching an MVS pattern","tags":["datasets"],"parameters":[{"name":"pattern","in":"query","required":false,"schema":{"type":"string"},"description":"MVS pattern (* = one qualifier chunk, ** = any, % = one char); default <user>.**"}],"responses":{"200":{"description":"[dataset info]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"}},"/api/search":{"get":{"operationId":"searchCatalog","summary":"Search the catalog: dataset names, member names, and optionally member text content","tags":["datasets"],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"MVS dataset pattern (default **) or bare string matched as **string**"},{"name":"member","in":"query","required":false,"schema":{"type":"string"},"description":"member-name pattern (* wildcard) — lists matching members of matching PO datasets"},{"name":"content","in":"query","required":false,"schema":{"type":"string"},"description":"substring grep (case-insensitive) over member text of matching PO datasets"},{"name":"max","in":"query","required":false,"schema":{"type":"string"},"description":"result cap per section (default 200)"}],"responses":{"200":{"description":"{ datasets: [info], members: [{dsn, member}], hits: [{dsn, member, line, text}], truncated }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"}},"/api/check":{"post":{"operationId":"checkSource","summary":"Compile-check source through the engine compiler pipeline (no artifacts); diagnostics cannot drift from a real compile step","tags":["develop"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"language":{"description":"'COBOL' (default) or 'JCL'"},"lines":{"description":"source card images"},"syslib":{"description":"array of PO dataset names for COPY resolution (optional)"},"parm":{"description":"compile PARM string, e.g. 'CICS' to force the translator (optional)"}}}}}},"responses":{"200":{"description":"{ rc, program?, diagnostics: [{ line, severity: E|W|I, message, copybook? }] }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"}},"/api/dataset":{"post":{"operationId":"allocateDataset","summary":"Allocate (catalog) a new dataset; omitted BLKSIZE is system-determined","tags":["datasets"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dsn":{"description":"dataset name"},"attrs":{"description":"{ dsorg, recfm, lrecl, ... }"}}}}}},"responses":{"200":{"description":"catalog entry"},"400":{"description":"Invalid DCB attributes (LRECL range, FB blocking, V* minimum)"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.write)"},"409":{"description":"DUPLICATE DATASET NAME ON CATALOG (Lane-9 F9.4: a conflict, not a server fault)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.write"}},"/api/dataset/{dsn}":{"get":{"operationId":"getDataset","summary":"Dataset info (PO datasets include memberList)","tags":["datasets"],"parameters":[{"name":"dsn","in":"path","required":true,"schema":{"type":"string"},"description":"dataset name"}],"responses":{"200":{"description":"dataset info"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"},"404":{"description":"Not cataloged"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"},"delete":{"operationId":"deleteDataset","summary":"Delete/uncatalog a dataset (VSAM clusters included)","tags":["datasets"],"parameters":[{"name":"dsn","in":"path","required":true,"schema":{"type":"string"},"description":"dataset name"}],"responses":{"200":{"description":"{ ok }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.write)"},"404":{"description":"Not cataloged"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.write"}},"/api/dataset/{dsn}/rename":{"post":{"operationId":"renameDataset","summary":"Rename a dataset","tags":["datasets"],"parameters":[{"name":"dsn","in":"path","required":true,"schema":{"type":"string"},"description":"dataset name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newName":{"description":"new dataset name"}}}}}},"responses":{"200":{"description":"{ ok }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.write)"},"404":{"description":"Not cataloged"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.write"}},"/api/dataset/{dsn}/copy":{"post":{"operationId":"copyDataset","summary":"Copy a dataset","tags":["datasets"],"parameters":[{"name":"dsn","in":"path","required":true,"schema":{"type":"string"},"description":"dataset name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newName":{"description":"target dataset name"}}}}}},"responses":{"200":{"description":"{ ok }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.write)"},"404":{"description":"Not cataloged"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.write"}},"/api/dataset/{dsn}/records":{"get":{"operationId":"readRecords","summary":"Read raw records as hex (PS + VSAM; binary-safe for packed/zoned/binary fields). GDG relative names BASE(0)/BASE(-n) resolve to the current/older generation","tags":["datasets"],"parameters":[{"name":"dsn","in":"path","required":true,"schema":{"type":"string"},"description":"dataset name (GDG relative form BASE(0) / BASE(-n) accepted)"},{"name":"from","in":"query","required":false,"schema":{"type":"string"},"description":"first record index (default 0)"},{"name":"count","in":"query","required":false,"schema":{"type":"string"},"description":"record count (default 1000, max 10000)"}],"responses":{"200":{"description":"{ recfm, lrecl, dsorg, total, from, records: [hex] }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"},"404":{"description":"Not cataloged"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"},"put":{"operationId":"writeRecords","summary":"Write raw records from hex (VSAM: keyed writes into the cluster)","tags":["datasets"],"parameters":[{"name":"dsn","in":"path","required":true,"schema":{"type":"string"},"description":"dataset name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"records":{"description":"array of hex-encoded records"}}}}}},"responses":{"200":{"description":"{ ok, written }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.write)"},"404":{"description":"Not cataloged"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.write"}},"/api/dataset/{dsn}/records/{member}":{"get":{"operationId":"readMemberRecords","summary":"Read raw records of a PDS member as hex","tags":["datasets"],"parameters":[{"name":"dsn","in":"path","required":true,"schema":{"type":"string"},"description":"dataset name"},{"name":"member","in":"path","required":true,"schema":{"type":"string"},"description":"member name"},{"name":"from","in":"query","required":false,"schema":{"type":"string"},"description":"first record index (default 0)"},{"name":"count","in":"query","required":false,"schema":{"type":"string"},"description":"record count (default 1000, max 10000)"}],"responses":{"200":{"description":"{ recfm, lrecl, dsorg, total, from, records: [hex] }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"},"404":{"description":"Not cataloged"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"},"put":{"operationId":"writeMemberRecords","summary":"Write raw records of a PDS member from hex","tags":["datasets"],"parameters":[{"name":"dsn","in":"path","required":true,"schema":{"type":"string"},"description":"dataset name"},{"name":"member","in":"path","required":true,"schema":{"type":"string"},"description":"member name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"records":{"description":"array of hex-encoded records"}}}}}},"responses":{"200":{"description":"{ ok, written }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.write)"},"404":{"description":"Not cataloged"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.write"}},"/api/sql/views":{"get":{"operationId":"sqlListViews","summary":"List the registered SQL views (dataset + copybook bindings)","tags":["sql"],"responses":{"200":{"description":"[{ name, dsn, copybook }]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"},"post":{"operationId":"sqlDefineView","summary":"Register a SQL view: a dataset (PS or VSAM) + a copybook become live typed columns","tags":["sql"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"view name (SQL identifier)"},"dsn":{"description":"dataset name"},"copybook":{"description":"layout copybook as 'LIB(MEMBER)'"}}}}}},"responses":{"200":{"description":"{ name, dsn, copybook, columns: [{name, type}] }"},"400":{"description":"Bad name / dsn / unparsable copybook"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.write)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.write"}},"/api/sql/views/{name}":{"delete":{"operationId":"sqlDeleteView","summary":"Drop a registered SQL view (the dataset is untouched)","tags":["sql"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"view name"}],"responses":{"200":{"description":"{ deleted }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.write)"},"404":{"description":"No such view"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.write"}},"/api/sql":{"post":{"operationId":"sqlQuery","summary":"Run a read-only SELECT over the registered views — LIVE dataset bytes, re-materialized per query (also served on the PG wire port, ZOSWEB_SQL_PORT)","tags":["sql"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sql":{"description":"SELECT/WITH/EXPLAIN statement"}}}}}},"responses":{"200":{"description":"{ columns: [name], rows: [[value]] }"},"400":{"description":"Not a SELECT, unknown view, or SQL error"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"}},"/api/sql/views/{name}/rows":{"get":{"operationId":"viewRows","summary":"Decoded records of a view with layout metadata (the Studio data grid): live bytes, copybook offsets, per-record hex","tags":["sql"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"view name"},{"name":"from","in":"query","required":false,"schema":{"type":"string"},"description":"first record (0)"},{"name":"count","in":"query","required":false,"schema":{"type":"string"},"description":"records (default 100, max 1000)"}],"responses":{"200":{"description":"{ dsn, charset, total, columns: [{name, off, len, usage, numeric, signed, scale}], rows: [{i, hex, values}] }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"},"404":{"description":"No such view"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"}},"/api/sql/views/{name}/rows/{n}":{"put":{"operationId":"writeViewField","summary":"Typed single-field write-back through the view layout (encodes zoned/packed/binary/char with the at-rest charset rules)","tags":["sql"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"view name"},{"name":"n","in":"path","required":true,"schema":{"type":"string"},"description":"record index"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"column":{"description":"column name from the view layout"},"value":{"description":"new value"}}}}}},"responses":{"200":{"description":"{ i, column, value (re-decoded), hex }"},"400":{"description":"Bad column or value"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.write)"},"404":{"description":"No such view/record"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.write"}},"/api/dataset/{dsn}/member":{"get":{"operationId":"readDatasetContent","summary":"Read a PS dataset (or browse a VSAM cluster) as text lines; ?view=hex for a hex dump","tags":["datasets"],"parameters":[{"name":"dsn","in":"path","required":true,"schema":{"type":"string"},"description":"dataset name"},{"name":"view","in":"query","required":false,"schema":{"type":"string"},"description":"'hex' for a hex/EBCDIC dump"},{"name":"start","in":"query","required":false,"schema":{"type":"string"},"description":"first record number for a paged read (0-based; with count, returns { lines, paged, start, total })"},{"name":"count","in":"query","required":false,"schema":{"type":"string"},"description":"record count for a paged read (default 1000, max 100000)"}],"responses":{"200":{"description":"{ lines, recfm, lrecl } | { lines, paged, start, total } | { lines, truncated, total, bytes } (dataset over ZWS_DS_JSON_MAX_MB — browse-only first page, never save it back) | { vsam, records } | { hex, rows } | { binary, size }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"},"404":{"description":"Not cataloged"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"},"put":{"operationId":"writeDatasetContent","summary":"Write a PS dataset as text lines (converted to EBCDIC at rest). Honours If-Match/ifMatch against the dataset's version tag (412 on stale copy); refused 409 while a job or another edit session holds the dataset (Lane-9 F9.1/F9.2/F9.3)","tags":["datasets"],"parameters":[{"name":"dsn","in":"path","required":true,"schema":{"type":"string"},"description":"dataset name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"description":"array of text lines"},"ifMatch":{"description":"version tag from GET (optional; stale copy -> 412)"}}}}}},"responses":{"200":{"description":"{ ok, etag }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.write)"},"404":{"description":"Not cataloged"},"409":{"description":"Dataset in use (batch SYSDSN ENQ or another edit session)"},"412":{"description":"ifMatch/If-Match does not match the current version"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.write"}},"/api/dataset/{dsn}/member/{member}":{"get":{"operationId":"readMember","summary":"Read a PDS member as text lines; ?view=hex for a hex dump","tags":["datasets"],"parameters":[{"name":"dsn","in":"path","required":true,"schema":{"type":"string"},"description":"dataset name"},{"name":"member","in":"path","required":true,"schema":{"type":"string"},"description":"member name"},{"name":"view","in":"query","required":false,"schema":{"type":"string"},"description":"'hex' for a hex/EBCDIC dump"},{"name":"start","in":"query","required":false,"schema":{"type":"string"},"description":"first record number for a paged read (0-based)"},{"name":"count","in":"query","required":false,"schema":{"type":"string"},"description":"record count for a paged read (default 1000, max 100000)"}],"responses":{"200":{"description":"{ lines, recfm, lrecl } | { lines, paged, start, total } | { lines, truncated, total, bytes } | { hex, rows } | { binary, size }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"},"404":{"description":"Not cataloged / member not found"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"},"put":{"operationId":"writeMember","summary":"Write a PDS member as text lines. Honours If-Match/ifMatch against the member's version tag (412 on stale copy); refused 409 while a job or another edit session holds it (Lane-9 F9.1/F9.2/F9.3)","tags":["datasets"],"parameters":[{"name":"dsn","in":"path","required":true,"schema":{"type":"string"},"description":"dataset name"},{"name":"member","in":"path","required":true,"schema":{"type":"string"},"description":"member name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"description":"array of text lines"},"ifMatch":{"description":"version tag from GET (optional; stale copy -> 412)"}}}}}},"responses":{"200":{"description":"{ ok, etag }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.write)"},"404":{"description":"Not cataloged"},"409":{"description":"Member/dataset in use (batch SYSDSN ENQ or another edit session)"},"412":{"description":"ifMatch/If-Match does not match the current version"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.write"},"delete":{"operationId":"deleteMember","summary":"Delete a PDS member","tags":["datasets"],"parameters":[{"name":"dsn","in":"path","required":true,"schema":{"type":"string"},"description":"dataset name"},{"name":"member","in":"path","required":true,"schema":{"type":"string"},"description":"member name"}],"responses":{"200":{"description":"{ ok }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.write)"},"404":{"description":"Not cataloged"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.write"}},"/api/dataset/{dsn}/member/{member}/rename":{"post":{"operationId":"renameMember","summary":"Rename a PDS member","tags":["datasets"],"parameters":[{"name":"dsn","in":"path","required":true,"schema":{"type":"string"},"description":"dataset name"},{"name":"member","in":"path","required":true,"schema":{"type":"string"},"description":"member name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newName":{"description":"new member name"}}}}}},"responses":{"200":{"description":"{ ok }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.write)"},"404":{"description":"Not cataloged"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.write"}},"/api/dataset/{dsn}/member/{member}/copy":{"post":{"operationId":"copyMember","summary":"Copy a PDS member (optionally to another PDS)","tags":["datasets"],"parameters":[{"name":"dsn","in":"path","required":true,"schema":{"type":"string"},"description":"dataset name"},{"name":"member","in":"path","required":true,"schema":{"type":"string"},"description":"member name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"toDsn":{"description":"target PDS (default same)"},"toMember":{"description":"target member name"}}}}}},"responses":{"200":{"description":"{ ok }"},"400":{"description":"No target / target same as source"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.write)"},"404":{"description":"Not cataloged"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.write"}},"/api/dataset/{dsn}/enq":{"post":{"operationId":"acquireEditEnq","summary":"Take the ISPF EDIT enqueue (SPFEDIT analog) on a dataset or member at edit entry. Refused 409 while another edit session holds it or a running job holds the dataset EXCLUSIVE (DISP=OLD/NEW/MOD). Re-acquire by the same session refreshes the hold; holds expire after ZWS_EDIT_ENQ_TTL_MS (default 30 min) of inactivity","tags":["datasets"],"parameters":[{"name":"dsn","in":"path","required":true,"schema":{"type":"string"},"description":"dataset name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"member":{"description":"member name (omit for a PS dataset)"}}}}}},"responses":{"200":{"description":"{ ok, key }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.write)"},"404":{"description":"Not cataloged"},"409":{"description":"In use by another edit session or a running job"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.write"},"delete":{"operationId":"releaseEditEnq","summary":"Release the ISPF EDIT enqueue taken by this session (END/CANCEL/F3 leaving the editor). Idempotent; releasing a hold you do not own is a no-op","tags":["datasets"],"parameters":[{"name":"dsn","in":"path","required":true,"schema":{"type":"string"},"description":"dataset name"},{"name":"member","in":"query","required":false,"schema":{"type":"string"},"description":"member name (omit for a PS dataset)"}],"responses":{"200":{"description":"{ ok }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.write)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.write"}},"/api/vsam/define":{"post":{"operationId":"vsamDefine","summary":"Define a VSAM cluster (IDCAMS DEFINE CLUSTER equivalent)","tags":["datasets"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"cluster name"},"type":{"description":"KSDS|ESDS|RRDS (default KSDS)"},"keylen":{"description":"key length"},"keyoff":{"description":"key offset"},"maxrecl":{"description":"max record length"},"avgrecl":{"description":"average record length"},"volser":{"description":"volume (default WORK01)"},"freespace":{"description":"freespace string"}}}}}},"responses":{"200":{"description":"catalog entry"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.write)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.write"}},"/api/vsam/info":{"get":{"operationId":"vsamInfo","summary":"VSAM cluster attributes and record count","tags":["datasets"],"parameters":[{"name":"dsn","in":"query","required":false,"schema":{"type":"string"},"description":"cluster name"}],"responses":{"200":{"description":"{ dsn, type, keylen, keyoff, recl, volser, freespace, created, alts, recTotal }"},"400":{"description":"IDC3009I not a VSAM cluster"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"},"404":{"description":"IDC3012I entry not found"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"}},"/api/vsam/alter":{"post":{"operationId":"vsamAlter","summary":"Alter a VSAM cluster (IDCAMS ALTER: NEWNAME/FREESPACE only, like real)","tags":["datasets"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dsn":{"description":"cluster name"},"newname":{"description":"new name (optional)"},"freespace":{"description":"freespace string (optional)"}}}}}},"responses":{"200":{"description":"{ ok }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.write)"},"404":{"description":"IDC3012I entry not found"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.write"}},"/api/submit":{"post":{"operationId":"submitJob","summary":"Submit JCL to JES2 (internal-reader equivalent)","tags":["jobs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"description":"array of JCL card images"}}}}}},"responses":{"200":{"description":"{ jobid, jobname }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.write)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.write"}},"/api/jobs":{"get":{"operationId":"listJobs","summary":"List jobs on the queue/output, most recent first","tags":["jobs"],"parameters":[{"name":"max","in":"query","required":false,"schema":{"type":"string"},"description":"return at most N jobs (default: all)"},{"name":"owner","in":"query","required":false,"schema":{"type":"string"},"description":"only jobs owned by this userid"},{"name":"prefix","in":"query","required":false,"schema":{"type":"string"},"description":"only jobs whose jobname matches (exact name or * wildcard, like SDSF PREFIX)"},{"name":"skip","in":"query","required":false,"schema":{"type":"string"},"description":"skip the first N matching jobs (paging window for SDSF F8/DOWN)"},{"name":"count","in":"query","required":false,"schema":{"type":"string"},"description":"1 = return { total } of matching jobs instead of the list (paging: DOWN MAX)"}],"responses":{"200":{"description":"[job]  (with count=1: { total })"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.read"}},"/api/jobs/{jobid}":{"get":{"operationId":"getJob","summary":"Job status + spool file list","tags":["jobs"],"parameters":[{"name":"jobid","in":"path","required":true,"schema":{"type":"string"},"description":"JES2 job id (JOBnnnnn)"}],"responses":{"200":{"description":"{ ...job, files }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.read)"},"404":{"description":"No such job"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.read"},"delete":{"operationId":"purgeJob","summary":"Purge a job and its spool","tags":["jobs"],"parameters":[{"name":"jobid","in":"path","required":true,"schema":{"type":"string"},"description":"JES2 job id"}],"responses":{"200":{"description":"{ ok }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.write)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.write"}},"/api/jobs/{jobid}/wait":{"get":{"operationId":"waitJob","summary":"Long-poll until the job completes — OUTPUT or OUTPUT-HOLD (or timeout)","tags":["jobs"],"parameters":[{"name":"jobid","in":"path","required":true,"schema":{"type":"string"},"description":"JES2 job id"},{"name":"timeout","in":"query","required":false,"schema":{"type":"string"},"description":"seconds (default 60, max 300)"}],"responses":{"200":{"description":"{ ...job, files } or { ...job, timedOut: true }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.read)"},"404":{"description":"No such job"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.read"}},"/api/jobs/{jobid}/file/{name}":{"get":{"operationId":"readSpool","summary":"Read one spool file of a job","tags":["jobs"],"parameters":[{"name":"jobid","in":"path","required":true,"schema":{"type":"string"},"description":"JES2 job id"},{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"spool file name (from the files list)"}],"responses":{"200":{"description":"{ content }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.read"}},"/api/console":{"post":{"operationId":"consoleCommand","summary":"Issue an MVS/JES2 operator console command in real syntax (D A[,L], D J, D TS, D GRS[,C], D T, $DA, $DJ, $D SPOOL, $D I, $PJ, $SJ, $HJ/$AJ/$TJ, $TA/$CA automatic commands, $P JES2[,ABEND[,FORCE]|,TERM]/$S/S JES2, C/CANCEL jobname, MODIFY/F name,cmd, R nn,text, VARY/SET). Returns the console response lines and a return code, mapped onto live job/spool/GRS/instance state","tags":["jobs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"command":{"description":"the console command text (leading / optional)"}}}}}},"responses":{"200":{"description":"{ lines: [...], rc }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.write)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.write"}},"/api/jes/replies":{"get":{"operationId":"listReplies","summary":"Outstanding operator replies (WTOR): console messages awaiting a reply, with the owning job","tags":["jobs"],"responses":{"200":{"description":"[{ replyId, jobid, jobname, message, since }]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.read"}},"/api/jes/replies/{replyId}":{"post":{"operationId":"replyWtor","summary":"Answer an outstanding reply (console R nn,text equivalent) — unblocks the waiting job step","tags":["jobs"],"parameters":[{"name":"replyId","in":"path","required":true,"schema":{"type":"string"},"description":"outstanding reply id (2-digit, leading zero optional)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"description":"reply text delivered to the waiting program"}}}}}},"responses":{"200":{"description":"{ ok, replyId, jobid }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.write)"},"404":{"description":"No such outstanding reply"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.write"}},"/api/jobs/{jobid}/cancel":{"post":{"operationId":"cancelJob","summary":"Cancel a job ($C J equivalent). ACTIVE: kills the tracked step child processes, unblocks its outstanding replies, and the job completes ABEND S222 with canceled:true. INPUT-HOLD: the held job completes CANCELED without ever running. OUTPUT-HOLD: the held output is canceled — the job is purged","tags":["jobs"],"parameters":[{"name":"jobid","in":"path","required":true,"schema":{"type":"string"},"description":"JES2 job id"}],"responses":{"200":{"description":"{ ok, jobid, jobname, purged? }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.write)"},"404":{"description":"No such job"},"409":{"description":"Job not ACTIVE or held (queued-job removal is a flush, not a cancel)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.write"}},"/api/jobs/{jobid}/hold":{"post":{"operationId":"holdJob","summary":"Hold a job still on the input queue ($H J equivalent): it stays INPUT-HOLD — the mined casout /g state 1 — until released. TYPRUN=HOLD jobs arrive already held","tags":["jobs"],"parameters":[{"name":"jobid","in":"path","required":true,"schema":{"type":"string"},"description":"JES2 job id"}],"responses":{"200":{"description":"{ ok, jobid, jobname }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.write)"},"404":{"description":"No such job"},"409":{"description":"Job not on the input queue (already held, ACTIVE, or OUTPUT)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.write"}},"/api/jobs/{jobid}/release":{"post":{"operationId":"releaseJob","summary":"Release a held job ($A J equivalent): an INPUT-HOLD job (operator hold or TYPRUN=HOLD/JCLHOLD) is queued for the initiator and runs","tags":["jobs"],"parameters":[{"name":"jobid","in":"path","required":true,"schema":{"type":"string"},"description":"JES2 job id"}],"responses":{"200":{"description":"{ ok, jobid, jobname }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.write)"},"404":{"description":"No such job"},"409":{"description":"Job not held"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.write"}},"/api/jobs/{jobid}/release-output":{"post":{"operationId":"releaseOutput","summary":"Release a job's HELD output ($O J equivalent): an OUTPUT-HOLD job (finished into a held MSGCLASS — ES_JES_HELD_CLASSES, the mined casout /g state 7) moves to OUTPUT","tags":["jobs"],"parameters":[{"name":"jobid","in":"path","required":true,"schema":{"type":"string"},"description":"JES2 job id"}],"responses":{"200":{"description":"{ ok, jobid, jobname }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.write)"},"404":{"description":"No such job"},"409":{"description":"Job output not held"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.write"}},"/api/jes/output/{class}/release":{"post":{"operationId":"releaseOutputClass","summary":"Release ALL held output of one class at once ($O Q<class> equivalent, the SDSF 'O' action against the whole H queue): every OUTPUT-HOLD job whose MSGCLASS is the class moves to OUTPUT via the per-job releaseOutput machinery. An empty held queue is ok:true count:0, not an error","tags":["jobs"],"parameters":[{"name":"class","in":"path","required":true,"schema":{"type":"string"},"description":"output class (one letter/digit — a held class from ES_JES_HELD_CLASSES)"}],"responses":{"200":{"description":"{ ok, class, count, released: [jobid] }"},"400":{"description":"Invalid output class (want one letter/digit)"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.write)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.write"}},"/api/jes/output/{class}/purge":{"post":{"operationId":"purgeOutputClass","summary":"Purge ALL held output of one class ($P against the held-output queue): every OUTPUT-HOLD job of the class is purged — job and spool gone ($SFJS250 each) — through the same JESSPOOL-ALTER-gated purge a direct DELETE uses. An empty held queue is ok:true count:0","tags":["jobs"],"parameters":[{"name":"class","in":"path","required":true,"schema":{"type":"string"},"description":"output class (one letter/digit — a held class from ES_JES_HELD_CLASSES)"}],"responses":{"200":{"description":"{ ok, class, count, purged: [jobid] }"},"400":{"description":"Invalid output class (want one letter/digit)"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.write)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.write"}},"/api/jes/printers":{"get":{"operationId":"listPrinters","summary":"Bound TN3270E printer LUs (3287 sessions) with their delivery state — the SDSF printer (PR) panel status columns for the released-sysout->printer routing: a sysout delivered to a 3287 shows 'printed to LU <x>'; nothing bound (or nothing delivered) is visible too","tags":["jobs"],"responses":{"200":{"description":"[{ lu, devType, mode (SCS/LU1 | DSC/LU3), associatedTerminal, delivered, status, lastDelivered: { jobid, file, class, at } }]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.read"}},"/api/jobs/{jobid}/requeue":{"post":{"operationId":"requeueJob","summary":"Requeue a COMPLETED job for re-execution ($E J equivalent; the casout /j job[:step[:proc]] restart family): the stored JESJCL spool deck is re-submitted as a NEW job under the original owner. restart=STEP[.PROCSTEP] arms the G4 deferred restart (RESTART= JOB-card equivalent) for the re-run — prior steps BYPASS — and needs ES_JES_RESTART, like the JOB-card path","tags":["jobs"],"parameters":[{"name":"jobid","in":"path","required":true,"schema":{"type":"string"},"description":"JES2 job id of the completed job"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"restart":{"description":"STEP[.PROCSTEP] (optional): restart the re-run at this step; refused 409 when ES_JES_RESTART is not set"}}}}}},"responses":{"200":{"description":"{ ok, jobid (the NEW job), jobname, requeuedFrom, restart, errors }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.write)"},"404":{"description":"No such job"},"409":{"description":"Job not complete, restart disabled (ES_JES_RESTART not set), invalid restart step, or JESJCL lost"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.write"}},"/api/inventory":{"get":{"operationId":"inventoryScan","summary":"Static portfolio scan: programs (language/LOC/CICS/SQL/DLI/MQ flags, CALL+COPY refs), jobs (EXEC PGM steps, DSN refs), BMS mapsets, copybooks","tags":["modernize"],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"dataset pattern to scan (default **)"}],"responses":{"200":{"description":"{ programs, jobs, screens, copybooks, truncated }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"}},"/api/waves":{"get":{"operationId":"wavesGet","summary":"The migration wave board (waves of programs/jobs/screens with framework + sign-off state)","tags":["modernize"],"responses":{"200":{"description":"{ waves: [{ id, name, framework, status, items, notes, updated }] }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"},"put":{"operationId":"wavesPut","summary":"Replace the wave board document","tags":["modernize"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"waves":{"description":"array of waves"}}}}}},"responses":{"200":{"description":"the stored document"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.write)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.write"}},"/api/analysis/model":{"get":{"operationId":"analysisModel","summary":"The estate analysis model index (W7.1): per-program paragraphs/calls/files/SQL with dynamic-target resolution counts, per-job step+DD detail, screens, copybooks","tags":["modernize"],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"dataset pattern to scan (default **)"},{"name":"refresh","in":"query","required":false,"schema":{"type":"string"},"description":"bypass the 30s model cache when \"1\""}],"responses":{"200":{"description":"{ programs, jobs, screens, copybooks, truncated, origins }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"}},"/api/analysis/graph":{"get":{"operationId":"analysisGraph","summary":"Analysis graphs (W7.1): kind=call (CALL/LINK/XCTL edges with literal/resolved/unresolved provenance), kind=job (job→program→dataset with I/O direction + cross-job dataflow), kind=screen (mapsets/transids + XCTL/RETURN-TRANSID navigation; transids resolve through the region CSD)","tags":["modernize"],"parameters":[{"name":"kind","in":"query","required":false,"schema":{"type":"string"},"description":"call | job | screen (required)"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"dataset pattern to scan (default **)"},{"name":"refresh","in":"query","required":false,"schema":{"type":"string"},"description":"bypass the model cache when \"1\""}],"responses":{"200":{"description":"{ kind, nodes, edges, truncated }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"}},"/api/analysis/impact":{"post":{"operationId":"analysisImpact","summary":"Field-level impact trace (W7.2, A13.2b): BFS over the estate impact graph — MOVE/COMPUTE/arith dataflow, group/REDEFINES aliasing, copybook identity, CALL USING linkage, COMMAREA, WRITE→dataset→READ file flow — from a seed field; expand:true answers the Change-Analyzer-style worklist grouped by program/copybook/dataset","tags":["modernize"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"field":{"description":"seed field name (required)"},"program":{"description":"restrict the seed to one program"},"copybook":{"description":"seed the copybook-identity hub instead"},"depth":{"description":"BFS depth cap (default 6)"},"dir":{"description":"'forward' | 'backward' | 'both' (default both)"},"expand":{"description":"true = seed-expansion worklist shape"},"q":{"description":"dataset pattern to scan (default **)"}}}}}},"responses":{"200":{"description":"{ seed, nodes: [{program|copybook, field, hop, condSites}], edges: [{fromProg, fromField, toProg, toField, kind, ln, dsn}], summary, truncated } (or the expandSeeds shape)"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"}},"/api/analysis/metrics":{"get":{"operationId":"analysisMetrics","summary":"Complexity/dead-code metrics (W7.3, A13.2c): per-program cyclomatic complexity (pinned formula 1+IF+WHEN+AND/OR+UNTIL+handlers), dead paragraphs (conservative reachability; ALTER programs refuse loudly), unreferenced data, estate-dead copybook fields, plus the text report","tags":["modernize"],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"dataset pattern to scan (default **)"},{"name":"program","in":"query","required":false,"schema":{"type":"string"},"description":"single program (full metrics row)"},{"name":"report","in":"query","required":false,"schema":{"type":"string"},"description":"\"text\" adds the rendered report"},{"name":"refresh","in":"query","required":false,"schema":{"type":"string"},"description":"bypass the model cache when \"1\""}],"responses":{"200":{"description":"{ programs: [metrics rows], estate, copybookDead, report? } or { program: metrics row }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"}},"/api/analysis/explain":{"get":{"operationId":"analysisExplain","summary":"LLM program explanation over the analysis model (W7.4, A12.12): assembles a deterministic context pack (structure, call neighborhood, jobs/datasets, screens, metrics, shared copybooks, capped source) into a provider-agnostic request. GATED without tenant AI config (SF_AI_PROVIDER/SF_AI_MODEL/SF_AI_KEY/SF_AI_URL): returns the assembled prompt+request with gated:true, never a fabricated answer; with a key the live call runs","tags":["modernize"],"parameters":[{"name":"program","in":"query","required":false,"schema":{"type":"string"},"description":"program name (required)"},{"name":"paragraph","in":"query","required":false,"schema":{"type":"string"},"description":"focus one paragraph"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"dataset pattern to scan (default **)"}],"responses":{"200":{"description":"{ gated, reason?, provider, model, prompt, request, context } or { answer, stopReason, provider, model }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"}},"/api/captures":{"post":{"operationId":"captureRun","summary":"Run a JCL job and capture its golden envelope: RC/abend, all spool files, named output datasets as raw record hex","tags":["verify"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"capture name"},"jcl":{"description":"JCL card images"},"datasets":{"description":"output dataset names to snapshot (optional)"},"masks":{"description":"regexes masked before spool compare (defaults: jobids/timestamps)"}}}}}},"responses":{"200":{"description":"capture summary { id, jobname, maxcc, spoolFiles, datasets, sha256 }"},"400":{"description":"No JCL / run timed out"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.write)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.write"},"get":{"operationId":"captureList","summary":"List golden-run captures (with last compare verdicts)","tags":["verify"],"responses":{"200":{"description":"[capture summary]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.read"}},"/api/captures/{id}":{"get":{"operationId":"captureGet","summary":"Full capture: JCL, masks, baseline envelope (spool text + dataset record hex)","tags":["verify"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"capture id"}],"responses":{"200":{"description":"capture"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.read)"},"404":{"description":"No such capture"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.read"},"delete":{"operationId":"captureDelete","summary":"Delete a capture","tags":["verify"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"capture id"}],"responses":{"200":{"description":"{ ok }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.write)"},"404":{"description":"No such capture"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.write"}},"/api/captures/{id}/compare":{"post":{"operationId":"captureCompare","summary":"Re-run the captured JCL now and diff the envelope against the baseline — verdicts identical/different/missing per artifact, masked spool compare, byte-true dataset compare","tags":["verify"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"capture id"}],"responses":{"200":{"description":"{ verdict, verdicts: {identical,different,missing}, diffs: [{kind,name,verdict,detail}] }"},"400":{"description":"Re-run failed"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.write)"},"404":{"description":"No such capture"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.write"}},"/api/spool/dests":{"get":{"operationId":"spoolDests","summary":"All output destinations (OUTPUT DEST=, default LOCAL) with their routed spool files and writers","tags":["jobs"],"responses":{"200":{"description":"[{ dest, files, writers, entries: [{ jobid, file, class, writer, forms, groupid }] }]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.read"}},"/api/spool/dest/{name}":{"get":{"operationId":"spoolDest","summary":"The spool files routed to one destination","tags":["jobs"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"destination name (LOCAL for unrouted output)"}],"responses":{"200":{"description":"{ dest, files, writers, entries }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.read)"},"404":{"description":"Nothing routed there"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.read"}},"/api/jobs/{jobid}/file/{name}/download":{"get":{"operationId":"downloadSpool","summary":"Export one spool file as raw text or PDF (green-bar Courier; ?cc=asa honors column-1 carriage control)","tags":["jobs"],"parameters":[{"name":"jobid","in":"path","required":true,"schema":{"type":"string"},"description":"JES2 job id"},{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"spool file name"},{"name":"format","in":"query","required":false,"schema":{"type":"string"},"description":"'text' (default) or 'pdf'"},{"name":"cc","in":"query","required":false,"schema":{"type":"string"},"description":"'asa' to treat column 1 as ANSI carriage control (page ejects)"}],"responses":{"200":{"description":"text/plain or application/pdf bytes"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.read"}},"/api/tso":{"post":{"operationId":"tsoCommand","summary":"Run a TSO/ISPF command in the per-token session (panel-capable, poll/reply protocol)","tags":["tso"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cmd":{"description":"TSO command (omit when polling/replying)"},"poll":{"description":"true to poll a running command"},"reply":{"description":"{ aid, fields } panel answer"}}}}}},"responses":{"200":{"description":"{ rc, lines } | { busy, lines } | { panel, lines }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (tso.exec)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"tso.exec"}},"/api/editmacro":{"post":{"operationId":"editMacro","summary":"Run an ISREDIT edit macro over a client-side edit buffer","tags":["tso"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cmd":{"description":"macro name + parms"},"lines":{"description":"edit buffer lines"},"dsn":{"description":"dataset behind the buffer (width)"},"member":{"description":"member name"}}}}}},"responses":{"200":{"description":"{ found, rc, lines, excluded, notes, msg, output }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (tso.exec)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"tso.exec"}},"/api/spufi":{"post":{"operationId":"spufi","summary":"Execute a SQL batch (SPUFI equivalent)","tags":["db2"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sql":{"description":"SQL statements separated by ;"}}}}}},"responses":{"200":{"description":"{ results, formatted }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (db2.exec)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"db2.exec"}},"/api/cics/csd":{"get":{"operationId":"cicsCsd","summary":"The CSD (all resource definitions)","tags":["cics"],"responses":{"200":{"description":"CSD object"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (cics.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"cics.read"}},"/api/bms/preview":{"post":{"operationId":"bmsPreview","summary":"Parse BMS mapset source into its map model (rows/cols/attributes/initials) — the IDE renders 3270 and HTML5 previews from it","tags":["cics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"description":"BMS macro source (DFHMSD/DFHMDI/DFHMDF card images)"}}}}}},"responses":{"200":{"description":"{ mapset: { name, maps: [{ name, size, fields }] }, errors }"},"400":{"description":"No mapset in the source"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (cics.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"cics.read"}},"/api/bms/generate":{"post":{"operationId":"bmsGenerate","summary":"Regenerate BMS macro source from a map model (the screen painter write-back) — round-trips through the same parser; X continuation at column 72, operands resume column 16","tags":["cics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mapset":{"description":"map model as returned by bmsPreview (name, maps[].fields[])"}}}}}},"responses":{"200":{"description":"{ lines }"},"400":{"description":"No mapset model supplied"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (cics.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"cics.read"}},"/api/cics/define":{"post":{"operationId":"cicsDefine","summary":"CEDA-style resource definition","tags":["cics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"description":"PROGRAM|TRANSACTION|FILE|MAPSET|TDQUEUE|JSONSERVICE|..."},"name":{"description":"resource name"},"attrs":{"description":"attribute object"}}}}}},"responses":{"200":{"description":"updated CSD"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (cics.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"cics.admin"}},"/api/cics/log":{"get":{"operationId":"cicsLog","summary":"CICS region log","tags":["cics"],"responses":{"200":{"description":"[string]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (cics.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"cics.read"}},"/api/cics/cemt":{"post":{"operationId":"cicsCemt","summary":"Run one CEMT command line (INQUIRE/SET/PERFORM) through the same parser/executor as the CEMT transaction — SET is the real transient runtime-state overlay (never a CSD write)","tags":["cics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"command":{"description":"CEMT command text, e.g. 'INQUIRE FILE(*)' or 'SET FILE(ACCTDAT) CLOSED'"}}}}}},"responses":{"200":{"description":"{ ok, lines }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (cics.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"cics.admin"}},"/api/cics/region":{"post":{"operationId":"cicsRegion","summary":"CICS region lifecycle (W1.70): START restarts a region shut down by CEMT PERFORM SHUTDOWN (SFCSI1517), STATUS reports ACTIVE/QUIESCING/SHUTDOWN + active task count. Shutdown itself is the CEMT PERFORM SHUTDOWN [IMMEDIATE] master-terminal command","tags":["cics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"description":"START | STATUS"}}}}}},"responses":{"200":{"description":"{ ok, state, activeTasks? } | { ok: false, error }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (cics.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"cics.admin"}},"/api/cics/stats":{"get":{"operationId":"cicsStats","summary":"CICS region statistics (task attaches total/per-transaction, abends, peak+active tasks) — the CEMT PERFORM STATISTICS data","tags":["cics"],"responses":{"200":{"description":"{ since, attaches, abends, peakTasks, activeTasks, byTran }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (cics.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"cics.read"}},"/api/pac":{"get":{"operationId":"pacStatus","summary":"PAC posture (W5.1 A10.2): this region's Scale-Out Repository membership, live member list and shared-store counts — the single-operational-image facts. Public probe like /api/health; the SOR token never appears","tags":["cics"],"responses":{"200":{"description":"{ member: false } | { member: true, pac, sor, memberName, connected, models, members: [{name, apiUrl, since}], counts: {ts, td, enq, kv} }"}},"security":[]}},"/api/drain":{"post":{"operationId":"drainStart","summary":"Start draining (W5.5 A10.6): refuse new logons + new terminal connections, let running tasks and live sessions finish. Idempotent; the upgraded engine boots accepting","tags":["system"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"description":"operator/upgrade reason (optional, logged + reported)"}}}}}},"responses":{"200":{"description":"{ draining, since, reason, activeTasks, activeSessions }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"admin"},"get":{"operationId":"drainStatus","summary":"Drain posture + live counts (the control plane polls this until idle)","tags":["system"],"responses":{"200":{"description":"{ draining, since, reason, activeTasks, activeSessions }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"admin"},"delete":{"operationId":"drainStop","summary":"End the drain: the region accepts logons and terminal connections again","tags":["system"],"responses":{"200":{"description":"{ draining, activeTasks, activeSessions }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"admin"}},"/api/services":{"get":{"operationId":"svcList","summary":"Service Mapper catalog: JSONSERVICE entries joined with their SFMAP mapping-manifest meta (operation, target program, field count; mappingError flags a missing/corrupt manifest member)","tags":["cics"],"responses":{"200":{"description":"[{ name, path, program, transaction, group, pipeline, mapping, kind: mapping|commarea|channel, operation?, targetProgram?, fields?, mappingError? }]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (cics.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"cics.read"}},"/api/services/{name}":{"get":{"operationId":"svcGetMapping","summary":"One mapped service: its JSONSERVICE definition plus the parsed SFMAP mapping manifest (the member cicsweb readMapping loads at invoke time)","tags":["cics"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"JSONSERVICE name"}],"responses":{"200":{"description":"{ name, definition, mapping, manifest }"},"400":{"description":"Service has no mapping (legacy copybook/channel definition) or the manifest member is unreadable"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (cics.read)"},"404":{"description":"No such JSONSERVICE"}},"security":[{"bearerAuth":[]}],"x-required-scope":"cics.read"},"delete":{"operationId":"svcDelete","summary":"Unpublish a Service Mapper service (SPEC-W5 §4.4): removes the JSONSERVICE entry, the recorded PIPELINE when unshared, and the group back-refs. The PROGRAM entry and every member (SFMAP manifest, wrapper source, load module) are KEPT — source belongs to SCM; audited","tags":["cics"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"JSONSERVICE name"}],"responses":{"200":{"description":"{ name, removed: [{ kind, name }], kept: { program, mapping }, group }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (cics.admin)"},"404":{"description":"No such JSONSERVICE"}},"security":[{"bearerAuth":[]}],"x-required-scope":"cics.admin"}},"/api/services/publish":{"post":{"operationId":"svcPublish","summary":"Service Mapper publish (SPEC-W5 §3): mapping (or build spec with DSN(MEMBER) copybook refs) -> SFMAP member write + generated wrapper member + in-engine IGYWCL compile (MAXCC<=4 gate) + CSD trio install (PROGRAM/PIPELINE/JSONSERVICE + group metadata). Re-publish updates in place with an audit line","tags":["cics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mapping":{"description":"a svcmap buildMapping manifest (fields[] present) OR a build spec { service, program, operation?, inputCopybook, outputCopybook } with DSN(MEMBER) refs (defaults to the whole request body when the mapping key is absent)"},"opts":{"description":"{ direct: JSONSERVICE targets the program with no wrapper/compile, maplib: SFMAP PDS (default <hlq>.SFMAP), srclib: wrapper source PDS (default <hlq>.SOURCE), template: 'byte' (default) | 'staged' (COPY'd structures + WS output stage + MOVE-back, for split-structures targets), group, pipeline, transaction }"}}}}}},"responses":{"200":{"description":"{ service, endpoint, mapping, mappingDsn, wrapper, compile: { jobid, maxcc } | null, resources, applied }"},"400":{"description":"Bad mapping/build spec, missing copybook members, wrapper compile failure (MAXCC>4), or resource install failure — message carries the failing step"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (cics.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"cics.admin"}},"/api/services/layout":{"post":{"operationId":"svcLayout","summary":"Service Mapper wizard pane feed (SPEC-W5 §4.4): parse a copybook member into its field layout tree (level/name/pic/usage/occurs/off) plus the 01-group list — the wizard's input/output pickers (wraps copybook.js loadCopybook; nothing is stored)","tags":["cics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"copybook":{"description":"'DSN(MEMBER)' copybook ref"},"copylibs":{"description":"extra COPY-resolution library list (optional)"}}}}}},"responses":{"200":{"description":"{ copybook, total, groups: [{ name, total }], root: layout tree }"},"400":{"description":"Missing/invalid copybook spec"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"},"404":{"description":"Copybook member not found"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"}},"/api/services/draft":{"post":{"operationId":"svcDraft","summary":"Service Mapper wizard draft (SPEC-W5 §4.4): build spec with DSN(MEMBER) copybook refs -> Create-Default-Mappings preview (buildMapping) + generated-wrapper preview with REAL compiler diagnostics (syntaxCheckCobol, the editor's no-drift pipeline). NOTHING is installed or written — publish is svcPublish","tags":["cics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mapping":{"description":"build spec { service, program, operation?, inputCopybook, outputCopybook } with DSN(MEMBER) refs (defaults to the whole request body when the mapping key is absent)"}}}}}},"responses":{"200":{"description":"{ mapping, endpoint, wrapper: { name, lines }, check: { rc, diagnostics } }"},"400":{"description":"Bad build spec or missing copybook members"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (cics.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"cics.read"}},"/api/services/{name}/openapi.json":{"get":{"operationId":"svcOpenapi","summary":"Per-service OpenAPI 3.0 document (SPEC-W5 §6): derived live from the SFMAP mapping manifest via svcmap mappingToOpenapi — version = manifest sha256 short, x-cobol transparency extension per property, DFHJSON_ERROR component. Public, like the service endpoint itself","tags":["cics"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"JSONSERVICE name"}],"responses":{"200":{"description":"OpenAPI 3.0 document for the one service"},"400":{"description":"Service has no mapping (legacy copybook/channel definition) or the manifest member is unreadable"},"404":{"description":"No such JSONSERVICE"}},"security":[]}},"/api/ims/region":{"post":{"operationId":"imsRegionSet","summary":"Configure the IMS TM control region (APPLCTN/TRANSACT analog)","tags":["ims"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"transactions":{"description":"trancode -> { psb, ... } map"},"databases":{"description":"online database list"}}}}}},"responses":{"200":{"description":"region config"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (ims.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"ims.admin"},"get":{"operationId":"imsRegionGet","summary":"Current IMS TM region configuration","tags":["ims"],"responses":{"200":{"description":"region config (or {})"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (ims.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"ims.read"}},"/api/ims/queues":{"get":{"operationId":"imsQueues","summary":"IMS TM message queue depths per transaction code","tags":["ims"],"responses":{"200":{"description":"[{ trancode, depth }]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (ims.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"ims.read"}},"/api/ims/log":{"get":{"operationId":"imsLog","summary":"IMS TM region log","tags":["ims"],"responses":{"200":{"description":"[string]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (ims.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"ims.read"}},"/api/ims/command":{"post":{"operationId":"imsCommand","summary":"IMS operator command surface (W3.5/A5.6): /DIS TRAN|A, /START|/STOP|/PSTOP TRAN (STOP rejects new input, PSTOP holds scheduling only), /START|/STOP REGION (MPR start/renew). Returns the display/completion lines — /DIS TRAN emits the documented column header + *yyddd/hhmmss* trailer, completions the documented DFS058I form","tags":["ims"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"command":{"description":"the command line, e.g. '/DIS TRAN ALL' or '/STOP TRAN PART'"}}}}}},"responses":{"200":{"description":"{ lines }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (ims.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"ims.admin"}},"/api/mq/qmgr":{"get":{"operationId":"mqQmgr","summary":"Queue manager overview: queues with depth, processes","tags":["mq"],"responses":{"200":{"description":"{ qmgr, queues: [{ name, depth, attrs }], processes }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (mq.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"mq.read"}},"/api/mq/queue/{name}":{"get":{"operationId":"mqQueue","summary":"Browse one queue: attributes, depth, first messages (hex + EBCDIC-decoded text)","tags":["mq"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"queue name"},{"name":"max","in":"query","required":false,"schema":{"type":"string"},"description":"max messages to browse (default 20)"}],"responses":{"200":{"description":"{ name, depth, attrs, messages }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (mq.read)"},"404":{"description":"Unknown queue (CSQU: like MQRC 2085)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"mq.read"}},"/api/ndvr/repo":{"get":{"operationId":"ndvrRepo","summary":"Repository overview: environments, map, systems, types, processor groups","tags":["ndvr"],"responses":{"200":{"description":"repository view"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (ndvr.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"ndvr.read"}},"/api/ndvr/elements":{"get":{"operationId":"ndvrElements","summary":"Element list by selection criteria (wildcards)","tags":["ndvr"],"parameters":[{"name":"env","in":"query","required":false,"schema":{"type":"string"},"description":"environment (*)"},{"name":"system","in":"query","required":false,"schema":{"type":"string"},"description":"system (*)"},{"name":"subsystem","in":"query","required":false,"schema":{"type":"string"},"description":"subsystem (*)"},{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"type (*)"},{"name":"stage","in":"query","required":false,"schema":{"type":"string"},"description":"stage (*)"},{"name":"element","in":"query","required":false,"schema":{"type":"string"},"description":"element (*)"}],"responses":{"200":{"description":"[element]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (ndvr.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"ndvr.read"}},"/api/ndvr/element":{"get":{"operationId":"ndvrElement","summary":"One element: master info, level history, source","tags":["ndvr"],"parameters":[{"name":"env","in":"query","required":false,"schema":{"type":"string"},"description":"environment"},{"name":"system","in":"query","required":false,"schema":{"type":"string"},"description":"system"},{"name":"subsystem","in":"query","required":false,"schema":{"type":"string"},"description":"subsystem"},{"name":"type","in":"query","required":false,"schema":{"type":"string"},"description":"type"},{"name":"stage","in":"query","required":false,"schema":{"type":"string"},"description":"stage"},{"name":"name","in":"query","required":false,"schema":{"type":"string"},"description":"element name"}],"responses":{"200":{"description":"element detail"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (ndvr.read)"},"404":{"description":"Element not found"}},"security":[{"bearerAuth":[]}],"x-required-scope":"ndvr.read"}},"/api/ndvr/packages":{"get":{"operationId":"ndvrPackages","summary":"Package list (batch package facility): id pattern + status filter","tags":["ndvr"],"parameters":[{"name":"id","in":"query","required":false,"schema":{"type":"string"},"description":"package id pattern (*)"},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"package status (IN-EDIT, IN-APPROVAL, APPROVED, DENIED, IN-EXECUTION, EXECUTED, EXEC-FAILED, COMMITTED)"}],"responses":{"200":{"description":"[package summary]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (ndvr.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"ndvr.read"}},"/api/ndvr/package":{"get":{"operationId":"ndvrPackage","summary":"One package: status lifecycle, SCL, approver groups + votes, execution log, ship history","tags":["ndvr"],"parameters":[{"name":"id","in":"query","required":false,"schema":{"type":"string"},"description":"package id"}],"responses":{"200":{"description":"package detail"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (ndvr.read)"},"404":{"description":"Package not found"}},"security":[{"bearerAuth":[]}],"x-required-scope":"ndvr.read"}},"/api/ndvr/reset":{"post":{"operationId":"ndvrReset","summary":"Reset the repository to the seeded configuration (test harness)","tags":["ndvr"],"responses":{"200":{"description":"{ ok }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (ndvr.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"ndvr.admin"}},"/api/sched/store":{"get":{"operationId":"schedStore","summary":"Scheduler store overview: folders, jobs, conditions, symbols, cycles","tags":["sched"],"responses":{"200":{"description":"store view"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (sched.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"sched.read"}},"/api/sched/jobs":{"get":{"operationId":"schedJobs","summary":"Job definitions (with trigger graph) for a folder","tags":["sched"],"parameters":[{"name":"folder","in":"query","required":false,"schema":{"type":"string"},"description":"folder name (* = all)"}],"responses":{"200":{"description":"[job]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (sched.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"sched.read"}},"/api/sched/cycle":{"get":{"operationId":"schedCycle","summary":"One ordered cycle: per-job state + cycle log","tags":["sched"],"parameters":[{"name":"id","in":"query","required":false,"schema":{"type":"string"},"description":"cycle id"}],"responses":{"200":{"description":"cycle"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (sched.read)"},"404":{"description":"No such cycle"}},"security":[{"bearerAuth":[]}],"x-required-scope":"sched.read"}},"/api/sched/order":{"post":{"operationId":"schedOrder","summary":"Order a folder (asynchronous cycle through JES2)","tags":["sched"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folder":{"description":"folder name"},"force":{"description":"order even out of schedule"}}}}}},"responses":{"200":{"description":"{ id, jobs }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (sched.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"sched.admin"}},"/api/sched/demand":{"post":{"operationId":"schedDemand","summary":"Demand one job + its trigger closure","tags":["sched"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"job":{"description":"job name"},"schid":{"description":"schedule id variant (optional)"}}}}}},"responses":{"200":{"description":"{ id, jobs }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (sched.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"sched.admin"}},"/api/sched/symbol":{"post":{"operationId":"schedSymbol","summary":"Set a JCLLIB-style symbol (e.g. &CARDDEMOPRODJCL)","tags":["sched"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"symbol name"},"value":{"description":"value"}}}}}},"responses":{"200":{"description":"{ ok }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (sched.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"sched.admin"}},"/api/sched/options":{"post":{"operationId":"schedOptions","summary":"Set scheduler options","tags":["sched"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"okrc":{"description":"max RC counted as OK (and other options)"}}}}}},"responses":{"200":{"description":"{ ok }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (sched.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"sched.admin"}},"/api/sched/condition":{"post":{"operationId":"schedCondition","summary":"Add (+) or erase (-) a global IOA-style condition (name/ODATE pair)","tags":["sched"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"condition name"},"sign":{"description":"'+' (default) or '-'"},"odate":{"description":"optional ODATE (yyyymmdd, ODAT, STAT/****; default ODAT=today; '-' with no odate erases every date of the name)"}}}}}},"responses":{"200":{"description":"{ ok }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (sched.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"sched.admin"}},"/api/sched/jobaction":{"post":{"operationId":"schedJobAction","summary":"Operator action on a cycle job: HOLD, FREE, RUNNOW (release ignoring conditions/time window), BYPASS (force-complete without running; successors release) or RESTART a failed job","tags":["sched"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cycle":{"description":"cycle id (CYCnnnnn)"},"job":{"description":"job name"},"action":{"description":"HOLD|FREE|RUNNOW|BYPASS|RESTART"}}}}}},"responses":{"200":{"description":"{ cycle, job, state }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (sched.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"sched.admin"}},"/api/sched/cancel":{"post":{"operationId":"schedCancel","summary":"Cancel the remaining (waiting/held) work of an active cycle","tags":["sched"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cycle":{"description":"cycle id (CYCnnnnn)"}}}}}},"responses":{"200":{"description":"{ cycle, cancelled, status }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (sched.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"sched.admin"}},"/api/sched/newday":{"post":{"operationId":"schedNewday","summary":"Run the New Day procedure: age the conditions table, order every eligible Control-M folder, demand every scheduled CA-7 job (holiday/ROLL calendars applied)","tags":["sched"],"responses":{"200":{"description":"{ odate, removedConds, ordered, demanded, skipped }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (sched.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"sched.admin"}},"/api/sched/calendar":{"put":{"operationId":"schedCalendar","summary":"Define a base calendar (CA-7 SCAL / Control-M CONFCAL): holidays + working week; jobs reference it via SCAL/SCHED_CALENDAR with ROLL/SHIFT semantics","tags":["sched"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"calendar name"},"holidays":{"description":"[yyyymmdd,...]"},"weekdays":{"description":"working week, e.g. 'MO,TU,WE,TH,FR' (optional)"}}}}}},"responses":{"200":{"description":"{ ok }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (sched.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"sched.admin"}},"/api/sched/alerts":{"get":{"operationId":"schedAlerts","summary":"SHOUT alert log (WHEN OK/NOTOK/LATESUB/LATETIME, destination, urgency), newest first","tags":["sched"],"responses":{"200":{"description":"[alert]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (sched.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"sched.read"}},"/api/sched/reset":{"post":{"operationId":"schedReset","summary":"Reset the scheduler store (test harness)","tags":["sched"],"responses":{"200":{"description":"{ ok }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (sched.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"sched.admin"}},"/api/racf/store":{"get":{"operationId":"racfStore","summary":"RACF database overview: users, groups, dataset profiles, classes, SETROPTS","tags":["racf"],"responses":{"200":{"description":"store view"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (racf.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"racf.read"}},"/api/me/views":{"get":{"operationId":"myViews","summary":"W4.4 (A1.8) ACL-gated navigation: the Studio workspaces this caller may see. A ZVIEW-class profile per workspace id gates visibility (READ); with the class undefined every view is visible and gated=false","tags":["session"],"parameters":[{"name":"views","in":"query","required":false,"schema":{"type":"string"},"description":"optional comma-separated candidate list (default: the built-in workspace set)"}],"responses":{"200":{"description":"{ user, views: [id], gated } — gated=true means ZVIEW profiles are filtering"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (system.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"system.read"}},"/api/security/posture":{"get":{"operationId":"securityPosture","summary":"ESM/security console posture (W4): enforcement config, identity providers, vault (names + provider only — NEVER values), PassTicket/DCAS configuration, and the resource classes carrying profiles","tags":["racf"],"responses":{"200":{"description":"{ security: {enforce,cmdsec,ressec,secprfx}, identity: { local, ad, oidc, certMaps }, vault: { provider, configured, secrets: [{name,created,rotated}] }, passticket: { appls: [{appl,method}], window }, dcas: { maps: [{label,user,sdnfilter}] }, classes: [{ class, profiles }] }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (racf.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"racf.read"}},"/api/racf/class":{"get":{"operationId":"racfClass","summary":"Profiles of one general-resource class","tags":["racf"],"parameters":[{"name":"name","in":"query","required":false,"schema":{"type":"string"},"description":"class name (e.g. FACILITY)"}],"responses":{"200":{"description":"[profile]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (racf.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"racf.read"}},"/api/racf/commands":{"post":{"operationId":"racfExec","summary":"Execute RACF command-processor commands (ADDUSER/ADDGROUP/RDEFINE/PERMIT/SETROPTS/...) as the calling user — the apply path for ESF/ACF2/TSS import decks and security automation. Body: complete commands[] OR text (newline-separated deck; RACF + continuations joined)","tags":["racf"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"commands":{"description":"[string] complete RACF commands (no continuations)"},"text":{"description":"alternative: raw deck text — trailing \" +\" continues at an operand boundary, a bare trailing \"+\" joins mid-word (the IRRDBU00-deck grammar)"}}}}}},"responses":{"200":{"description":"{ results: [{ command, rc, lines }], maxrc } — rc -3 = not a RACF verb (refused, counted as 12 in maxrc); under enforcement the issuer needs command authority (SYSTEM-SPECIAL) for privileged verbs"},"400":{"description":"No commands supplied"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (racf.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"racf.admin"}},"/api/racf/reset":{"post":{"operationId":"racfReset","summary":"Reset the RACF store to the seeded base (test harness)","tags":["racf"],"responses":{"200":{"description":"{ ok }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (racf.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"racf.admin"}},"/api/import":{"post":{"operationId":"importEstate","summary":"Import an estate artifact (region XML, DFHCSDUP-style CSD deck, or ESCWA region JSON) into this engine: parse to the canonical region model, emit catalog datasets, VSAM clusters and CICS resources, and return the reconciling §7 import report","tags":["import"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"description":"'region-xml' | 'csd-deck' | 'escwa-json'"},"content":{"description":"artifact text (region XML / deck cards / ESCWA JSON); EBCDIC CSD decks may be sent as base64 via encoding"},"encoding":{"description":"'base64' to pass binary (e.g. EBCDIC) deck bytes (optional; default utf8 text)"},"name":{"description":"region name for artifacts that carry none (csd-deck; default IMPORT)"},"file":{"description":"original filename, recorded in the report provenance (optional)"},"discardMvsDsn":{"description":"csd-deck only: drop DSNAME operands like casrdtup /d (optional)"}}}}}},"responses":{"200":{"description":"{ region, regions, config, report, counts, renderedReport } — counts reconcile: parsed = mapped+translated+ignored+manual"},"400":{"description":"Unknown kind, missing content, or a parse error (message carries the offending line)"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (apps.admin)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"apps.admin"}},"/api/assess":{"post":{"operationId":"assessEstate","summary":"G1 estate feasibility assessment (third-party detection, 3-tier dialect manifest, verdict tier): send an estate archive (zip / tar.gz / tar / single file as the raw body), or pass ?dir= a server-side estate directory (body then ignored). Returns exactly the `sf assess --json` document","tags":["modernize"],"parameters":[{"name":"dir","in":"query","required":false,"schema":{"type":"string"},"description":"server-side estate directory to scan instead of uploading (raw body ignored)"},{"name":"filename","in":"query","required":false,"schema":{"type":"string"},"description":"uploaded archive name hint; drives .tar/single-file handling (default: upload)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"(raw)":{"description":"the estate archive bytes as the request body (omit when ?dir= is used)"}}}}}},"responses":{"200":{"description":"{ findings, summary, manifest, dir, skipped, verdict } — the `sf assess --json` shape unchanged (uploaded estates report dir: null; verdict.rc is the CLI exit-code tier: 0 clean / 1 manual / 3 non-goal)"},"400":{"description":"Unreadable dir, bad archive, or empty body without ?dir="},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (datasets.read)"},"413":{"description":"Body over the upload cap"}},"security":[{"bearerAuth":[]}],"x-required-scope":"datasets.read"}},"/api/estates":{"get":{"operationId":"listEstates","summary":"The installable sample-estate registry (z/OS SYN.*, IDMS W-series, Natural/ADABAS) with per-estate installed state (marker dataset cataloged?) and suite counts","tags":["estates"],"responses":{"200":{"description":"[{ id, name, family, marker, installed, installing, installers, suiteCount }]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (system.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"system.read"}},"/api/estates/{name}/install":{"post":{"operationId":"installEstate","summary":"Install a sample estate into THIS running region: runs the estate's existing test/*_install.mjs --live installers server-side, in order (batch side, then CICS). Idempotent — installers tolerate \"already present\". One install at a time (409). Poll GET /api/estates/runs/{id}","tags":["estates"],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"estate id from GET /api/estates"}],"responses":{"200":{"description":"{ run } — the run id to poll"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.write)"},"404":{"description":"Unknown estate / installer missing"},"409":{"description":"An install is already running"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.write"}},"/api/estates/runs/{id}":{"get":{"operationId":"estateRun","summary":"Poll an install/battle run: status + incremental log tail (?from=<byte offset> returns only new output; logSize is the next offset)","tags":["estates"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"run id"},{"name":"from","in":"query","required":false,"schema":{"type":"string"},"description":"log byte offset already received (default 0)"}],"responses":{"200":{"description":"{ id, kind, status, rc, tally, steps, log, logSize, ... }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (system.read)"},"404":{"description":"No such run"}},"security":[{"bearerAuth":[]}],"x-required-scope":"system.read"}},"/api/estates/runs":{"get":{"operationId":"listEstateRuns","summary":"Recent install/battle runs (newest first)","tags":["estates"],"responses":{"200":{"description":"[{ id, kind, label, status, estate, suite, started, ended }]"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (system.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"system.read"}},"/api/estates/battles":{"get":{"operationId":"listBattles","summary":"The battle-suite catalog: per-estate suite groups (scanned from test/) + the platform battlemanifest suites. mode \"own-engine\" boots a private engine; mode \"live\" targets THIS region (mutating — the UI warns)","tags":["estates"],"responses":{"200":{"description":"{ estates: [{ id, name, family, suites: [{name, file, mode}] }], platform: [{name, file, mode, expectPass}] }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (system.read)"}},"security":[{"bearerAuth":[]}],"x-required-scope":"system.read"}},"/api/estates/battles/run":{"post":{"operationId":"runBattle","summary":"Run a battle suite server-side (node test/<suite>_battle.mjs), streaming pass/fail into the run log. Suites are validated against the catalog. One battle at a time (409). Poll GET /api/estates/runs/{id}","tags":["estates"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"suite":{"description":"suite name from GET /api/estates/battles"}}}}}},"responses":{"200":{"description":"{ run, suite, mode }"},"401":{"description":"Missing/invalid token (NOT LOGGED ON)"},"403":{"description":"Token lacks the required scope (jobs.write)"},"404":{"description":"Unknown suite"},"409":{"description":"A battle is already running"}},"security":[{"bearerAuth":[]}],"x-required-scope":"jobs.write"}}}}