Skip to main content
Skip table of contents

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

  1. A third-party application uses their own storage. We want to set MyQ to be able to scan to this storage.

  2. An API gateway is developed and installed on a server.

  3. In MyQ, a connector is created and pointed at this application.

  4. 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

GET /folders/{username}/{pathId}

returns a list of elements in the specified path

GET /files/{username}/{fileId}

downloads a file at the specified id

POST /files/{username}/{fileId}

uploads a file to the specified folder

DELETE /files/{username}/{fileId}

deletes the file at the specified path

Parameters used are:

Parameters

Example

Description

{username}

user1

name of the relevant user

{fileId}

folder%2Fsubfolder%2Ffile.txt

relative path + name of the file

{pathId}

folder%2Fsubfolder

relative path to folder

Result example

CODE
{
  "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.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.