A Markdown document back — create, update, report
const url = 'https://beta-api.plune.ai/v1/test-cases/markdown';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'text/markdown'}, body: '<!-- test\nid: 6f1c2b3a-0000-4000-8000-0000000000c1\ntype: automated\npriority: high\nstate: draft\nspec: e2e/catalog/search.spec.ts:9\n-->\n## search by sku, the exact match first @smoke @catalog\n\nThe exact match sits first; near matches follow.\n\n<!-- test\ntype: manual\npriority: normal\n-->\n## empty cart says so @cart\n\n## Steps\n\n* Open the cart with nothing in it\n *Expected*: «Your cart is empty» and no checkout button\n'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://beta-api.plune.ai/v1/test-cases/markdown \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: text/markdown' \ --data '<!-- testid: 6f1c2b3a-0000-4000-8000-0000000000c1type: automatedpriority: highstate: draftspec: e2e/catalog/search.spec.ts:9-->## search by sku, the exact match first @smoke @catalog
The exact match sits first; near matches follow.
<!-- testtype: manualpriority: normal-->## empty cart says so @cart
## Steps
* Open the cart with nothing in it *Expected*: «Your cart is empty» and no checkout button'The same document, edited anywhere, read back (D9). Each <!-- test --> block is matched by its id: known — the case is updated (title, texts, priority, body, and its suite when the document has suite blocks); absent — a new draft in the suite of the block it sits under, last; unknown — refused by line. Nothing is deleted: a case or suite the document does not name is not touched. A case’s type never changes this way, and state: is only read back as a warning — states move through their own action. A block (case or suite) with an id and an updatedAt is written only if it still has that updatedAt: one saved by someone since the document was pulled is refused by line (changed since this document was pulled — pull again and reapply your edit), with ?dryRun=true too, and nothing of it is written; a block the case already agrees with is unchanged whatever its updatedAt. A block with an id and no updatedAt (a document written by hand, or pulled before this existed) is written over the case or suite as it stands, and a warning says so; an updatedAt that is not a time is refused as updatedAt is not a timestamp — pull again. A case or suite named by more than one block is judged at the first; the others are refused (the same case appears more than once in this document), in a dry run too. A document with no suite block moves nothing, so a single case pasted back keeps its suite. Suite blocks are matched by id, else by their path — missing segments are created (folders, then the suite), each with a warning. Each write is its own transaction, as in bulk: what was done before a refusal stays done, and the report says which was which. ?dryRun=true gives the same report and writes nothing — plune push shows it before writing. The one refusal that comes before any write: a document whose blocks with no id would take the project past its case limit is answered 429 — the message a create gives a full project, then how many cases the document makes — and nothing is written, no folder or suite either; ?dryRun=true is refused the same.
Format. Testomat’s Classical Tests Markdown Format, verbatim, plus Plune’s columns: <!-- suite --> / <!-- test --> blocks with key: value metadata, the title as the first #/## heading after the block (its @tags are the tags), ## Steps with *Expected*: under each step, <!-- example --> tables. Cases before the first suite block are in no suite; a nested suite is its path in the title, # apps > web > checkout.spec.ts. Plune’s columns: id is the record’s UUID, updatedAt is that case’s (or suite’s) updatedAt when the document was written (the base version a push holds it to), type may be eval, state is written for the eye and only read back as a warning, spec carries an automated case’s specRef, flaky: true and muted: true are the case’s flags (written only when set; a block that leaves one out keeps the case’s, false clears it, and anything but true/false refuses the block), estimate: 1h 30m is the case’s time estimate (#1881; written only when set; a block that leaves it out keeps the case’s, one that is not an estimate refuses the block); ## Preconditions, ## Expected result, ## Prompt and ## Assertions (a JSON array) are the body. The full reference: https://docs.plune.ai/platform/cases/markdown/.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Report only; nothing is written, not even the folders of a new path.
Request Body required
Section titled “Request Body required ”Example
<!-- testid: 6f1c2b3a-0000-4000-8000-0000000000c1type: automatedpriority: highstate: draftspec: e2e/catalog/search.spec.ts:9-->## search by sku, the exact match first @smoke @catalog
The exact match sits first; near matches follow.
<!-- testtype: manualpriority: normal-->## empty cart says so @cart
## Steps
* Open the cart with nothing in it *Expected*: «Your cart is empty» and no checkout buttonResponses
Section titled “ Responses ”The report, when the body is a document and the project has room for its new cases; refusals of single blocks are inside it.
What a Markdown push did, block by block (D9). 200 when the body is a document the project has room for: refused names each block that could not become a case, with the line it starts on and the reason (a case saved since the document was pulled is one of them); warnings are the lines the reader skipped over (a Testomat id, a labels: key, an examples table), what was created on the way (a folder, a suite), a state: that was not applied, and a block with an id and no updatedAt that replaces the case or suite as it stands. With dryRun the same report, nothing written.
object
object
Absent on a dry run for a case that would be created.
1-based line of the <!-- test that opens the block.
object
Absent on a dry run for a case that would be created.
1-based line of the <!-- test that opens the block.
object
Absent on a dry run for a case that would be created.
1-based line of the <!-- test that opens the block.
object
object
object
object
object
Example
{ "dryRun": false, "created": [ { "id": "6f1c2b3a-0000-4000-8000-0000000000c2", "title": "empty cart says so @cart", "line": 12 } ], "updated": [ { "id": "6f1c2b3a-0000-4000-8000-0000000000c1", "title": "search by sku, the exact match first @smoke @catalog", "line": 1 } ], "unchanged": [], "refused": [], "suites": { "created": [], "updated": [] }, "warnings": [ { "line": 1, "message": "the block has no base version (`updatedAt:`) — its fields replace the ones the case or suite has now, whatever was saved since the pull; pull again to get one" } ]}An empty body
object
Example generated
{ "error": "example"}No / invalid token or session
Over 10 MB
object
Example generated
{ "error": "example"}A body that is not text/markdown (or text/plain)
object
Example generated
{ "error": "example"}Two refusals share this status, and what to do about them is opposite. Rate-limited — the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442, #2092): Retry-After carries the seconds until the window rolls over, and waiting that long is the way out. Quota reached — a ceiling on what the project holds (runs in the last 24 hours, test cases, items waiting in the review queue, rules in force in the project’s memory): { error, quota }. A retry straight away frees nothing, so do not loop on it; the message says what makes room — deleting cases, working the queue down, an operator raising the limit — and the run quota, a rolling 24 hours, frees its oldest runs as they age out. Tell the two apart by the body: a 429 whose body has a quota object is a quota, one without it is a throttle. quota carries kind, limit, used, remaining and resetsAt: the figures behind the sentence, and for the run quota the instant its oldest run ages out (#1258). Retry-After is sent on a quota only where there is such an instant (the run quota: the whole seconds, at least 1, until resetsAt); the case, review-queue and project quotas free only by an action, have resetsAt: null, and send no Retry-After. GET /v1/quotas reads the same figures without a refusal.
object
The body of a 429 that is a quota and not a throttle: the sentence, and the figures behind it.
object
What was reached and the way out.
object
The ceiling. A write that would take used past it is refused with 429.
What the project holds now, counted by the same query that refuses a write.
limit - used, never below 0.
When the oldest counted run ages out of the rolling 24 hours and a slot frees on its own. null for the two quotas only an action frees (delete cases, decide queue items), and for a run quota with no runs in the window.
Examples
A throttle: no `quota`; wait `Retry-After`
{ "error": "rate limit exceeded — slow down"}A quota (#2458): the MCP server ceiling; `resetsAt` is null, nothing frees it by waiting
{ "error": "MCP server quota reached — at most 50 servers per project, and a server cannot be removed yet. Ask an operator to raise the limit.", "quota": { "kind": "mcpServersPerProject", "limit": 50, "used": 50, "remaining": 0, "resetsAt": null }}Headers
Section titled “Headers ”Seconds until the window rolls over on a throttle; on a quota, until quota.resetsAt — sent only for the run quota, which has one