FileMage Gateway

Download OpenAPI specification:Download

FileMage Gateway provides a simple API to configure storage endpoints, users, and keys. Please note that all urls must end in a trailing slash, and the Content-Type header must be set to application/json.

Authentication

api_key

After registering an administrator account, go to the settings page to create a API key. Include this token in all calls to the API.

Example:

curl http://sftp.example.com/users/ -H "filemage-api-token: 43fb7437e3f231e481b262ca6d4de0c0"

Security Scheme Type API Key
Header parameter name: filemage-api-token

Endpoints

Create and manage storage endpoints.

List endpoints

Return a list of endpoint names and corresponding endpoint IDs.

Authorizations:

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create endpoint

Create a new endpoint using provided settings.

Authorizations:
Request Body schema: application/json

Endpoint configuration. Check cloud provider specific schemas for config parameters.

One of
id
integer

ID of endpoint.

name
string

Name of endpoint.

object

Settings specific to the Azure Blob Storage endpoint types.

Responses

Request samples

Content type
application/json
Example
{
  • "id": 0,
  • "name": "string",
  • "config": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0
}

Get endpoint

Return detailed endpoint settings of specified endpoint.

Authorizations:
path Parameters
id
required
integer

ID of endpoint to return

Responses

Response samples

Content type
application/json
Example
{
  • "id": 0,
  • "name": "string",
  • "config": {
    }
}

Update endpoint

Update settings of existing endpoint.

Authorizations:
path Parameters
id
required
integer

ID of endpoint to update

Request Body schema: application/json

Endpoint configuration. Check cloud provider specific schemas for config parameters.

One of
id
integer

ID of endpoint.

name
string

Name of endpoint.

object

Settings specific to the Azure Blob Storage endpoint types.

Responses

Request samples

Content type
application/json
Example
{
  • "id": 0,
  • "name": "string",
  • "config": {
    }
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "fields": [
    ]
}

Delete endpoint

Authorizations:
path Parameters
id
required
integer

ID of endpoint to delete

Responses

Users

Create and manage user accounts.

List users

Return list of all active users.

Authorizations:

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create user

Authorizations:
Request Body schema: application/json

User settings

username
string

Username.

password
string

Password.

endpointId
integer

ID of endpoint to associate with user.

email
string

The email address used for password reset and welcome emails.

disabled
boolean

Password authentication disabled.

object

Specify path, and permission level of user home directory

Array of objects (Permission)

Additional folder permissions assigned to the user.

whitelist
Array of strings

IP addresses which are allowed to connect as this user.

mfaRequired
boolean

Require multi-factor authentication to be set up before allowing user to log in.

ldap
boolean

Indicates that this user should be authneticated using LDAP.

expires
string

A timestamp in ISO 8601 format indicating when the users account should no longer be accessible.

ftpDisabled
boolean

Disable FTP protocol for this user.

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "string",
  • "endpointId": 0,
  • "email": "string",
  • "disabled": true,
  • "home": {
    },
  • "permissions": [
    ],
  • "whitelist": [
    ],
  • "mfaRequired": true,
  • "ldap": true,
  • "expires": "string",
  • "ftpDisabled": true
}

Response samples

Content type
application/json
{
  • "id": 0
}

Get user

Return detailed user settings including SSH keys.

Authorizations:
path Parameters
id
required
integer

ID of user to return

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "username": "string",
  • "endpointId": 0,
  • "disabled": true,
  • "home": {
    },
  • "permissions": [
    ],
  • "keys": [
    ],
  • "whitelist": [
    ],
  • "mfaRequired": true,
  • "ldap": true,
  • "expires": "string",
  • "otpEnabled": true
}

Update user

Update user settings not including keys. See Keys section for calls related to adding or removing keys.

Authorizations:
path Parameters
id
required
integer

ID of user to update

Request Body schema: application/json

User configuration

username
string

Username.

password
string

Password.

endpointId
integer

ID of endpoint to associate with user.

email
string

The email address used for password reset and welcome emails.

disabled
boolean

Password authentication disabled.

object

Specify path, and permission level of user home directory

Array of objects (Permission)

Additional folder permissions assigned to the user.

whitelist
Array of strings

IP addresses which are allowed to connect as this user.

mfaRequired
boolean

Require multi-factor authentication to be set up before allowing user to log in.

ldap
boolean

Indicates that this user should be authneticated using LDAP.

expires
string

A timestamp in ISO 8601 format indicating when the users account should no longer be accessible.

ftpDisabled
boolean

Disable FTP protocol for this user.

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "string",
  • "endpointId": 0,
  • "email": "string",
  • "disabled": true,
  • "home": {
    },
  • "permissions": [
    ],
  • "whitelist": [
    ],
  • "mfaRequired": true,
  • "ldap": true,
  • "expires": "string",
  • "ftpDisabled": true
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "fields": [
    ]
}

Delete user

Authorizations:
path Parameters
id
required
integer

ID of user to delete

Responses

Keys

Create or remove user SSH keys.

Add key

Create or import a SSH key. When importing use the keyData field. To create a new key set create to true

Authorizations:
path Parameters
userId
required
integer

ID of user to associate key with

Request Body schema: application/json

Key settings

keyData
string

Contents of key file to import. Use either keyData or create.

create
boolean
Default: false

Create and return a new key. Use either keyData or create.

title
string

A title to display for the key.

Responses

Request samples

Content type
application/json
{
  • "keyData": "string",
  • "create": false,
  • "title": "string"
}

Delete key

Authorizations:
path Parameters
userId
required
integer

ID of user to remove key from

keyId
required
integer

ID of key to remove

Responses

Groups

Create and manage user groups.

List groups

Return list of all active groups.

Authorizations:

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create group

Authorizations:
Request Body schema: application/json

Group settings

id
integer

The group ID.

name
string

Name of the group.

members
Array of strings

Usernames of members in the group.

Array of objects (Permission)

Folder permissions assigned to the group.

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "members": [
    ],
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0
}

Get group

Return group settings.

Authorizations:
path Parameters
id
required
integer

ID of group to return

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "members": [
    ],
  • "permissions": [
    ]
}

Update group

Update group settings

Authorizations:
path Parameters
id
required
integer

ID of group to update

Request Body schema: application/json

User configuration

id
integer

The group ID.

name
string

Name of the group.

members
Array of strings

Usernames of members in the group.

Array of objects (Permission)

Folder permissions assigned to the group.

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "members": [
    ],
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "fields": [
    ]
}

Delete group

Authorizations:
path Parameters
id
required
integer

ID of group to delete

Responses

Permissions

View folder permissions.

Folder permissions overview

List all paths with permissions applied.

Authorizations:

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Folder permission detail

List all permissions granted on the specified path.

Authorizations:
query Parameters
path
required
integer

Folder path to list permissions of.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Audit

View audit logs.

Get audit log entries

Return list of all audit log entries filtered by given parameters. Note that each request will return a maximum of 10,000 entries and no pagination is currently available. If necessary, you must filter by a shorted time span.

Authorizations:
query Parameters
start
string

RFC 3339 timestamp of first event to return.

end
string

RFC 3339 timestamp of last event to return.

path
string

Show only events for the object at this path.

operation
string

The operation type to filter by. Valid values are 'cd', 'mkdir', 'ls','get','put','stat','rmdir','rm','mv'

user
string

The username to filter by.

Responses

Response samples

Content type
application/json
[
  • {
    }
]