Recipes/Energy/stateless
request response35–50 min2 stages8 code languages

Contract slice: Restore the grid from alarm to verified service

Faster, safer restoration with an explainable view of affected assets, customers, crews, and residual risk.

The real-world moment

A monsoon storm trips feeders across two districts while flood exposure changes road access by the minute. Grid operations must correlate alarms against an exact network version, estimate affected service points, obtain an independently approved switching plan, dispatch capable crews, preserve every field observation, and avoid declaring restoration until telemetry and customer-impact evidence converge.

Make ownership visible before code.

Prove one bounded contract, identity handoff, failure response, and observable first success.

Application state
stateless
Planning calls
0
Credentials accepted
No
Write authority
None
01
Network and hazard authority

Version the network and hazard context

The utility system of record owns assets, connectivity, protection settings, switching authority and customer-service relationships; versioned mGIS layers add terrain, flood, access and vegetation context without replacing that authority.

Grid asset ↔ topology/configuration version, owner and safety class

GETRouting API/{REST_KEY}/{resources}/{profile}/{geopositions}This is a supporting operation from the selected product stack, not proof of an exact provider contract for this stage. Resolve the stage through its product source or adapter boundary before live implementation.

Record stage 1 with the application identity, source fingerprint, request or aggregate identity, timestamp, and observable outcome.

Many alarms collapse onto the wrong feeder

Retain each source alarm, topology version and correlation reason; require operator correction and create a new incident revision rather than rewriting prior evidence.

02
Outage correlation

Correlate alarms into bounded outage incidents

Append-only alarms and calls map to exact network versions and form bounded incidents under a versioned correlation rule with operator correction.

Alarm ↔ source/event/content identity, event/receipt time and mapped asset

GETTo get the list of tasks and their details/tasksThis is a supporting operation from the selected product stack, not proof of an exact provider contract for this stage. Resolve the stage through its product source or adapter boundary before live implementation.

Record stage 2 with the application identity, source fingerprint, request or aggregate identity, timestamp, and observable outcome.

A road route crosses a newly flooded segment

Append the hazard revision, invalidate the route identity, keep the switching plan separate, and require dispatch to approve a safe replacement.

Edit once. Generate eight trusted-runtime implementations.

The recipe starts from the normalized GET /alarm/alarmLog/ contract. Execute six deterministic fixture outcomes before an issued account is involved.

Local request composerCode stays local · fixtures are explicit
GETRequest inputs
4 editable · 0 protected
Generated in eight languages
Environment-backed credentials
GEThttps://intouch.mapmyindia.com/iot/api/alarm/alarmLog/?deviceId=1909%2C2545&alarmType=21%2C26&startTime=1700000000000&endTime=1700000000000
Credential-free sandboxExecute this contract without a provider call
How fixtures work
Generated from your inputs
curl --request GET \
  --url 'https://intouch.mapmyindia.com/iot/api/alarm/alarmLog/?deviceId=1909%2C2545&alarmType=21%2C26&startTime=1700000000000&endTime=1700000000000' \
  --header "Accept: application/json" \
  --header "Authorization: Bearer ${MAPPLS_INTOUCH_TOKEN}"

Credential-safe by constructionSet MAPPLS_INTOUCH_TOKEN only in your trusted runtime. Code generation stays local. Sandbox execution sends only bounded fixture inputs to this developer platform and never reads a credential or calls Mappls.

Break the journey before customers do.

These controls are required at this operating depth; deeper recipes add durable truth rather than merely more API calls.

Bound inputs and outputsAbortable timeoutRetry only safe readsTyped empty and denied statesSafe request correlationCredential and URL-log redaction

Definition of done

Valid, empty, invalid-input, authentication-denied, rate-limited, timed-out, and unavailable outcomes are distinguishable.

The accepted Mappls or provider identity is retained separately from display text and coordinates.

Credentials remain in the approved runtime and logs retain only safe request evidence.

The exact source contract, auth generation, host, entitlement, quota, and region are reviewed before live traffic.

Contracts, tutorials, and journeys stay linked.

Grid Restoration Desk

Correlate an outage, govern independent switching approval, dispatch an assigned crew, preserve rework, and reconcile restoration from telemetry and customer-impact evidence.

Source-grounded, not authority-granting

This recipe composes source-derived contracts, application architecture, fixtures, and maintained learning evidence. It does not prove package availability, provider payload shape, account entitlement, regional behavior, production compatibility, or release approval.