GET /knowledge
Updated Oct 1, 20261 minute read
Get the library
The whole library at once: every folder and every document, sorted as arranged. Bodies stay home; read one with GET /knowledge/documents/{id}.
Part of Knowledge.
Responses
| Status | Description |
|---|---|
200 | Folders and documents. |
401 | The bearer token is missing, revoked, or expired. |
429 | Too many requests. Wait the seconds in Retry-After. Limits depend on the plan. See rate limits. |
200 body
| Field | Type | Required | Description |
|---|---|---|---|
folders | object[] | No | |
folders[].id | string | No | |
folders[].name | string | No | |
folders[].description | any | No | |
folders[].iconUrl | any | No | |
folders[].parentId | any | No | |
folders[].order | number | No | |
documents | object[] | No | |
documents[].id | string | No | |
documents[].title | string | No | |
documents[].source | "upload" | "manual" | "github" | "notion" | "web" | "learned" | No | |
documents[].status | "indexing" | "ready" | "error" | No | |
documents[].error | any | No | |
documents[].origin | any | No | A repository path, a filename, or a page URL, when it came from one. |
documents[].url | any | No | The published page a customer can open, when the document has one. Null for words with no public home, which the agent never links. |
documents[].folderId | any | No | |
documents[].order | number | No | |
documents[].updatedAt | integer | No |
Example request
curl https://api.median.sh/v1/knowledge \
-H "Authorization: Bearer $BEARER_AUTH"