CrushMFT Documentation

Tests of settings#

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

Try a setting before relying on it: mail, text messages, GeoIP, log targets, SNMP traps, key stores, PGP keys, cluster links, Kerberos logins and keytabs.

POST /WebInterface/api/v1/tests/smtp #

Send a test mail. The server's mail settings are used for what is not sent; its stored password only goes to its stored mail server.

  • Operation: tests.smtp
  • Credentials: token or basic or session
  • Permission: prefs.mail.test
  • Tier: 1
  • Legacy: testSMTP
  • Token: by its grants
  • Read only: no

Parameters

Name In Type Required Description
dry_run query boolean Answer which settings would be used, send nothing. Default false.

Request body (required): application/json

Field Type Required Description
to string yes Who gets the test mail.
cc string Copies.
bcc string Blind copies.
from string The sender; the server's smtp_from when left out.
subject string The subject.
body string The text.
html boolean The text is HTML. Default false.
server string The mail server, host:port; the server's own when left out.
user string The login; the server's own with its own mail server.
password string The password. Left out, the stored one is used, only with the stored server and user.
ssl boolean TLS from the start; the server's own setting when left out.
Example request body
{
  "to": "gate@example.com",
  "subject": "gate test"
}

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
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
ok boolean
result string
Example 200 response
{
  "ok": true,
  "result": "Success!"
}

POST /WebInterface/api/v1/tests/otp #

Send a test text message through the server's SMS settings.

  • Operation: tests.otp
  • Credentials: token or basic or session
  • Permission: prefs.mail.test
  • Tier: 1
  • Legacy: testOTP
  • Token: by its grants
  • Read only: no

Request body (required): application/json

Field Type Required Description
to string yes The phone number.
Example request body
{
  "to": "+15555550100"
}

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
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
ok boolean
result string
Example 200 response
{
  "ok": true,
  "result": "Success!"
}

POST /WebInterface/api/v1/tests/geoip #

Look an IP address up through the server's GeoIP service, to check its access key.

  • Operation: tests.geoip
  • Credentials: token or basic or session
  • Permission: prefs.geoip.test
  • Tier: 2
  • Legacy: testGeoIP
  • Token: by its grants
  • Read only: no

Request body (required): application/json

Field Type Required Description
ip string An IPv4 or IPv6 address. Default 8.8.8.8.
Example request body
{
  "ip": "192.0.2.10"
}

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
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
ip string
ok boolean
result string
Example 200 response
{
  "ok": false,
  "result": "Configuration Error: Please provide a valid IpStack Access Key for GeoIP services.",
  "ip": "192.0.2.10"
}

POST /WebInterface/api/v1/tests/serverbeat #

Try the cluster link of a ServerBeat listener: each member's answer to the cluster token.

  • Operation: tests.serverbeat
  • Credentials: token or basic or session
  • Permission: prefs.cluster.test
  • Tier: 1
  • Legacy: testServerBeatConnection
  • Token: by its grants
  • Read only: no

Request body (required): application/json

Field Type Required Description
listener string yes The ServerBeat listener, by its id (GET /listeners).

Responses

Status Description Body
200 The result. Its fields are not described yet: no test run recorded this reply.
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
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

POST /WebInterface/api/v1/tests/replication #

Try the links to the replication peers.

  • Operation: tests.replication
  • Credentials: token or basic or session
  • Permission: prefs.cluster.test
  • Tier: 1
  • Legacy: testReplicationConnection
  • 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
detail object
detail.status string
ok boolean
result string
Example 200 response
{
  "ok": false,
  "result": "No remote replication servers configured.",
  "detail": {
    "status": "No remote replication servers configured."
  }
}

POST /WebInterface/api/v1/tests/log-target #

Send one test record through a log target: a configured one by id, or the settings sent.

  • Operation: tests.log-target
  • Credentials: basic or session
  • Permission: prefs.logging.edit
  • Tier: 0
  • Legacy: testLogTarget
  • Token: never
  • Read only: no

Request body (required): application/json

Field Type Required Description
id string A configured log target, by its id.
target object The settings of a log target, as Preferences, Logging holds them.
Example request body
{
  "target": {
    "type": "syslog",
    "host": "192.0.2.10",
    "port": "52752",
    "protocol": "UDP"
  }
}

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
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
ok boolean
result string
Example 200 response
{
  "ok": true,
  "result": "SUCCESS: test record sent (syslog, crushftp). UDP cannot confirm delivery: check the receiver."
}

POST /WebInterface/api/v1/tests/snmp-trap #

Send one test trap to an SNMP receiver: a configured one by index, or the settings sent.

  • Operation: tests.snmp-trap
  • Credentials: basic or session
  • Permission: prefs.alerts.edit
  • Tier: 0
  • Legacy: testSnmpTrap
  • Token: never
  • Read only: no

Request body (required): application/json

