Skip to main content
OSA checks every roof you send. A critical problem means the roof cannot be built, and it is refused. Any other problem is a warning: the roof is built anyway, and the warning says what OSA did about it. The checks look at whether the drawing holds together, not whether it matches the real house: OSA cannot see that part of a roof is missing, only a drawing that contradicts itself.

The request’s shape comes first

Before any roof check, the request is checked against the API reference: an unknown or misspelt field, a wrong type, or a value out of range. A request that fails answers 422 validation_failed, with errors pointing at each field and no check or severity, and the roof checks do not run:
Everything below applies to a well-shaped request. Rules the shape cannot show, such as two points with the same id, are check 1 problems (see Critical problems).

A problem

Each problem the roof checks find has the same four fields: severity is an open enum: treat an unknown value as major. check numbers may be added too.

Where problems appear

  • Checking a roof. POST /v1/esx-exports/checks answers 200 with buildable and every problem found in problems. A roof that would be refused still gets 200, with buildable: false. The reference is not checked for duplicates here.
  • A roof refused. POST /v1/esx-exports and POST /v1/esx-exports/{id}/versions answer 422 validation_failed when there is at least one error. errors then lists every problem the checks found, warnings included.
  • A roof built. The export’s warnings lists the latest version’s warnings: at most 100, major ones first when there are more. major_warnings and minor_warnings count them exactly, and clean is true when there are none. warnings never holds an error.
A critical problem can stop the later checks on its structure, so the list may not be every problem the roof has. Check the roof again after correcting it. A check that found one critical problem and one warning. The face north names an edge rake-nx that does not exist, and the edge it meant, rake-ne, lies on no face:
Sent to be built, the same roof is refused:

The checks

Critical problems

A roof with any of these is refused (severity: error). A check 1 problem stops checks 2 to 6. A missing ZIP, latitude or longitude never reaches the roof checks: it is a shape error, a 422 with no check, as in The request’s shape comes first.

Warnings

A roof with only these is built. Each warning says what OSA did.

Before you ask for the file

The first time you ask for a live export’s ESX is charged as one use, whether or not it has warnings. Look at clean and major_warnings first, and correct the roof with a new version if you need to. See What counts as a use.