CrushMFT Documentation

Listeners#

From openapi.json: CrushMFT API, version v1, build 27.0.0_2143.

The ports the server listens on: list them, start, stop and restart them.

GET /WebInterface/api/v1/listeners #

The listeners (ports) with their settings and whether each is running.

  • Operation: listeners.list
  • Credentials: token or basic or session
  • Permission: prefs.listeners.view
  • Tier: 1
  • Legacy: getServerItem
  • Token: by its grants
  • Read only: yes

Parameters

Name In Type Required Description
limit query integer At most this many items, 1 to 1000. Default 100.
cursor query string The next_cursor of the page before.

Responses

Status Description Body
200 The result. object application/json
400 The request is not JSON, or a parameter is of the wrong kind. Problem application/problem+json
401 No credential, or one that did not log in. Problem application/problem+json
403 Logged in, and refused: detail says why, permission names what was missing. Problem application/problem+json
default Any other error. Problem application/problem+json

Fields of the 200 response

Field Type Required Description
items list of listener
next_cursor null
Example 200 response
{
  "items": [
    {
      "allow_webdav": false,
      "busy_message": "",
      "connected_users": 1,
      "connection_group": "MainUsers",
      "connection_number": 107,
      "display": "http://192.0.2.10:443/ ( Web ) is running, 1 users connected. Connections Processed : 107",
      "enabled": true,
      "explicit_ssl": false,
      "explicit_tls": false,
      "ip": "192.0.2.10",
      "port": 18280,
      "require_encryption": false,
      "running": true,
      "server_ip": "auto",
      "server_type": "HTTP",
      "extra": {
        "new_http": "true"
      },
      "id": "0"
    },
    {
      "busy_message": "",
      "connected_users": 0,
      "connection_group": "MainUsers",
      "connection_number": 0,
      "display": "ftp://192.0.2.10:21/ is running, 0 users connected. Connections Processed : 0",
      "enabled": true,
      "ip": "192.0.2.10",
      "port": 18281,
      "running": true,
      "server_ip": "auto",
      "server_type": "FTP",
      "id": "1"
    }
  ],
  "next_cursor": null
}

POST /WebInterface/api/v1/listeners/{id}/start #

Start a listener.

  • Operation: listeners.start
  • Credentials: token or basic or session
  • Permission: server.ports.control
  • Tier: 1
  • Legacy: adminAction:startServer
  • Token: by its grants
  • Read only: no

Parameters

Name In Type Required Description
id path string yes The listener's id, as listeners.list gives it.

Responses

Status Description Body
200 The result. listener application/json
400 The request is not JSON, or a parameter is of the wrong kind. Problem application/problem+json
401 No credential, or one that did not log in. Problem application/problem+json
403 Logged in, and refused: detail says why, permission names what was missing. Problem application/problem+json
404 No such object, or one outside the caller's scope. Problem application/problem+json
409 The object exists already, or its state does not allow this. Problem application/problem+json
default Any other error. Problem application/problem+json
Example 200 response
{
  "busy_message": "",
  "connected_users": 0,
  "connection_group": "MainUsers",
  "connection_number": 0,
  "display": "ftp://192.0.2.10:21/ is running, 0 users connected. Connections Processed : 0",
  "enabled": true,
  "ip": "192.0.2.10",
  "port": 18281,
  "running": true,
  "server_ip": "auto",
  "server_type": "FTP",
  "id": "1"
}

POST /WebInterface/api/v1/listeners/{id}/stop #

Stop a listener. Sessions on it are cut.

  • Operation: listeners.stop
  • Credentials: token or basic or session
  • Permission: server.ports.control
  • Tier: 1
  • Legacy: adminAction:stopServer
  • Token: by its grants
  • Read only: no

Parameters

Name In Type Required Description
id path string yes The listener's id, as listeners.list gives it.

Responses

