Replace a draft revision's final test plan. An empty list of checks leaves the revision with no final test.
const url = 'https://app.dev.buildtrace.eu/api/revisions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/test-plan';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"checks":[{"kind":"MEASUREMENT","name":"example","unit":"example","lowerLimit":1,"upperLimit":1,"target":1,"required":true,"instructions":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://app.dev.buildtrace.eu/api/revisions/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" } ] }'Required scope: revisions:write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”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
Required for a measurement; not allowed otherwise.
Nominal value, shown to the operator; must lie within the limits.
Defaults to true. An optional check may be left blank; if recorded, it still counts.
Responses
Section titled “Responses”OK
object
Absent on a plan seeded for an ECO that has not saved its own.
Counts saves of this plan; 0 for a seeded plan not yet saved.
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
Required for a measurement; not allowed otherwise.
Nominal value, shown to the operator; must lie within the limits.
Defaults to true. An optional check may be left blank; if recorded, it still counts.
Example
{ "checks": [ { "kind": "MEASUREMENT" } ]}Bad request (the message names the check)
object
Example generated
{ "error": "example"}Unauthorized
Not found
Conflict - revision is released (its process is frozen)
object
Example generated
{ "error": "example"}