CrushMFT Documentation

Sessions#

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

The connections that are logged in now: list them, look at one, send it a message, end it or ban its address.

GET /WebInterface/api/v1/sessions #

Who is connected now, and who was recently.

  • Operation: sessions.list
  • Credentials: token or basic or session
  • Permission: server.sessions.view
  • Tier: 1
  • Legacy: getSessionList
  • Token: by its grants
  • Read only: yes

Parameters

Name In Type Required Description
state query string, one of active, recent, all active: connected now. recent: ended a short while ago. Default active.
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 session
next_cursor null
Example 200 response
{
  "items": [
    {
      "current_dir": "/",
      "id": "736",
      "ip": "192.0.2.10",
      "last_activity": "2026-11-22T19:29:57.782Z",
      "logged_in": true,
      "protocol": "HTTP",
      "shared_id": "fzxdP7yAUzBiPIYNb1cL",
      "username": "apitest7"
    }
  ],
  "next_cursor": null
}

GET /WebInterface/api/v1/sessions/{id} #

One session, connected now or recently: who, from where, what it is doing.

  • Operation: sessions.get
  • Credentials: token or basic or session
  • Permission: server.sessions.view
  • Tier: 1
  • Legacy: adminAction:getUserInfo
  • Token: by its grants
  • Read only: yes

Parameters

Name In Type Required Description
id path string yes The session's id, as GET /sessions gives it.

Responses

Status Description Body
200 The result. session 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
default Any other error. Problem application/problem+json
Example 200 response
{
  "current_dir": "/",
  "id": "736",
  "ip": "192.0.2.10",
  "last_activity": "2026-11-22T19:29:57.782Z",
  "protocol": "HTTP",
  "username": "apitest7",
  "extra": {
    "PASV_port": "2000",
    "SESSION_RID": "1795375797782",
    "activity_account": "true",
    "activity_conn_group": "MainUsers",
    "activity_user": "apitest7",
    "adminAllowed": "true",
    "admin_message": "hello from the gate tests",
    "authorization_header": "true",
    "bind_ip": "192.0.2.10",
    "bind_ip_config": "192.0.2.10",
    "bind_port": "18280",
    "bytes_received": "0",
    "bytes_received_formatted": "0b",
    "bytes_sent": "0",
    "bytes_sent_formatted": "0b",
    "crc": "",
    "current_file": "",
    "current_transfer_speed": "0",
    "dataSecure": "false",
    "didDisconnect": "false",
    "dieing": "false",
    "dont_log": "false",
    "dont_read": "true",
    "dont_write": "true",
    "end_part_transfer_time": "0",
    "explicit_ssl": "false",
    "explicit_tls": "false",
    "file_length": "0",
    "file_transfer_mode": "BINARY",
    "friendly_quit": "false",
    "header_resume_key": "127.0.0.1_5c62aa8f157e316842de9806a2b46f6c_2c9e4901f7880e7a4282b19dd15e05d9",
    "header_user-agent": "",
    "http_headers": [],
    "id": "736",
    "last_action": "",
    "last_file_name": "",
    "last_file_real_path": "",
    "last_logged_command": "USER",
    "last_login_message": "\r\n%PASS%",
    "last_port_string": "",
    "last_time_remaining": "",
    "list_dot": "true",
    "list_filetree_status": "",
    "list_zip_app": "true",
    "list_zip_dir": "false",
    "list_zip_file": "false",
    "list_zip_only": "false",
    "listen_ip": "192.0.2.10",
    "listen_ip_port": "MainUsers",
    "listing_files": "false",
    "login_date": "Sun Nov 22 21:29:57 EET 2026",
    "login_date_formatted": "11/22/2026 21:29:57.782",
    "login_date_stamp": "1795375797766",
    "login_date_stamp_unique": "1795375797766",
    "mlst_format": "Type*;Size*;Modify*;Perm*;UNIX.owner*;UNIX.group*;",
    "modez": "false",
    "no_zip_compression": "false",
    "otp_proven_strikes": {
      "set": true
    },
    "otp_proven_time": {
      "set": true
    },
    "otp_proven_user": {
      "set": false
    },
    "overall_transfer_speed": "0",
    "password_attempts": [],
    "password_expired": {
      "set": true
    },
    "pasv_connect": "false",
    "pause_now": "false",
    "proxy_mode": "none",
    "ran_other_plugin": "false",
    "ran_other_plugin_result": "",
    "randomaccess": "false",
    "ratio_bytes_received": "0",
    "ratio_bytes_sent": "0",
    "receiving_file": "false",
    "refresh_user": "false",
    "require_encryption": "false",
    "root_dir": "/",
    "seconds_remaining": "0",
    "secure": "false",
    "secureType": "TLS",
    "sending_file": "false",
    "sessionID": "HTTP:MainUsers:",
    "session_download_count": "0",
    "session_upload_count": "0",
    "sftp_login_complete": "false",
    "sharedId": "fzxdP7yAUzBiPIYNb1cL",
    "site": "()",
    "sock_port": "63358",
    "sscn_mode": "false",
    "start_resume_loc": "0",
    "start_transfer_byte_amount": "0",
    "start_transfer_time": "0",
    "termination_message": "",
    "the_command": "",
    "the_command_data": "",
    "time": "11/22/2026 21:29:57.766",
    "trusted_redirect_url": "",
    "user_groups": "",
    "user_log": [
      "SESSION|11/22/2026 21:29:59.179|[HTTP:771_63407:192.0.2.10:443] Accepting connection from: 192.0.2.10:63407:GET /WebInterface/api/v1/me HTTP/1.1",
      "SESSION|11/22/2026 21:29:59.179|Resumed session 736.  This socket's session log moved to:./logs/session_logs/26112221/session_HTTP_736.log",
      "SESSION|11/22/2026 21:29:59.179|[HTTP:736_63407:apitest7:192.0.2.10] WROTE: *HTTP/1.1 200 OK*"
    ],
    "user_log_file": "session_HTTP_736.log",
    "user_log_path": "./logs/session_logs/26112221/",
    "user_log_path_custom": "",
    "user_log_written": "true",
    "user_logged_in": "true",
    "user_name_original": "apitest7",
    "user_port": "63358",
    "user_protocol_proxy": "HTTP",
    "webdav_login": "true",
    "zip64": "false",
    "zlibLevel": "8"
  }
}

