diff options
author | metamuffin <metamuffin@disroot.org> | 2024-01-25 19:04:29 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-01-25 19:04:29 +0100 |
commit | 7ded0f89080275d9a59e5155e1459ad7bf28509b (patch) | |
tree | 92cc7d92e8c1635fb2f5a4f4dab64d0ab9805a15 /api.md | |
parent | cd6b484d24b638f08221ff1388564d8369d37126 (diff) | |
download | jellything-7ded0f89080275d9a59e5155e1459ad7bf28509b.tar jellything-7ded0f89080275d9a59e5155e1459ad7bf28509b.tar.bz2 jellything-7ded0f89080275d9a59e5155e1459ad7bf28509b.tar.zst |
more doc + api
Diffstat (limited to 'api.md')
-rw-r--r-- | api.md | 41 |
1 files changed, 0 insertions, 41 deletions
@@ -1,41 +0,0 @@ -# Jellything API - -Most endpoints require the `Accept` header to be present and set to -`application/json`. Any endpoint returning JSON, will report errors with an -object containing error string in the `error` key. Routes marked with `*` -require authentification. - -The `jellyclient` crate already implements most API functionality. The -`jellycommon` crate provides useful structs for deserializing data (also -reexported in jellyclient). - -```toml -# Cargo.toml -[depedencies] -jellyclient = { git = "https://codeberg.org/metamuffin/jellything.git" } -``` - -## GET `/api/version` - -Returns API version number. - -## POST `/api/create_session` - -Request body contains JSON with keys `username`, `password`, `expire` (in -seconds) and `drop_permissions` (a list of permissions, that this session cannot -use). The Response contains the session cookie as a string in JSON. - -## GET* `/n/<id>` - -Request a library node (either a directory or item). Returns it as `NodePublic`. - -## GET* `/n/<id>/asset?<role>&<width>` - -Where `role` is one of `backdrop` or `poster` and `width` is the width of the -resolution you want to image to be in. The actual returned resolution must not -be exactly what you requested. Returns assets for a node. - -## GET* `/stream/<id>?<format>&<index>&<profile>&<index>&<tracks>&<webm>` - -Responds with the stream directly or a redirect to the actual source in case of -federation. |