SFTP Gateway 2.0 Admin API
Note: This page applies to SFTP Gateway version 2.x. Visit Here for documentation on version 3.x.
Admin API for user management, system configuration, and diagnostics.
Login [/backend/login]
Login [POST]
Use the Bearer token in the response headers for further authenticated requests.
- Request
- Headers
Content-Type: application/json
- Body
{ "username": "value", "password": "value" }
- Headers
- Response 200
- Headers
Content-Type: application/json Authorization: Bearer Token
- Headers
- Response 403
- Headers
Content-Length: 0
- Headers
Users List [/backend/api/users{?search}]
List all users [GET]
- Parameters
- search (string, optional) - A query variable to search for users by username
- Request
- Headers
Content-Type: application/json Authorization: Bearer Token
- Headers
- Response 200
- Headers
Content-Type: application/json
- Body
{ "users": [ { "username": "value", "bucketName": "value", "path": "value", "s3EncryptionLevel": "value", "pubSsh": "value", "downloadDir": "value", "sharedDir": "value", "uidNumber": "value" } ] }
- Headers
Create user [POST]
- Attributes
- username (string) - Required
- bucketName (string) - If not supplied, system's default bucket will be the default value
- path (string) - If not supplied, username will be the default value (ex: /alice)
- pubSsh (string) - Public SSH key
- s3EncryptionLevel (string) - Id of the encryption key, if nothing is provided the default is SSE-S3. Values can be "1" (SSE-S3 encryption); "4" (no encryption); "A KMS key arn" (encryption will be handled by a predefined KMS key)
- downloadDir (boolean) - Enables user access to a private download directory. Values cab be "TRUE" or "FALSE
- sharedDir (boolean) - Enables user access to the shared directory. Values can be "TRUE" or "FALSE"
- Request
- Headers
Content-Type: application/json Authorization: Bearer token
- Body
{ "username": "value", "bucketName": "", "path": "", "pubSsh": "", "s3EncryptionLevel": "", "downloadDir": "", "sharedDir": "" }
- Headers
- Response 201
- Headers
Content-Length: 0
- Headers
- Response 400
- Headers
Content-Type: application/json
- Body
{ "message": "Bad Request" }
- Headers
- Response 409
- Headers
Content-Type: application/json
- Body
{ "message": "Entry Already Exists" }
- Headers
Get user [GET /backend/api/users/{username}]
- Parameters
- username (string)
- Request
- Headers
Content-Type: application/json Authorization: Bearer Token
- Headers
- Response 200
- Headers
Content-Type: application/json
- Body
{ "username": "value", "bucketName": "value", "path": "value", "s3EncryptionLevel": "value", "pubSsh": "value", "downloadDir": "value", "sharedDir": "value", "uidNumber": "value" }
- Headers
- Response 404
- Headers
Content-Type: application/json
- Body
{ "message": "No Such Object" }
- Headers
Update user [PUT /backend/api/users/{username}{?force-create}]
- Parameters
- username (string)
force-create
(boolean, optional) - A request param variable to create the user in case they do not exist. Value can be true or false.
- Attributes
- username (string) - Required
- bucketName (string) - If not supplied, system's default bucket will be the default value
- path (string) - If not supplied, username will be the default value (ex: /alice)
- pubSsh (string) - Public SSH key
- s3EncryptionLevel (string) - Id of the encryption key, if nothing is provided the default is SSE-S3. Values can be "1" (SSE-S3 encryption); "4" (no encryption); "A KMS key arn" (encryption will be handled by a predefined KMS key)
- downloadDir (boolean) - Enables user access to a private download directory. Value cab be "TRUE" or "FALSE
- sharedDir (boolean) - Enables user access to the shared directory. Value can be "TRUE" or "FALSE"
- Request
- Headers
Content-Type: application/json Authorization: Bearer Token
- Body
{ "bucketName": "", "path": "", "pubSsh": "", "s3EncryptionLevel": "", "downloadDir": "", "sharedDir": "" }
- Headers
- Response 200
- Headers
Content-Length: 0
- Headers
- Response 400
- Headers
Content-Type: application/json
- Body
{ "message": "Bad Request" }
- Headers
- Response 404
- Headers
Content-Type: application/json
- Body
{ "message": "No Such Object" }
- Headers
Delete user [DELETE /backend/api/users/{username}]
- Parameters
- username (string)
- Request
- Headers
Authorization: Bearer Token
- Headers
- Response 204
- Response 404
- Headers
Content-Type: application/json
- Body
{ "message": "No Such Object" }
- Headers
S3 Encryption Levels [/backend/api/s3encryption]
List all levels [GET]
- Request
- Headers
Content-Type: application/json Authorization: Bearer Token
- Headers
- Response 200
- Headers
Content-Type: application/json
- Body
{ "s3Encryption": [ { "alias": "value", "keyArn": "value", "keyId": "value" } ] }
- Headers
System Configuration [/backend/api/configuration]
Get system configuration [GET]
- Request
- Headers
Content-Type: application/json Authorization: Bearer Token
- Headers
- Response 200
- Headers
Content-Type: application/json
- Body
{ "bucketName": "value", "sharedPath": "value", "uploadPath": "value" }
- Headers
Update system configuration [PUT]
- Attributes
- bucketName (string) - If not supplied, system's default bucket will be the default value
- sharedPath (string) - If not supplied, system's default "shared" path will be the default value
- Request
- Headers
Content-Type: application/json Authorization: Bearer Token
- Body
{ "bucketName": "value", "sharedPath": "value" }
- Headers
- Response 200
- Headers
Content-Type: application/json
- Headers
- Response 400
- Headers
Content-Type: application/json
- Body
{ "message": "Bad Request" }
- Headers
SSH key pair generator [/backend/api/keypair/generate]
Generate ssh keys [GET]
- Request
- Headers
Authorization: Bearer Token
- Headers
- Response 200
- Headers
Content-Type: application/json
- Body
{ "privateKey": "value", "publicKey": "value" }
- Headers
Diagnostics [/diagnostics]
GET system diagnostics [GET]
- Request
- Headers
Content-Type: application/json Authorization: Bearer Token
- Headers
- Response 200
- Headers
Content-Type: application/json
- Body
{ "logFiles": [ { "fileName": "value", "fileContents": "value" } ] }
- Headers