captionbob docs

Version 1.0.0
Contents ↓

HTTP API

Account routes

The routes of the dashboard login, the logout, the caller, and the API keys of the caller.

Source file: captionbob_server/account_routes.js

POST /api/login

Access: none. A route that anyone may call, such as the login.

POST /api/login with {"userName", "password"}. A good login sets the session cookie.

POST /api/logout

Access: none. A route that anyone may call, such as the login.

POST /api/logout. Ends the session of the cookie, if there is one, and removes the cookie.

GET /api/me

Access: any. A route that a dashboard login or an API key may call.

GET /api/me. The caller, by a login or by an API key.

GET /api/keys

Access: session. A route that only a dashboard login may call, such as the key routes.

GET /api/keys. The API keys of the caller, with no keys and no hashes.

POST /api/keys

Access: session. A route that only a dashboard login may call, such as the key routes.

POST /api/keys with {"name"}. A new key, which this answer shows one time only.

DELETE /api/keys/:keyId

Access: session. A route that only a dashboard login may call, such as the key routes.

Path values: keyId.

DELETE /api/keys/:keyId. Revokes a key of the caller.