FileMage Gateway (1.1.6)

Download OpenAPI specification:Download

FileMage Gateway provides a simple API to configure storage endpoints, users, and keys.

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://api.filemage.io/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

200

Success

get /endpoints/
https://api.filemage.io/v2/endpoints/

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Create endpoint

Create a new endpoint using provided settings.

Authorizations:
Request Body schema: application/json

Endpoint configuration

name
required
string

Visual label used to identify the endpoint.

config
required
object

Settings specific to the indicated storage endpoint type.

Responses

201

Success

400

Missing or invalid fields

post /endpoints/
https://api.filemage.io/v2/endpoints/

Request samples

application/json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "config":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "message": "string",
  • "fields":
    [
    ]
}

Get endpoint

Return detailed endpoint settings of specified endpoint.

Authorizations:
path Parameters
id
required
integer

ID of endpoint to return

Responses

200

Sucess

404

Endpoint not found

get /endpoints/{id}
https://api.filemage.io/v2/endpoints/{id}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "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

name
required
string

Visual label used to identify the endpoint.

config
required
object

Settings specific to the indicated storage endpoint type.

Responses

204

Success

400

Missing or invalid fields

404

Endpoint not found

put /endpoints/{id}
https://api.filemage.io/v2/endpoints/{id}

Request samples

application/json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "config":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "message": "string",
  • "fields":
    [
    ]
}

Delete endpoint

Authorizations:
path Parameters
id
required
integer

ID of endpoint to delete

Responses

204

Successful

404

Endpoint not found

delete /endpoints/{id}
https://api.filemage.io/v2/endpoints/{id}

Users

Create and manage user accounts.

List users

Return list of all active users.

Authorizations:

Responses

200

Success

get /users/
https://api.filemage.io/v2/users/

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

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.

disabled
bool

Password authentication disabled.

home
string

User home directory.

Responses

201

Success

400

Missing or invalid fields

post /users/
https://api.filemage.io/v2/users/

Request samples

application/json
Copy
Expand all Collapse all
{
  • "username": "string",
  • "password": "string",
  • "endpointId": 0,
  • "disabled": null,
  • "home": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": 0
}

Get user

Return detailed user settings including SSH keys.

Authorizations:
path Parameters
id
required
integer

ID of user to return

Responses

200

Sucess

404

User not found

get /users/{id}
https://api.filemage.io/v2/users/{id}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": 0,
  • "username": "string",
  • "endpointId": 0,
  • "disabled": null,
  • "home": "string",
  • "keys":
    [
    ]
}

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.

disabled
bool

Password authentication disabled.

home
string

User home directory.

Responses

204

successful operation

400

Missing or invalid fields

404

User not found.

put /users/{id}
https://api.filemage.io/v2/users/{id}

Request samples

application/json
Copy
Expand all Collapse all
{
  • "username": "string",
  • "password": "string",
  • "endpointId": 0,
  • "disabled": null,
  • "home": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "message": "string",
  • "fields":
    [
    ]
}

Delete user

Authorizations:
path Parameters
id
required
integer

ID of user to delete

Responses

200

Success

404

User not found

delete /users/{id}
https://api.filemage.io/v2/users/{id}

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
bool
Default: false

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

Responses

200

Success

204

Success

404

User not found

post /users/{userId}/keys
https://api.filemage.io/v2/users/{userId}/keys

Request samples

application/json
Copy
Expand all Collapse all
{
  • "keyData": "string",
  • "create": false
}

Delete key

Authorizations:
path Parameters
userId
required
integer

ID of user to remove key from

keyId
required
integer

ID of key to remove

Responses

204

successful operation

404

Key not found.

delete /users/{userId}/keys/{keyId}
https://api.filemage.io/v2/users/{userId}/keys/{keyId}