Skip to main content
POST
N-1 contingency analysis: DC screen, AC verification, islanding, violations by duty, ranking (`ss.power.security/1`)

Authorizations

x-api-key
string
header
required

Required when the deployment sets SS_REQUIRE_AUTH=1

Body

application/json
async
boolean

true: run as a job and answer 202 with job_id, poll and events; the finished job's result is this route's body without the inline result (read result_key's blob, or page it with power_contingency_page). false: always inline. Left out: inline up to an estimated work of 5e6 bus-solves (SS_POWER_PLANNING_SYNC_WORK; N-1 of a 2,000-bus case is about 7e6, an AC OPF of 13,659 buses 9e6), a job above. Above 2e5 (SS_POWER_PLANNING_LIGHT_WORK) a study takes a slot of PW12's heavy lane

case
string

A PW2 study case by id (its states and settings apply); left out, the document as it stands

contingencies
object

A contingency document (ss.power.contingencies/1, TP2): named contingencies (id, outages: branch, source or HVDC link ids) and rules (select: all_branches, all_generators, all_hvdc, by voltage, by area, each of a list), with an optional monitor (branches watched, pre and post duties, voltage band)

contingencies_key
string

A stored contingency document's key (power_contingencies_validate, power_contingencies_expand and power_common_mode answer one)

network
object

The network document (ss.power.network/1, PW2 with TP2's planning members: ratings by duty, costs, areas, interfaces, HVDC links), inline. Give exactly one of network, network_key, project. Every document is run in its canonical form

network_key
string

The key (b3:<hex>) of a stored network (what power_network, power_import (format matpower_planning keeps costs and ratings), power_raw, power_cgmes and an OPF's dispatched_network_key answer)

project
string

The id of a project whose document is a network (app: "power"): its live head where it has one, else its last save

settings
object

TP6's study with TP7's options, laid over this route's defaults: slack, ac, screen_threshold, load_flow, on_slack_loss, change_floor, pre_existing

start_key
string

The result key of a power_opf_ac run that reached an optimum: its bus voltages warm-start the base case (the review after TP11: a case PW3 cannot solve from a flat or DC start often solves in one iteration from its OPF's voltages). Named in the record by its key

variant
string

A variant of project, by slug

Response

study, schema, result_key (BLAKE3 of the result's canonical bytes, the crate's own content_hash; blob_uri reads it, report_uri is its certificate, which verify_result runs again), request_key, documents (each document the study read, by content key), network {key, name, counts}, case, summary, elapsed_ms, work (the estimate the lane and the job threshold read), result_inline, and result (the whole result document, up to 16 MiB); page (the ranking's first page with its violations) where the result is not inline. result: list, monitor, slack, base, totals {contingencies, screened, flagged, ac_solved, secure, with_violations, not_converged, unevaluable, islanding, violations, ...}, outcomes, ranking, violations, findings

The response is of type object.