Skip to content

keepl-ink/docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Documentation

Interfaces

SavedUrl

interface SavedUrl {
	url: string;
	title: string
	savedAt: number;
}

API Contract

All API routes are prefixed by the configured Backend URL

GET /api/extension/verify

This route gets called when a new backend url gets sets, so that the validity/existance of the server can be confirmed. When auth is implemented, the API Key can be provided via X-API-Key header or via Bearer Token Auth.

Body is ignored. Any non-2xx response is treated as a configuration error and is shown as error to the user.


GET /api/keeps

Called on every given interval on initial sync.

Response Body

{
  count: number,
  items: SavedUrl[]
}

POST /api/keeps

Called every time a page is saved. Use this to index the page on the backend (e.g. fetch content, generate embeddings, persist to a DB).

Request body

{
  url:     string;  // full URL        — "https://example.com/article"
  title:    string;  // page <title>    — "My Article | Example"
  savedAt: number;  // Unix ms         — 1711234567890
}

Response 200 OK

Body should be ignored by the extension.


DELETE /api/keeps/:url

Called every time a saved page is removed. :url is the full URL, url-encoded.

Example

DELETE /urls/https%3A%2F%2Fexample.com%2Farticle

Response 200 OK or 204 No Content

Body is ignored.


About

Documentation for API and stuff

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages