Skip to content

Set an ECO's test plan

PUT
/ecos/{id}/test-plan
curl --request PUT \
--url https://app.dev.buildtrace.eu/api/ecos/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/test-plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "checks": [ { "kind": "MEASUREMENT", "name": "example", "unit": "example", "lowerLimit": 1, "upperLimit": 1, "target": 1, "required": true, "instructions": "example" } ] }'

Set the final test plan an ECO puts in force (DRAFT, PROCESS/BOTH ECOs only). An empty list of checks removes the final test once the ECO is effective.

Required scope: ecos:write.

id
required
string format: uuid
Media typeapplication/json
object
checks
required
Array<object>
<= 50 items

One check of a final test. MEASUREMENT records a number against a minimum and/or maximum (at least one) in a unit, with an optional target; PASS_FAIL records a yes/no outcome; TEXT records a value that is kept but not judged. Names are unique within a plan.

object
kind
required
string
Allowed values: MEASUREMENT PASS_FAIL TEXT
name
required
string
<= 120 characters
unit

Required for a measurement; not allowed otherwise.

string
<= 40 characters
lowerLimit
number format: double
upperLimit
number format: double
target

Nominal value, shown to the operator; must lie within the limits.

number format: double
required

Defaults to true. An optional check may be left blank; if recorded, it still counts.

boolean
instructions
string
<= 1000 characters

OK

Media typeapplication/json
object
id

Absent on a plan seeded for an ECO that has not saved its own.

string format: uuid
version
required

Counts saves of this plan; 0 for a seeded plan not yet saved.

integer
checks
required
Array<object>

One check of a final test. MEASUREMENT records a number against a minimum and/or maximum (at least one) in a unit, with an optional target; PASS_FAIL records a yes/no outcome; TEXT records a value that is kept but not judged. Names are unique within a plan.

object
kind
required
string
Allowed values: MEASUREMENT PASS_FAIL TEXT
name
required
string
<= 120 characters
unit

Required for a measurement; not allowed otherwise.

string
<= 40 characters
lowerLimit
number format: double
upperLimit
number format: double
target

Nominal value, shown to the operator; must lie within the limits.

number format: double
required

Defaults to true. An optional check may be left blank; if recorded, it still counts.

boolean
instructions
string
<= 1000 characters

Example

{
"checks": [
{
"kind": "MEASUREMENT"
}
]
}

Bad request (the message names the check)

Media typeapplication/json
object
error
required
string

Example generated

{
"error": "example"
}

Unauthorized

ECO not found

Conflict - ECO is not DRAFT or not a PROCESS/BOTH ECO

Media typeapplication/json
object
error
required
string

Example generated

{
"error": "example"
}