POST /WebInterface/api/v1/sessions/{id}/kick #

End a connected session.

  • Operation: sessions.kick
  • Credentials: token or basic or session
  • Permission: server.sessions.kick
  • Tier: 1
  • Legacy: adminAction:kick
  • Token: by its grants
  • Read only: no

Parameters

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

Responses

Status Description Body
204 Done, with nothing to answer.
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

POST /WebInterface/api/v1/sessions/{id}/ban #

Ban the address of a session, for good or for some minutes, and end the session.

  • Operation: sessions.ban
  • Credentials: token or basic or session
  • Permission: server.bans.edit
  • Tier: 1
  • Legacy: adminAction:ban, adminAction:temporaryBan
  • Token: by its grants
  • Read only: no

Parameters

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

Request body (required): application/json

Field Type Required Description
minutes integer How long the ban lasts. Without it the ban has no end.
Example request body
{
  "minutes": 1
}

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
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
422 A field fails its rule: errors lists every one. Problem application/problem+json
default Any other error. Problem application/problem+json

Fields of the 200 response

Field Type Required Description
banned boolean
ip string
kicked boolean
minutes integer
Example 200 response
{
  "ip": "192.0.2.10",
  "banned": false,
  "kicked": true,
  "minutes": 1
}

POST /WebInterface/api/v1/sessions/{id}/message #

Leave a message for a session; the WebInterface shows it to the user.

  • Operation: sessions.message
  • Credentials: token or basic or session
  • Permission: server.sessions.message
  • Tier: 2
  • Legacy: adminAction:msgUser
  • Token: by its grants
  • Read only: no

Parameters

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

Request body (required): application/json

Field Type Required Description
message string yes The text, 1 to 2000 characters.

Responses

Status Description Body
204 Done, with nothing to answer.
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
422 A field fails its rule: errors lists every one. Problem application/problem+json
default Any other error. Problem application/problem+json

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

session #

Field Type Required Description
current_dir string
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.
id string The id the session actions take
ip string
last_activity string (date-time) or null
logged_in boolean false: a recent session that has ended
protocol string
shared_id string
username string