Field Type Required Description
index integer A configured SNMP receiver, from 0.
receiver object The settings of a receiver, as Preferences, Alerts holds them.
Example request body
{
  "receiver": {
    "host": "192.0.2.10",
    "port": "52752",
    "version": "v2c",
    "community": "public"
  }
}

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
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
ok boolean
result string
Example 200 response
{
  "ok": true,
  "result": "SUCCESS: v2c trap of 355 bytes sent to 192.0.2.10:52752. UDP cannot confirm delivery: check the receiver."
}

POST /WebInterface/api/v1/tests/keystore #

Load a key store and try its private key in a TLS handshake: a registered store, a listener's, or the server's. No password travels.

  • Operation: tests.keystore
  • Credentials: token or basic or session
  • Permission: keys.ssl.test
  • Tier: 1
  • Legacy: testKeystore
  • Token: by its grants
  • Read only: no

Request body (required): application/json

Field Type Required Description
store string A key store the API registered (GET /keys/ssl).
listener string A listener's own key store, by the listener's id.
server boolean The server's own key store. Default false.
alias string An alias that must be in it.
Example request body
{
  "store": "gatetools"
}

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
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
key_store string
ok boolean
result string
Example 200 response
{
  "ok": true,
  "result": "Success!  Keystore loaded and private key exists.",
  "key_store": "store gatetools"
}

POST /WebInterface/api/v1/tests/pgp #

Encrypt and decrypt a test text: with a key of the key ring, a passphrase, or key files (an administrator's own login).

  • Operation: tests.pgp
  • Credentials: token or basic or session
  • Permission: keys.pgp.test
  • Tier: 1
  • Legacy: testPGP
  • Token: by its grants
  • Read only: no

Request body (required): application/json

Field Type Required Description
key string A key of the key ring, by its id.
password string A passphrase, for encryption without keys.
public_key string A public key file or url (an administrator's own login).
private_key string A private key file or url (an administrator's own login).
private_key_password string The private key file's password.
Example request body
{
  "key": "4189BA8D"
}

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
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
ok boolean
result string
Example 200 response
{
  "ok": true,
  "result": "SUCCESS: a test text was encrypted and decrypted again."
}

POST /WebInterface/api/v1/tests/keytab #

What a keytab holds: each principal, key version and encryption type, never a key. A saved credential's keytab, or one at a path on the server.

  • Operation: tests.keytab
  • Credentials: basic or session
  • Permission: prefs.userstore.test
  • Tier: 0
  • Legacy: testKeytab
  • Token: never
  • Read only: no

Request body (required): application/json

Field Type Required Description
credential string A saved Kerberos credential, by name: its keytab.
path string A keytab file on the server, by its path.
Example request body
{
  "path": "/var/opt/CrushMFT27/kerberos/gate_kt.keytab"
}

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
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
entries list of object
entries[].enctype string
entries[].kvno integer
entries[].principal string
entries[].realm string
entries[].written string
ok boolean
path string
result string
Example 200 response
{
  "ok": true,
  "result": "1 entry",
  "path": "/var/opt/CrushMFT27/kerberos/gate_kt.keytab",
  "entries": [
    {
      "principal": "cifs/gate.example.com@EXAMPLE.COM",
      "realm": "EXAMPLE.COM",
      "kvno": 3,
      "enctype": "aes256-cts-hmac-sha1-96",
      "written": "2026-11-22T19:31:08Z"
    }
  ]
}

POST /WebInterface/api/v1/tests/kerberos #

Log a user of the realm in at the KDC, ask for a ticket to a service, and accept it with a saved credential's keytab; each step with its outcome, and the account each SMB or NFS listener would serve the user as. The password is used for this one login.

  • Operation: tests.kerberos
  • Credentials: basic or session
  • Permission: prefs.userstore.test
  • Tier: 0
  • Legacy: testKerberos
  • Token: never
  • Read only: no

Request body (required): application/json

Field Type Required Description
credential string yes A saved Kerberos credential (kerberos_credentials), by name: its keytab accepts the ticket.
user string yes A user of the realm, as alice@CORP.EXAMPLE.COM.
password string yes That user's password, for this one login; it is kept nowhere. A wrong one counts against the account at the KDC.
service string The service to ask a ticket for, as cifs/crushftp.example.com; left out, the one a listener using the credential needs, from its keytab.
Example request body
{
  "credential": "gate-no-such",
  "user": "alice@EXAMPLE.COM",
  "password": "Gate-Krb-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
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
ok boolean
result string
steps list of object
steps[].state string
steps[].step string
steps[].text string
Example 200 response
{
  "ok": false,
  "result": "There is no saved credential named 'gate-no-such'. Save the credentials first.",
  "steps": [
    {
      "step": "config",
      "state": "info",
      "text": "Java finds no krb5.conf on this server, so the KDC is looked up from the realm's name in DNS. Java 27.0.1.0.3."
    },
    {
      "step": "credential",
      "state": "fail",
      "text": "There is no saved credential named 'gate-no-such'. Save the credentials first."
    }
  ]
}

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