External Storage Adapter
This connector allows integrating external applications that act as API gateway into MyQ to add support for new cloud or network storages.
For the Web UI configuration see External Storage API
Connection details
URL - URL on which the application is listening
Login & Password - for authentication
Example usage
A third-party application uses their own storage. We want to set MyQ to be able to scan to this storage.
An API gateway is developed and installed on a server.
In MyQ, a connector is created and pointed at this application.
The API gateway understands and maps API calls from one service (MyQ) to the other (e.g. remote file storage).
API specification
This is an OpenAPI 3.0.0 specification for an API related to External storage adapter.
The API uses basic authentication through the basicAuth security scheme.
The API has four endpoints:
Endpoints | Description |
---|---|
| returns a list of elements in the specified path |
| downloads a file at the specified id |
| uploads a file to the specified folder |
| deletes the file at the specified path |
Parameters used are:
Parameters | Example | Description |
---|---|---|
|
| name of the relevant user |
|
| relative path + name of the file |
|
| relative path to folder |
Result example
{
"items": [
{
"id" : "folder/subfolder",
"name": "SomeFolder",
"kind": "dir",
"lastModified": 1676469867,
},
{
"id" : "folder/subfolder/somefile.pdf",
"name": "somefile.pdf",
"kind": "file",
"fileSize": 132345,
"lastModified": 1676469867,
"mimeType": "application/pdf"
}
],
"count": 2
}
File download
The GET request to GET /files/{username}/{fileId}
downloads a file at the specified fileId
. The response is the file content.
File upload
The POST request to POST /files/{username}/{fileId}
uploads a file to the specified folder. The request must include an application/octet-stream
request body with the file content. The response is a 201 Created status code.