REST API#

The endpoints of the REST service are documented below.

POST /valid#

Valid

Validate wether a ScanSpec[str] can produce a viable scan.

Args:

spec: The scanspec to validate

Returns:
ValidResponse: A canonical version of the spec if it is valid.

An error otherwise.

Status Codes:
POST /midpoints#

Midpoints

Generate midpoints from a scanspec.

A scanspec can produce bounded points (i.e. a point is valid if an axis is between a minimum and and a maximum, see /bounds). The midpoints are the middle of each set of bounds.

Args:

request: Scanspec and formatting info.

Returns:

MidpointsResponse: Midpoints of the scan

Status Codes:
POST /bounds#

Bounds

Generate bounds from a scanspec.

A scanspec can produce points with lower and upper bounds.

Args:

request: Scanspec and formatting info.

Returns:

BoundsResponse: Bounds of the scan

Status Codes:
POST /gap#

Gap

Generate gaps from a scanspec.

A scanspec may indicate if there is a gap between two frames. The array returned corresponds to whether or not there is a gap after each frame.

Args:

spec: Scanspec and formatting info.

Returns:

GapResponse: Bounds of the scan

Status Codes:
POST /smalleststep#

Smallest Step

Calculate the smallest step in a scan, both absolutely and per-axis.

Ignore any steps of size 0.

Args:

spec: The spec of the scan

Returns:

SmallestStepResponse: A description of the smallest steps in the spec

Status Codes: