52 Commits
Author SHA1 Message Date
Jérémy Lecour cc174a0a68 Add a Pinboard importer 2026-03-06 08:23:45 +01:00
clmt b9948ac95d Correct a typo in docs for bookmark highlight API 2026-01-30 17:36:27 +01:00
Olivier Meunier f721f34b86 Improved POST cookbook/extract with HTML content
- use the new resource loader on the "data" parameter
- when provided, this parameter sets the provided URL content
2026-01-08 15:02:36 +01:00
Olivier Meunier c8b364a55d Updated POST /api/bookmarks documentation 2026-01-08 10:05:15 +01:00
Olivier Meunier eea6695837 Extend bookmark update API
This adds the following fields to PATCH /api/bookmarks/{id}:

- description
- site_name
- authors
- published
- language
- text direction

Resolves #932
2025-12-15 20:00:24 +01:00
Olivier Meunier 58b5ecc081 Merge branch 'release' 2025-12-09 15:11:22 +01:00
Olivier Meunier 86e760971d Enforcing some forms.MaxLen on string inputs
Based on the schema for varchar columns or sensible defaults for other
values.

Updated the API schemas with the new values.
2025-12-09 14:18:23 +01:00
Olivier Meunier 0e05de6f48 Return an error list when bookmark filters contain errors
Filters are retrieved in withBookmarkListSelectDataset but we can check
if there's a template context so we know if we can return an error
straight away in an API route.
In a view, the form is attached to the template context and errors are
already visible on the result.

Also removed the server.Server pointer in apiRouter, it hasn't been
needed for a long time now.

resolves #975
2025-12-03 16:50:09 +01:00
Olivier Meunier ccd6a75a42 Minor updates on the OAuth API documentation 2025-11-17 22:02:25 +01:00
Olivier Meunier e8ea83344e Minor fixes to oauth documentation
- Removed response fields from DCR
- Accept header on device code example
2025-11-05 11:36:54 +01:00
Olivier Meunier 2441f2eafb API documentation update for the new DCR and DCM removal 2025-11-02 17:59:50 +01:00
Olivier Meunier 1b0c6b1a61 OAuth Device Code API documentation 2025-10-30 07:43:53 +01:00
Olivier Meunier 8162d69d93 Better oauth sequence diagrams in API documentation
Diagrams go in pre[role=img] blocks with:

- aria-labels
- css rules (overflow-x and pre white spaces)
2025-10-29 13:10:11 +01:00
Olivier Meunier ba6eb10f54 Added details to the /info route API documentation 2025-10-29 07:18:52 +01:00
Olivier Meunier 2c6fae9acb More API documentation improvements
- use "details" elements on code examples and flows
- added a custom style in RapiDoc for details in markdown content
- improved bookmark sync and oauth documentation
2025-10-28 11:45:52 +01:00
Olivier Meunier 7291902a38 Added oauth badges on routes
- added oauth scopes on relevant routes
- some markdown formatting
2025-10-28 11:45:51 +01:00
Olivier Meunier df3a0d6318 Updated the API documentation for the new tooling.
- split the massive bookmarks/routes.yaml into several files
- moved big markdown contents to individual files
- moved the OAuth documentation to the API description
- fixed a few minor bugs with schemas
- added a "data" definition to file-based import routes
2025-10-28 11:45:51 +01:00
Olivier Meunier 06244274b0 Added a feature list to the /info route
This adds a "features" list in the /info response, which might be much
easier to use than version comparison.

This also advertise whether email sending is available.
2025-10-24 18:23:04 +02:00
Olivier Meunier 5984abe9ed API Documentation for OAuth routes.
This removes the /api/auth route documentation.
2025-10-24 18:23:04 +02:00
Olivier Meunier 757b4c1bb6 Renamed "scoped_*" roles
- scoped_bookmarks_r -> bookmarks:read
- scoped_bookmarks_w -> bookmarks:write
- scoped_admin_r -> admin:read
- scoped_admin_w -> admin:write

Added a profile:read scope and api:profile:info permission.
profile:read gives access to api:profile:read permission, while
api:profile:info is always granted to authenticated users.

The /api/profile route is always accessible but only returns the
full user profile (email and settings) when api:profile:read is granted.

The /api/auth route will convert the old "scoped_*" roles to their new
names so clients using this route remain compatible for a while.
2025-10-24 16:44:22 +02:00
Olivier Meunier 03f233aa5a API documentation improvements
- Moved method to "routes.yaml" files; it simplifies the api.yaml contents
- Presentation options
- Some API documentation fixes here and there
- Switch to "view" render-style when screen width is less than 814px
  resolves #653
2025-09-30 07:05:45 +02:00
Olivier Meunier 86853f570d Fixed typos in contentscripts README and in API docs 2025-08-24 15:51:34 +02:00
Olivier Meunier 58754c0416 Routes to label information using query parameter
A label can be anything and this means you can't always use it as a
path parameter. A label "#/../test" is perfectly valid but, even with
path escaping, it fails in a browser.

We now use the same route ("/labels") for label operations and split
the middlewares and handlers based on the presence of a "name" parameter
in the request URL.

resolves #277 once and for all
2025-07-26 10:48:15 +02:00
Mislav Marohnić aa095205ee cookbook api: improve documentation
- Document the POST usage for the `cookbook/extract` API
- Document the GET `cookbook/urls` API
2025-07-04 23:19:58 +02:00
Olivier Meunier 6afa20fd3d sync route improvements
- added a Last-Modified header on JSON, html and markdown part
- added a Location header to every "resource" part
- added a Group header to "resource" parts. A Group can be:
  - icon
  - image
  - thumbnail
  - embedded
