Octri

docs redirects

Lists your redirect rules, marking the ones that came from renaming a page. This writes to the navigation draft, which also holds the home page and redirects. Readers see none of it until octri docs nav publish, the same as Publish in API Studio. See redirects for how rules match.

bash
octri docs redirects [list | add <from> <to> | remove <from>]

octri docs redirects add <from> <to>

Drafts a rule sending one address to another. A rule for the same <from> is replaced rather than duplicated.

Arguments

<from>stringrequired

The old address. A trailing * matches the rest of the path.

<to>stringrequired

Where to send it. A trailing * carries the matched part across.

octri docs redirects remove <from>

Drafts removing the rule for <from>. It fails if there's no such rule, so a typo can't quietly do nothing.

Arguments

<from>stringrequired

The rule's old address.

Examples

Move a whole section

bash
octri docs redirects add /v1/* /v2/*
Output
✔ Drafting redirect
✔ Drafted /v1/* → /v2/*
  octri docs nav publish: send the draft live

List rules

bash
octri docs redirects
Output
✔ Loading redirects

Redirects (1) unpublished draft
  FROM              TO
  ────────────────  ────────────────
  /v1/*             /v2/*
  octri docs nav publish: send the draft live