Skip to content

Restore an earlier version of the project’s test plan

POST
/v1/projects/{id}/test-plan/versions/{version}/restore
curl --request POST \
--url https://beta-api.plune.ai/v1/projects/example/test-plan/versions/1/restore \
--header 'Authorization: Bearer <token>'

Saves the plan of version as the next version, restoredFrom naming it; the versions between stay. The plan is checked again as a save is, so one naming a case that is in the Bin now is a 400 strategy_lint. The same people as a save; no body. Sixty a minute.

id
required
string

The project’s id

version
required
integer
>= 1

The version, from 1

The new version

Media type application/json
object
projectId
required
string
version
required

Counts from 1 per project; the highest is the current plan

integer
>= 1
savedBy
required

The person who saved it, or the person whose token did

string
savedAt
required
string format: date-time
restoredFrom
required

The earlier version a restore copied; null for a save

integer
nullable >= 1
reviewItemId
required

The queue entry it was accepted from (#2741); null for a person’s own save, or once the entry is gone. savedBy is then who accepted it

string
nullable
proposedBy
required

Who put it in the queue: the person, or the person whose token the agent used

string
nullable
editedBy
required

The person who corrected the agent’s plan before accepting it

string
nullable
content
required

A test plan in the sections of ISTQB CTFL v4.0.1 (ADR 0074).

object
objectives
required

What the testing is for

Array<object>
>= 1 items <= 25 items

One item of a strategy. Exactly one of source, assumption, waitingOn - none, or two, and the strategy does not pass its checks (strategy_lint).

object
text
required

Markdown

string
>= 1 characters <= 1000 characters
source

Where an item was read. mission-source: the id of a source of this mission; requirement: the id of a requirement of the project (both checked); doc-section (docs/checkout.md#payment), screen (SCR-03 Cart), endpoint (POST /cart), url: a place in words a person can follow.

object
kind
required
string
Allowed values: mission-source doc-section screen endpoint requirement url
ref
required
string
>= 1 characters <= 300 characters
assumption

«припущення, підтвердіть»: the agent assumed it and asks a person to confirm

boolean
waitingOn

The id of a question of this mission (a review item) whose answer this part waits for; the text says what waits, never a guessed answer

string
scope
required
object
in
required

What is tested

Array<object>
>= 1 items <= 25 items

One item of a strategy. Exactly one of source, assumption, waitingOn - none, or two, and the strategy does not pass its checks (strategy_lint).

object
text
required

Markdown

string
>= 1 characters <= 1000 characters
source

Where an item was read. mission-source: the id of a source of this mission; requirement: the id of a requirement of the project (both checked); doc-section (docs/checkout.md#payment), screen (SCR-03 Cart), endpoint (POST /cart), url: a place in words a person can follow.

object
kind
required
string
Allowed values: mission-source doc-section screen endpoint requirement url
ref
required
string
>= 1 characters <= 300 characters
assumption

«припущення, підтвердіть»: the agent assumed it and asks a person to confirm

boolean
waitingOn

The id of a question of this mission (a review item) whose answer this part waits for; the text says what waits, never a guessed answer

string
out
required

What is deliberately NOT tested, and why - required

Array<object>
>= 1 items <= 25 items

One item of a strategy. Exactly one of source, assumption, waitingOn - none, or two, and the strategy does not pass its checks (strategy_lint).

object
text
required

Markdown

string
>= 1 characters <= 1000 characters
source

Where an item was read. mission-source: the id of a source of this mission; requirement: the id of a requirement of the project (both checked); doc-section (docs/checkout.md#payment), screen (SCR-03 Cart), endpoint (POST /cart), url: a place in words a person can follow.

object
kind
required
string
Allowed values: mission-source doc-section screen endpoint requirement url
ref
required
string
>= 1 characters <= 300 characters
assumption

«припущення, підтвердіть»: the agent assumed it and asks a person to confirm

boolean
waitingOn

The id of a question of this mission (a review item) whose answer this part waits for; the text says what waits, never a guessed answer

string
approach
required

How it is tested

Array<object>
>= 1 items <= 25 items

One item of a strategy. Exactly one of source, assumption, waitingOn - none, or two, and the strategy does not pass its checks (strategy_lint).

object
text
required

Markdown

string
>= 1 characters <= 1000 characters
source

Where an item was read. mission-source: the id of a source of this mission; requirement: the id of a requirement of the project (both checked); doc-section (docs/checkout.md#payment), screen (SCR-03 Cart), endpoint (POST /cart), url: a place in words a person can follow.

object
kind
required
string
Allowed values: mission-source doc-section screen endpoint requirement url
ref
required
string
>= 1 characters <= 300 characters
assumption

«припущення, підтвердіть»: the agent assumed it and asks a person to confirm

boolean
waitingOn

The id of a question of this mission (a review item) whose answer this part waits for; the text says what waits, never a guessed answer

string
profile
required

The methodology profile of the project (ADR 0074 §2)

object
levels
required

Test levels, CTFL v4.0.1 §2.2.1

Array<string>
>= 1 items unique items
Allowed values: component component-integration system system-integration acceptance
characteristics
required

Quality characteristics, ISO/IEC 25010:2023

Array<string>
>= 1 items unique items
Allowed values: functional-suitability performance-efficiency compatibility interaction-capability reliability security maintainability flexibility safety
techniques
required

Test techniques, CTFL v4.0.1 §4.2-§4.4

Array<string>
>= 1 items unique items
Allowed values: equivalence-partitioning boundary-value decision-table state-transition statement branch error-guessing exploratory checklist
split
required

Per cent by API, UI and by hand; 100 in all

object
api
required
integer
<= 100
ui
required
integer
<= 100
manual
required
integer
<= 100
notes
required

Why these levels, characteristics and techniques

Array<object>
>= 1 items <= 25 items

One item of a strategy. Exactly one of source, assumption, waitingOn - none, or two, and the strategy does not pass its checks (strategy_lint).

object
text
required

Markdown

string
>= 1 characters <= 1000 characters
source

Where an item was read. mission-source: the id of a source of this mission; requirement: the id of a requirement of the project (both checked); doc-section (docs/checkout.md#payment), screen (SCR-03 Cart), endpoint (POST /cart), url: a place in words a person can follow.

object
kind
required
string
Allowed values: mission-source doc-section screen endpoint requirement url
ref
required
string
>= 1 characters <= 300 characters
assumption

«припущення, підтвердіть»: the agent assumed it and asks a person to confirm

boolean
waitingOn

The id of a question of this mission (a review item) whose answer this part waits for; the text says what waits, never a guessed answer

string
risks
required
Array<object>
>= 1 items <= 50 items

A product risk: its likelihood and impact (the level is their product, 1-9) and the cases and requirements it links to.

object
text
required

Markdown

string
>= 1 characters <= 1000 characters
source

Where an item was read. mission-source: the id of a source of this mission; requirement: the id of a requirement of the project (both checked); doc-section (docs/checkout.md#payment), screen (SCR-03 Cart), endpoint (POST /cart), url: a place in words a person can follow.

object
kind
required
string
Allowed values: mission-source doc-section screen endpoint requirement url
ref
required
string
>= 1 characters <= 300 characters
assumption

«припущення, підтвердіть»: the agent assumed it and asks a person to confirm

boolean
waitingOn

The id of a question of this mission (a review item) whose answer this part waits for; the text says what waits, never a guessed answer

string
likelihood
required
string
Allowed values: low medium high
impact
required
string
Allowed values: low medium high
caseIds

Live cases of the project that cover it (checked)

Array<string>
<= 50 items unique items
requirementIds

Requirements of the project it is about (checked); their cases are in the matrix

Array<string>
<= 50 items unique items
entryCriteria
required

When the testing can start

Array<object>
>= 1 items <= 25 items

One item of a strategy. Exactly one of source, assumption, waitingOn - none, or two, and the strategy does not pass its checks (strategy_lint).

object
text
required

Markdown

string
>= 1 characters <= 1000 characters
source

Where an item was read. mission-source: the id of a source of this mission; requirement: the id of a requirement of the project (both checked); doc-section (docs/checkout.md#payment), screen (SCR-03 Cart), endpoint (POST /cart), url: a place in words a person can follow.

object
kind
required
string
Allowed values: mission-source doc-section screen endpoint requirement url
ref
required
string
>= 1 characters <= 300 characters
assumption

«припущення, підтвердіть»: the agent assumed it and asks a person to confirm

boolean
waitingOn

The id of a question of this mission (a review item) whose answer this part waits for; the text says what waits, never a guessed answer

string
exitCriteria
required

When it is done

Array<object>
>= 1 items <= 25 items

One item of a strategy. Exactly one of source, assumption, waitingOn - none, or two, and the strategy does not pass its checks (strategy_lint).

object
text
required

Markdown

string
>= 1 characters <= 1000 characters
source

Where an item was read. mission-source: the id of a source of this mission; requirement: the id of a requirement of the project (both checked); doc-section (docs/checkout.md#payment), screen (SCR-03 Cart), endpoint (POST /cart), url: a place in words a person can follow.

object
kind
required
string
Allowed values: mission-source doc-section screen endpoint requirement url
ref
required
string
>= 1 characters <= 300 characters
assumption

«припущення, підтвердіть»: the agent assumed it and asks a person to confirm

boolean
waitingOn

The id of a question of this mission (a review item) whose answer this part waits for; the text says what waits, never a guessed answer

string
riskLevels
required

By the index of content.risks: likelihood x impact on 1-3 each, and the priority it gives (6 and up high, 3-4 medium, below low)

Array<object>
object
level
required
integer
>= 1 <= 9
priority
required
string
Allowed values: low medium high
waiting
required

Always empty: a part of the project’s plan cannot wait on a question, which belongs to a mission. Kept so the plan reads as a mission’s strategy does

Array<object>
0
object
path
string
questionId
string
state
string
Allowed values: open answered dismissed gone
Example
{
"projectId": "u-shop::default",
"version": 3,
"savedBy": "6f1c2b3a-0000-4000-8000-0000000000a2",
"savedAt": "2026-11-14T11:00:00.000Z",
"restoredFrom": 1,
"reviewItemId": null,
"proposedBy": null,
"editedBy": null,
"content": {
"objectives": [
{
"text": "A customer can find, buy and return a product without help",
"source": {
"kind": "doc-section",
"ref": "docs/product.md#goals"
}
}
],
"scope": {
"in": [
{
"text": "The shop: search, the cart, checkout, returns and the account",
"source": {
"kind": "doc-section",
"ref": "docs/product.md#scope"
}
}
],
"out": [
{
"text": "The warehouse back office: another team owns it and tests it",
"source": {
"kind": "doc-section",
"ref": "docs/product.md#out-of-scope"
}
}
]
},
"approach": [
{
"text": "Each release: the API first, from the OpenAPI file; then the UI flows of the shop; exploratory sessions on what changed",
"assumption": true
}
],
"profile": {
"levels": [
"component-integration",
"system",
"acceptance"
],
"characteristics": [
"functional-suitability",
"security",
"performance-efficiency"
],
"techniques": [
"equivalence-partitioning",
"boundary-value",
"exploratory"
],
"split": {
"api": 50,
"ui": 30,
"manual": 20
},
"notes": [
{
"text": "The services have their own unit tests in their repositories; this plan starts at their integration",
"source": {
"kind": "url",
"ref": "https://shop.example.com/docs/testing"
}
}
]
},
"risks": [
{
"text": "A card is charged twice when the payment page is reloaded",
"likelihood": "medium",
"impact": "high",
"source": {
"kind": "endpoint",
"ref": "POST /payments"
}
}
],
"entryCriteria": [
{
"text": "A release candidate is on staging with its release notes",
"assumption": true
}
],
"exitCriteria": [
{
"text": "No open bug of high priority; every high risk has a passing case",
"source": {
"kind": "doc-section",
"ref": "docs/product.md#release"
}
}
]
},
"riskLevels": [
{
"level": 6,
"priority": "high"
}
],
"waiting": []
}

Invalid JSON or body, or code: strategy_lint - the findings of the checks, as for a mission’s strategy

Media type application/json
object
error
required
string
code
required
string
Allowed values: strategy_lint
findings
required
Array<object>
object
rule
required
string
Allowed values: source-missing basis-ambiguous question-unknown mission-source-unknown requirement-unknown case-unknown
path
required

Where: approach[0], scope.out[1], risks[2].caseIds[0]

string
message
required
string
Example
{
"error": "the test plan does not pass its checks",
"code": "strategy_lint",
"findings": [
{
"rule": "source-missing",
"path": "approach[0]",
"message": "name where this was read (source), mark it as an assumption to confirm, or say which question it waits on"
}
]
}

No / invalid token or session

You are in the project as a reader, the token is read-only, or the call is an agent’s (a bearer call with X-Plune-Session: code: agent_proposes)

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

No such project, or no such version

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

Another save took the same version at the same moment (code: test_plan_race); nothing is saved

Media type application/json
object
error
required
string
Example
{
"error": "another save of the test plan took this version at the same moment: read the plan and save again",
"code": "test_plan_race"
}

Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}
Retry-After
integer

Seconds until the window rolls over