- Added the Content-Length of every resource part
- when resource_prefix is empty, resource URLs become absolute, as they
  would appear on a request to /api/bookmarks/{id}/article
2025-07-04 23:16:42 +02:00
Olivier Meunier f18daef139 Added a created field to bookmark create from the API.
This lets a user sets the creation date to any valid date, which could
be useful for a homemade import procedure.

Guards some of the creation form's parameters in the context of the
bookmark's view.
2025-06-26 19:10:27 +02:00
Olivier Meunier f6bad0b95b Fixed description of "time" field in /api/bookmarks/sync documentation 2025-06-26 12:10:38 +02:00
Olivier Meunier e24f78c1e9 Added a sort parameter to POST /api/bookmarks/sync
Can sort by updated and/or created values of the bookmark list.
2025-06-26 06:16:38 +02:00
Olivier Meunier f6438e5d8d Section labels and order in API documentation 2025-06-25 07:21:55 +02:00
Olivier Meunier 6639b57de7 Markdown export in sync route.
When with_markdown is true, the response includes a Markdown version
of each exported bookmark.
2025-06-24 20:29:23 +02:00
Olivier Meunier 95ec04e86f Sync route API documentation 2025-06-24 20:29:23 +02:00
Olivier Meunier e0aced2888 Updated API documentation with missing import routes 2025-06-24 19:38:03 +02:00
Olivier Meunier 4b4b0a93c2 Returns server info from GET /info.
It returns the canonical, release and build number. This can be useful
in order to target a release without any build number.
2025-06-15 21:01:58 +02:00
Olivier Meunier dd1f6b45c0 Added /api/bookmarks/sync route.
This route return a minimal, non-paginated, list of bookmark IDs and
their creation and update dates.

Resolves #524
2025-06-11 21:51:09 +02:00
Olivier Meunier b052224ee5 Added bookmarkItem.OmitDescription
This new field is true when the description is found at the beginning
of the bookmark's plain text content. It doesn't have to be at the very
start but somewhere in len(description)*3

This adds a "omit_description" field to the api/bookmarks/{id} route.

Resolves #378
2025-06-11 21:36:23 +02:00
Olivier Meunier 6726e15251 Added bookmark sharing API routes documentation
Resolves #621
2025-06-01 16:59:53 +02:00
Olivier Meunier 69477184ac Fixed href value in label list and info.
- simplified the label query
 - fixed href value
 - added href_bookmarks on each label
 - updated API documentation

 resolves #531
2025-04-30 19:17:51 +02:00
eleith 658ebebac0 add word_count to bookmark api (#392)
the wordcount field is only exposed in the UI in various places. however, the
underlying field `word_count` is not exposed in the UI nor the API.

this PR exposes this field on the bookmarks api, to enable access for those wanting to get an the underlying metadata in their applications.

closes #392

Reviewed-on: https://codeberg.org/readeck/readeck/pulls/392
Reviewed-by: olivier <olivier@noreply.codeberg.org>
Co-authored-by: eleith <eleith@noreply.codeberg.org>
Co-committed-by: eleith <eleith@noreply.codeberg.org>
2025-01-14 17:10:05 +00:00
Olivier Meunier ab3894f7bc Added a PATCH method on bookmark annotations.
This lets us change an annotation's color.
Added and fixed API documentation for it.
2024-12-28 10:00:40 +01:00
Olivier Meunier f30f3a580f Added tests and API documentation for type and read_status filters 2024-12-04 08:20:52 +01:00
Olivier Meunier d1841de71c Added the progress values to the API
- returns read_progress in bookmark list
- returns read_progress and read_anchor in bookmark info
- accept read_progress and read_anchor in bookmark update
2024-11-30 18:13:35 +01:00
Olivier Meunier f9c7585fed Added is_loaded, has_errors and has_labels bookmark filters.
API part.
2024-11-08 08:22:00 +01:00
Olivier Meunier 126d9560a3 Added API documentation for updated_since in bookmark list filters 2024-11-08 08:05:58 +01:00
Olivier Meunier d58c7a5f18 Added sort parameter in API documentation 2024-07-12 23:45:43 +02:00
Olivier Meunier 3d27764f6d Updated layout, breadcrumb on docs, better API documentation
- Changed from padding to margin in .layout-content block in order
  to keep a consistent width when it receives max-w-std
- Added breadcrumbs on all documentation views
- API documentation layout consistency
- Fixed API documentation for POST /auth and GET /profile
2024-04-24 07:41:30 +02:00
Olivier Meunier a1f12419c1 Added bookmark import routes to API documentation 2024-04-20 10:46:28 +02:00
Olivier Meunier c816a7bf15 Added examples for API /auth and /profile routes 2023-12-20 10:08:55 +01:00
Olivier Meunier 17d35f6003 API authentication and user profile documentation 2023-12-20 09:54:25 +01:00
Olivier Meunier aecd49306f Bookmark related API documentation
- /api/bookmarks/labels
- /api/bookmarks/annotations
- /api/bookmarks/collections
- reverted rapidoc to the previous version (try out wasn't working)
2023-12-20 09:07:13 +01:00
Olivier Meunier b956cd92c9 Added documentation for the /api/cookbook/extract route 2023-11-05 12:45:57 +01:00