diff --git a/README.md b/README.md index f38b08c..e6b7c4b 100644 --- a/README.md +++ b/README.md @@ -1,72 +1,10 @@ -## Note for Visitors -* This README mainly contains information for operation but not usage. API documentation is available [here](https://enstrayed.com/posts/20240409-API-Documentation.html). -* Have feedback or experiencing a problem with an endpoint? Please [open a GitHub issue](https://github.com/Enstrayed/enstrayedapi/issues/new). -* Security problem? [Open a ticket here](https://helpdesk.enstrayed.com/open.php) with the topic set as 'Responsible Disclosure'. +## Note for passersby +* If you have feedback or are experiencing a problem, [click here](https://enstrayed.com/helpdesk/ticket/new?form=TBD). +* If you need to report a security issue, [click here](https://enstrayed.com/helpdesk/ticket/new?form=TBD). * This code is unlicensed but I don't really care if you use parts of it (I don't know why you would though). -## Configuration - -
Configuration - -```json -{ - "oidc": { - "clientId": "nowaybuddy", - "tokenUrl": "https://login.enstrayed.com/application/o/token/", - "userinfoUrl": "https://login.enstrayed.com/application/o/userinfo/", - "authorizeUrl": "https://login.enstrayed.com/application/o/authorize/", - "clientSecret": "nowaybuddy" - }, - "email": { - "host": "orenco.enstrayed.com", - "password": "nowaybuddy", - "username": "nowaybuddy" - }, - "nowplaying": { - "cider": { - "hosts": [], - "apiKeys": [] - }, - "lastfm": { - "apiKey": "nowaybuddy", - "target": "enstrayed" - }, - "jellyfin": { - "host": "http://hawthorne.pizzly-catfish.ts.net:8096", - "apiKey": "nowaybuddy", - "target": "nathan", - "hostPublic": "https://jellyfin.enstrayed.com" - } - } -} -``` - -
- -
Komodo Files - - -```toml -[[build]] -name = "enstrayedapi" -[build.config] -builder = "local" -repo = "Enstrayed/enstrayedapi" -webhook_secret = "nowaybuddy" -``` -```toml -[[deployment]] -name = "enstrayedapi" -[deployment.config] -server = "hawthorne" -image.type = "Build" -image.params.build = "enstrayedapi" -network = "caddy" -restart = "unless-stopped" -extra_args = ["--network=postgres"] -environment = """ -DATABASE_URL=postgres://nowaybuddy:nowaybuddy@postgres:5432/api -""" -``` - -
\ No newline at end of file +## Links +* [Published API Documentation](https://enstrayed.com/posts/99999999-API-Documentation.html) +* [Internal Use Endpoints](https://git.enstrayed.com/enstrayed/enstrayedapi/wiki/Internal-Use-Endpoints) +* [Configuration Reference](https://git.enstrayed.com/enstrayed/enstrayedapi/wiki/Configuration) +* [Komodo Configuration](https://git.enstrayed.com/enstrayed/enstrayedapi/wiki/Komodo) \ No newline at end of file diff --git a/website/posts/99999999-API-Documentation.html b/website/posts/99999999-API-Documentation.html index 47340ad..bda9fe2 100644 --- a/website/posts/99999999-API-Documentation.html +++ b/website/posts/99999999-API-Documentation.html @@ -16,16 +16,14 @@ Return to enstrayed.com

API Documentation

-

This page was last updated 2025-12-12.

- - +

This page was last updated 2025-12-15.


Attention: This page is overdue for a rewrite and the information currently presented may not be accurate.

/api/nowplaying

- nowplaying.js + nowplaying.js
GET
@@ -35,7 +33,7 @@

/api/nowplayingbeta

- nowplaying.js + nowplaying.js
GET
@@ -45,7 +43,7 @@

/api/etyd/*

- etyd.js + etyd.js
GET POST @@ -66,7 +64,7 @@

/api/sendemail

- mailjet.js + email.js
POST
@@ -87,7 +85,7 @@

/ip

- ip.js + ip.js
GET
@@ -95,7 +93,7 @@

/api/headers

- ip.js + ip.js
GET
@@ -103,52 +101,17 @@

/api/auth/whoami

- auth.js:6 + auth.js
GET

Returns JSON with the username of the token owner as well as what scopes the token has access to.

-
- - auth.js:23 -
GET
-
-

Redirects the user to ECLS to login. The state parameter can be used to specify how the login flow will behave. The accepted "states" are:

-
    -
  • redirect - Redirects the user to a page after logging in. This paramter requires the destination paramter to also be set with the URL the user will be redirected to.
  • -
  • display - Displays the generated token to the user after login. Currently, this still writes the new token to the APIToken cookie, though this is planned to change.
  • -
  • close - This will close the page after logging in. This requires the page to be opened with JavaScript otherwise it will not automatically close.
  • -
-

/api/auth/logout

- auth.js:40 + auth.js
GET

Invalidates the token used to access the endpoint.

- - - - \ No newline at end of file