Drive
Keep a file out of search
POST/api/v1/drive/files/:id/private
Who can use this: Any signed-in accountAs Markdown
Private means only that the file stops coming back from a search. It isn't hidden or deleted; it stays in its folder and still downloads. Search catches up on its next indexing pass, not at once, as notice says.
Parameters
| Name | Where | What it is |
|---|---|---|
| id required | path | The file's id.e.g. 42 |
| private | query | 0 (or false, no, off) to let search find it again. Leave it out, or send 1, to make it private. |
Good to know
- A file inside a private folder stays out of search even when the file itself isn't marked.
- A file that isn't yours, or is in Trash, answers 404.