Skip to content

REST API

Docs: 5 routes.

All under /wp-json/davo/v1. Every route has a description in the source.

  • GET4
  • POST2

/docs/cache/flush

POSTAccess check: require_manage_docs

Flushes the docs cache.

Handler: flush_cache()

No parameters declared in the route registration.

curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/docs/cache/flush"

src/domains/docs/routes.php:150

/docs/navigation

GETPublic

Returns the docs navigation tree for the current user. expand is a comma-separated list of collection ids to keep open.

Handler: get_navigation()

Parameters of GET /docs/navigation
ParameterTypeRequiredDefault or allowed values
expandstringNo(empty)
curl
curl "https://example.com/wp-json/davo/v1/docs/navigation"

src/domains/docs/routes.php:62

/docs/navigation/collections/{id}

GETPublic

Returns the articles in one collection for the docs navigation.

Handler: get_navigation_collection()

Parameters of GET /docs/navigation/collections/{id}
ParameterTypeRequiredDefault or allowed values
idintegerYes—
curl
curl "https://example.com/wp-json/davo/v1/docs/navigation/collections/{id}"

src/domains/docs/routes.php:81

/docs/page

GETPublic

A 404 with davo_docs_unresolved means the address is not documentation content; the client should then navigate normally.

Handler: get_page()

Parameters of GET /docs/page
ParameterTypeRequiredDefault or allowed values
urlstringYes—
fromintegerNo0
curl
curl "https://example.com/wp-json/davo/v1/docs/page?url=…"

src/domains/docs/routes.php:100

/docs/settings

GETAccess check: require_manage_docs

Returns the docs settings state for the admin.

Handler: get_settings()

No parameters declared in the route registration.

curl
curl -u "user:application-password" "https://example.com/wp-json/davo/v1/docs/settings"

POSTAccess check: require_manage_docs

Updates the docs settings and returns the new state.

Handler: update_settings()

No parameters declared in the route registration.

curl
curl -X POST -u "user:application-password" "https://example.com/wp-json/davo/v1/docs/settings"

src/domains/docs/routes.php:133

Note. Generated from the plugin source. Parameters are the ones declared when the route is registered; a parameter marked “see source” uses a shared definition. Responses are not documented here. Authenticate as for any WordPress REST route, for example with an application password over HTTPS; the example paths use https://example.com.

See it on your own site.

Davo is a WordPress theme and plugin by Exorex.

  • Runs on your own WordPress
  • Guided setup wizard
  • AI is off until you switch it on
  • Read the licence on the marketplace first