-
Notifications
You must be signed in to change notification settings - Fork 0
API
Most of Sliproad's focus is API-first, with the frontend being a personal implementation for ease-of-access.
Directory
Files contains a collection of File data.
{
"Path":"string",
"Files":[]
}File data
IsDirectory will be true or false.
{
"IsDirectory": false,
"Name":"README.md",
"Extension":"md"
}Providers
["provider"]GET /api/providers
Fetches a list of valid providers that have been configured.
curl http://localhost:3000/api/providers
GET POST /api/files/{provider}
GET fetches the contents of the "root" directory for the provider.
curl http://localhost:3000/api/files/disk
POST data will attempt to be parsed as a multipart form, looking for a file: field containg the file in question.
curl -X POST -F [email protected] http://localhost:3000/api/files/disk
GET POST /api/files/{provider}/{directory/filename}
GET fetches the contents of the directory or the file contents when possible.
curl http://localhost:3000/api/files/disk/Documents
POST data will attempt to be parsed as a multipart form, looking for a file: field containg the file in question.
curl -X POST -F [email protected] http://localhost:3000/api/files/disk/Documents
GET POST /api/auth/callback
Used as a callback for authentication providers. GET will produce JavaScript for creating a POST request back to the endpoint, which will then set a JWT token as an HTTP-only cookie.