Status Description Body
200 The result. listener application/json
400 The request is not JSON, or a parameter is of the wrong kind. Problem application/problem+json
401 No credential, or one that did not log in. Problem application/problem+json
403 Logged in, and refused: detail says why, permission names what was missing. Problem application/problem+json
404 No such object, or one outside the caller's scope. Problem application/problem+json
409 The object exists already, or its state does not allow this. Problem application/problem+json
default Any other error. Problem application/problem+json
Example 200 response
{
  "busy_message": "",
  "connected_users": 0,
  "connection_group": "MainUsers",
  "connection_number": 1,
  "display": "ftp://192.0.2.10:21/ is stopped, 0 users still connected.  Connections Processed : 1",
  "enabled": true,
  "ip": "192.0.2.10",
  "port": 18281,
  "running": false,
  "server_ip": "auto",
  "server_type": "FTP",
  "id": "1"
}

POST /WebInterface/api/v1/listeners/{id}/restart #

Stop a listener and start it again.

  • Operation: listeners.restart
  • Credentials: token or basic or session
  • Permission: server.ports.control
  • Tier: 1
  • Legacy: adminAction:restartServer
  • Token: by its grants
  • Read only: no

Parameters

Name In Type Required Description
id path string yes The listener's id, as listeners.list gives it.

Responses

Status Description Body
200 The result. listener application/json
400 The request is not JSON, or a parameter is of the wrong kind. Problem application/problem+json
401 No credential, or one that did not log in. Problem application/problem+json
403 Logged in, and refused: detail says why, permission names what was missing. Problem application/problem+json
404 No such object, or one outside the caller's scope. Problem application/problem+json
409 The object exists already, or its state does not allow this. Problem application/problem+json
default Any other error. Problem application/problem+json
Example 200 response
{
  "busy_message": "",
  "connected_users": 0,
  "connection_group": "MainUsers",
  "connection_number": 0,
  "display": "ftp://192.0.2.10:21/ is running, 0 users connected. Connections Processed : 0",
  "enabled": true,
  "ip": "192.0.2.10",
  "port": 18281,
  "running": true,
  "server_ip": "auto",
  "server_type": "FTP",
  "id": "1"
}

POST /WebInterface/api/v1/listeners/start-all #

Start every listener.

  • Operation: listeners.start-all
  • Credentials: token or basic or session
  • Permission: server.ports.control
  • Tier: 1
  • Legacy: adminAction:startAllServers
  • Token: by its grants
  • Read only: no

Responses

Status Description Body
200 The result. object application/json
401 No credential, or one that did not log in. Problem application/problem+json
403 Logged in, and refused: detail says why, permission names what was missing. Problem application/problem+json
409 The object exists already, or its state does not allow this. Problem application/problem+json
default Any other error. Problem application/problem+json

Fields of the 200 response

Field Type Required Description
items list of listener
next_cursor null
Example 200 response
{
  "items": [
    {
      "allow_webdav": false,
      "busy_message": "",
      "connected_users": 0,
      "connection_group": "MainUsers",
      "connection_number": 0,
      "display": "http://192.0.2.10:443/ ( Web ) is running, 0 users connected. Connections Processed : 0",
      "enabled": true,
      "explicit_ssl": false,
      "explicit_tls": false,
      "ip": "192.0.2.10",
      "port": 18280,
      "require_encryption": false,
      "running": true,
      "server_ip": "auto",
      "server_type": "HTTP",
      "extra": {
        "new_http": "true"
      },
      "id": "0"
    },
    {
      "busy_message": "",
      "connected_users": 0,
      "connection_group": "MainUsers",
      "connection_number": 0,
      "display": "ftp://192.0.2.10:21/ is running, 0 users connected. Connections Processed : 0",
      "enabled": true,
      "ip": "192.0.2.10",
      "port": 18281,
      "running": true,
      "server_ip": "auto",
      "server_type": "FTP",
      "id": "1"
    }
  ],
  "next_cursor": null
}

POST /WebInterface/api/v1/listeners/stop-all #

Stop every listener, the one this request came in on too.

  • Operation: listeners.stop-all
  • Credentials: token or basic or session
  • Permission: server.ports.control
  • Tier: 1
  • Legacy: adminAction:stopAllServers
  • Token: by its grants
  • Read only: no

Responses

Status Description Body
200 The result. object application/json
401 No credential, or one that did not log in. Problem application/problem+json
403 Logged in, and refused: detail says why, permission names what was missing. Problem application/problem+json
409 The object exists already, or its state does not allow this. Problem application/problem+json
default Any other error. Problem application/problem+json

Fields of the 200 response

