Skip to content

Get editor data for a document

GET
/v1/documents/{slug}
slug
required
string

The document slug

Example
cybergov-charter

Document editor data

A structure that contains information about a document, including the document’s meta information

object
meta
required

The meta information of the document

object
description
required
string
latest_version
required

A version number that follows the semantic versioning scheme.

Example

# use std::str::FromStr;
# use backend::views::document::Version;
let version_str = "1.0.0";
let version: Version = Version::from_str(version_str).unwrap();
assert_eq!(version.to_string(), "1.0.0");
Array<integer>
>= 3 items <= 3 items
slug
required
string
Example
cybersecurity-policy
state
required
One of:

The document has not been initialized yet. It is possible for the document to have details, meaning that a proposal is “open” to initialize it.

object
value
required
string
Allowed values: uninitialized
title
required
string
root
required

The root node of the document

object
One of:

A representation of a all possible node types in the document. This is useful because it allows us to have a single enum that can be used in vectors

object
node_type
required
string
Allowed values: image
id
string | null
toc
required
boolean

Document not found