The tree as one Markdown document
const url = 'https://beta-api.plune.ai/v1/test-cases/markdown?state=draft';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://beta-api.plune.ai/v1/test-cases/markdown?state=draft' \ --header 'Authorization: Bearer <token>'Every case the caller owns, as text/markdown (D9): cases in no suite first, then each suite in tree order with its cases by position. The bin is not in it. suiteId keeps one node’s subtree (and drops the unfiled cases — they are nobody’s subtree); state, repeatable, keeps cases of those states. Read the document with POST /v1/test-cases/markdown after editing it anywhere; plune pull writes it to a file.
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, type may be eval, state is written for the eye and only read back as a warning, spec carries an automated case’s specRef; ## 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 ”A folder or suite — the document is its subtree.
Repeat for more than one.
Responses
Section titled “ Responses ”The document. X-Plune-Cases counts the cases in it; Content-Disposition names it cases.md.
Headers
Section titled “Headers ”Example
inline; filename="cases.md"No / invalid token or session
No such node in the caller’s project
object
Example generated
{ "error": "example"}