General
Introduction
This documentation describes the routes and functionalities of the API. The API allows for file and directory management, dynamic module (cog) loading, and data manipulation in a JSON database. The API is divided into two main sections: one that requires an API Key and another that does not. Routes requiring an API Key are protected and limited to a maximum number of requests per minute.
The base domain of the API is https://api.adeptusstudio.com
.
Part 1: Routes That Do Not Require an API Key
Get Directory Exploration
GET /explorer
Description: Retrieves the list of files and directories in a specific path.
Example URL:
https://api.adeptusstudio.com/explorer?path=/Launcher/
Query Parameters:
path
(optional): The path of the directory to explore.
Response:
Field | Type | Description |
---|---|---|
files | Array | List of files and directories |
path | String | Explored path |
Example Response:
{
"files": [
{
"name": "example.txt",
"type": "file",
"size": 1024,
"date": "2023-08-06T12:34:56.789Z"
},
{
"name": "folder",
"type": "directory"
}
],
"path": "/Launcher/"
}
Get File Content
GET /explorer/file
Description: Retrieves the content of a specific file.
Example URL:
https://api.adeptusstudio.com/explorer/file?path=/Launcher/db.json
Query Parameters:
path
: The path of the file to retrieve.
Response:
200 OK
with the file content.400 Bad Request
if the path is not a file.404 Not Found
if the file does not exist.500 Internal Server Error
in case of a server error.