{"path":"/link_tree","session":"Send the session id as JSON field session or as cookie session. The session id is never returned.","actions":{"list":"Needs a session with FILE READ or SUPER_ADMIN. Lists this brand's redirects. Optional path is a prefix filter. include_live true also returns live path registrations (target is empty). Optional limit, 1 to 500, default 100. Returns ok and entries.","read":"Needs a session with FILE READ or SUPER_ADMIN, and id or path. Returns ok and entry.","create":"Needs a session with FILE CREATE or SUPER_ADMIN, plus path and target. target is a same-brand path or an http(s) URL. Optional status 301 or 302 (default 301). Refused if a file already lives at path (the real file wins). Existing redirects that targeted path are collapsed onto the new target. Returns ok and entry.","update":"Needs a session with FILE UPDATE or SUPER_ADMIN, and id or path. Sent fields replace the old ones (target, status, and/or a new path). Returns ok and entry.","delete":"Needs a session with FILE DELETE or SUPER_ADMIN, and id or path. Removes that row only. It does not delete the file."},"notes":"/files create, update, delete and move maintain this table automatically: every uploaded path is registered; a rename or move writes a 301 from the old path to the new one and collapses chains; a delete drops the live registration and does not create a redirect. 404.php looks up a missing path and sends the row's status (301 or 302). Manual rows are for extra redirects, including to an http(s) URL.","status":[301,302],"javascript":"const res = await fetch('/link_tree/', { method: 'POST', credentials: 'include', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ action: 'list', session: 'SESSION_ID' }) }).then(r => r.json());"}