Field Type Required Description
items list of listener
next_cursor null
Example 200 response
{
  "items": [
    {
      "allow_webdav": false,
      "busy_message": "",
      "connected_users": 0,
      "connection_group": "MainUsers",
      "connection_number": 2,
      "display": "http://192.0.2.10:443/ ( Web ) is stopped, 0 users still connected.  Connections Processed : 2",
      "enabled": true,
      "explicit_ssl": false,
      "explicit_tls": false,
      "ip": "192.0.2.10",
      "port": 18280,
      "require_encryption": false,
      "running": false,
      "server_ip": "auto",
      "server_type": "HTTP",
      "extra": {
        "as2v2_allow_plain_http": "true",
        "as2v2_allowed": "true",
        "new_http": "true"
      },
      "id": "0"
    },
    {
      "busy_message": "",
      "connected_users": 0,
      "connection_group": "MainUsers",
      "connection_number": 0,
      "display": "ftp://192.0.2.10:21/ is stopped, 0 users still connected.  Connections Processed : 0",
      "enabled": true,
      "ip": "192.0.2.10",
      "port": 18281,
      "running": false,
      "server_ip": "auto",
      "server_type": "FTP",
      "id": "1"
    }
  ],
  "next_cursor": null
}

Schemas used here#

Problem #

An error (RFC 9457), as application/problem+json. code is stable and is what a program switches on; detail says it in words; request_id finds the request in the server log.

Code Status Meaning
bad_request 400 The request cannot be read: a broken path, an unknown or badly typed parameter, a body that is not a JSON object.
validation_failed 422 The body is well-formed, but one or more of its fields cannot be used. errors lists each field, the rule and a message.
unauthenticated 401 No credential, or one that did not log in.
forbidden 403 Logged in, and refused. detail carries the reason the access engine gave.
tier0 403 The operation is equal to full control of the server. No token may use it, and of the accounts only the Administrator role.
read_only_token 403 The token is read-only and the operation changes something.
legacy_account 403 The account holds legacy admin flags, which the API does not act on. Convert it to roles, or issue a token for it.
not_open_yet 403 The command behind the operation is not switched on for roles and tokens yet. An administrator's own login can use it.
dmz_not_allowed 403 The request came through a DMZ, and the API does not answer those unless api_from_dmz allows it.
edition_required 403 The operation needs an edition this server is not licensed for.
not_found 404 No such operation, no such object, or an object the caller's scope does not cover.
method_not_allowed 405 The path exists and the method does not. Allow lists the methods that do.
conflict 409 The object already exists, or is in a state that does not allow this.
precondition_failed 412 If-Match did not match: the object changed since it was read.
payload_too_large 413 The body is larger than api_max_body_kb.
unsupported_media_type 415 A body must be Content-Type: application/json.
rate_limited 429 Too many requests for this credential or address in this minute. Retry-After says when to try again.
internal_error 500 A fault in the server. The server log has the cause under the request id.
not_implemented 501 The operation is in the registry and is not built on this server yet.
unavailable 503 The server is starting or shutting down.
fips_restricted 409 The server runs in FIPS 140-3 mode (launched with -Dcrushmft.fips=true), and FIPS mode does not allow what was asked: the detail is the catalog row's reason and what to use instead, fips_id its id (CrushFTP design/61 section 5).
Field Type Required Description
type string
title string
code string, one of bad_request, validation_failed, unauthenticated, forbidden, tier0, read_only_token, legacy_account, not_open_yet, dmz_not_allowed, edition_required, not_found, method_not_allowed, conflict, precondition_failed, payload_too_large, unsupported_media_type, rate_limited, internal_error, not_implemented, unavailable, fips_restricted
detail string
operation string
permission string
request_id string
status integer

listener #

Field Type Required Description
allow_webdav boolean
api boolean false: the API does not answer on this listener
busy_message string
connected_users integer or null
connection_group string The user connection group the listener serves
connection_number integer or null Connections handled since the listener started
display string
enabled boolean
explicit_ssl boolean
explicit_tls boolean
extra object Keys this table does not name yet, and values that did not fit their field's type, as the server holds them. A read followed by a write of the same object loses nothing.
https_redirect boolean
ip string
port integer or null
require_encryption boolean
running boolean
server_ip string
server_type string