Rest API
Browse the content library
GET
/api/v1/wiki/tree
const url = 'https://api.unless.com/api/v1/wiki/tree?path=%2F';const options = { method: 'GET', headers: { 'x-api-key': 'example', 'x-user-email': 'example', 'x-account-id': 'example', 'x-website-id': 'example' }};
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://api.unless.com/api/v1/wiki/tree?path=%2F' \ --header 'x-account-id: example' \ --header 'x-api-key: example' \ --header 'x-user-email: example' \ --header 'x-website-id: example'List the content library (wiki) entries directly under a path. Call it repeatedly to walk the tree.
Notes
- Scoped to the workspace in
x-website-id - A very wide directory is cut short and the response carries
truncated: true
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”x-api-key
required
string
Your API key from account settings.
x-user-email
required
string
The email address of your user.
x-account-id
required
string
The ID of your account. You can find this in the account settings.
x-website-id
required
string
The ID of the workspace you want to use.
Query Parameters
Section titled “Query Parameters”path
string
Directory to list. Defaults to the root, /.
Responses
Section titled “Responses”The entries under the path.
Media typeapplication/json
object
path
string
children
Array<object>
object
truncated
Present and true only when the listing was cut short.
boolean
Example generated
{ "path": "example", "children": [ {} ], "truncated": true}Unauthorized - invalid API key.
Not found - the website does not belong to the account.
Bad request - missing websiteId.