CrushMFT Documentation

Credentials#

Every request carries one of three credentials. None of them ever goes in the query string.

Credential Header For
An access token Authorization: Bearer cft_<id>.<secret> Scripts, integrations, AI agents. Always accepted.
A user name and password Authorization: Basic ... An administrator's own scripts. Can be turned off (Preferences, API).
A browser session the CrushAuth cookie and X-CrushMFT-C2F: <c2f> The WebInterface's own pages. Can be turned off.

A request without a credential, or with one that does not log in, gets 401 with WWW-Authenticate: Bearer.

Who decides#

Every answer is decided by the server's roles, the same way for every credential:

  • An administrator (the Administrator role, or the legacy CONNECT flag) may use every operation.
  • An account that holds roles may use what its roles grant, on the users, jobs and folders they reach.
  • An account on legacy admin flags (User Admin, Job Admin and the others, without roles) is refused admin operations with the code legacy_account. Two ways forward: convert the account to roles (Preferences, Access Roles), or issue it a token, which is always decided by the roles.
  • A user with no admin rights may use the operations on their own files and account (/files, /me), by the privileges they have today.
  • A token may use what it was issued with, and never more than its issuer may do at that moment.

When a request is refused the answer is 403 and its body says why, and which permission was missing. To ask before acting, use POST /explain (see AI agents).

Tokens#

A token is a slice of its issuer's rights:

  • Grants: the permissions it carries and where they apply, in the form permission|users=...|jobs=...|storage=.... For example users.user.view|users=user:MainUsers/bob reads one user.
  • Lifetime in minutes, or none; max uses; an idle timeout.
  • Read-only: it reads and never changes anything.
  • Addresses it may come from, and for file work the folders, privileges and protocols it may use.
  • Propose mode: its writes change nothing. Each becomes a proposal that its issuer approves or rejects (see AI agents).

A token never reaches a tier 0 operation: one that equals full administration, such as changing the server's access settings or putting back a backup of the preferences. Those need an administrator's own login, by password or browser session. The reference marks them "No token may use it".

Tokens are issued in the User Manager (a user, Access, Access tokens) or with POST /tokens, listed with GET /tokens and revoked with DELETE /tokens/{id}. The secret is shown once, when the token is made, and is never stored readable.

A user name and password#

Authorization: Basic logs in as the account, with all of its rights. It is meant for an administrator's own scripts; anything that runs unattended is better off with a token that holds only what it needs.

A browser session#

A page of the WebInterface calls the API with the session it already has: the CrushAuth cookie, and its c2f token in the X-CrushMFT-C2F header. A form on another site can send neither the header nor a JSON body, so it cannot use a logged-in administrator's session.

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

What a credential may do and why a request would be refused, the roles and the access tokens, the audit trail, and the move of accounts from legacy flags to roles.

GET /WebInterface/api/v1/whoami #

Who the caller is and what it may do: roles, scopes, grants with their source, and for a token its limits.

  • Operation: access.whoami
  • Credentials: token or basic or session
  • Permission: any login
  • Tier: -
  • Legacy: whoami
  • Token: by its grants
  • Read only: yes

Responses

Status Description Body
200 The result. whoami 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
default Any other error. Problem application/problem+json
Example 200 response
{
  "connection_group": "MainUsers",
  "exclude": [],
  "grants": [],
  "kind": "user",
  "legacy_flags": [],
  "roles": [],
  "root": false,
  "root_equivalent": false,
  "scope_jobs": [],
  "scope_storage": [],
  "scope_users": [],
  "user_id": "",
  "username": "bob"
}

POST /WebInterface/api/v1/explain #

May the caller (or a named user) use this permission on this target, and if not, why.

  • Operation: access.explain
  • Credentials: token or basic or session
  • Permission: access.explain
  • Tier: 2
  • Legacy: explainAccess
  • Token: by its grants
  • Read only: yes

Request body (required): application/json

Field Type Required Description
permission string yes The permission to ask about, by its name in the catalog.
target_username string A user the permission would be used on.
target_group string That user's connection group. Default: the caller's own.
target_job string A job the permission would be used on.
target_path string A local path it would be used on.
target_url string A remote URL it would be used on.
target_field string A user field it would change.
for_username string Ask for this user instead of the caller. Needs users.user.view on them.
for_group string That user's connection group. Default: the caller's own.
Example request body
{
  "permission": "users.user.view"
}

Responses

Status Description Body
200 The result. explanation 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
422 A field fails its rule: errors lists every one. Problem application/problem+json
default Any other error. Problem application/problem+json
Example 200 response
{
  "allowed": true,
  "permission": "users.user.view",
  "principal": "MainUsers/apiadmin",
  "reason": "allowed by legacy CONNECT",
  "source": "legacy CONNECT",
  "target": "-",
  "tier": "2"
}

GET /WebInterface/api/v1/access/catalog #

The permission catalog: permissions with tiers, field groups, preference sections, task types, built-in roles.

  • Operation: access.catalog.get
  • Credentials: token or basic or session
  • Permission: any login
  • Tier: -
  • Legacy: getAccessCatalog
  • Token: by its grants
  • Read only: yes

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
default Any other error. Problem application/problem+json

Fields of the 200 response

Field Type Required Description
field_groups list of object
field_groups[].group string
field_groups[].keys string
field_groups[].note string
field_groups[].permission string
field_groups[].tier string
legacy_flags list of object
legacy_flags[].conversion_takes_away string
legacy_flags[].flag string
legacy_flags[].root_equivalent string
legacy_flags[].stands_for string
permissions list of object
permissions[].dimensions string
permissions[].permission string
permissions[].tier string
pref_sections list of object
pref_sections[].section string
pref_sections[].tier string
roles list of role
tasks list of object
tasks[].permission string
tasks[].tier string
tasks[].type string
Example 200 response
{
  "field_groups": [
    {
      "group": "WebInterface script",
      "keys": "javascript, css",
      "note": "Runs in the browser of whoever opens the account's pages (S9).",
      "permission": "users.user.edit.webinterface.script",
      "tier": "1"
    },
    {
      "group": "Tunnels",
      "keys": "tunnels",
      "note": "",
      "permission": "users.user.edit.tunnels",
      "tier": "1"
    },
    {
      "group": "Password rules",
      "keys": "expire_password_days, password_history_count, unsafe_password_chars, random_password_length, min_password_length, min_password_numbers, min_password_lowers, min_password_uppers, min_password_specials",
      "note": "Can weaken the account.",
      "permission": "users.user.edit.password-rules",
      "tier": "1"
    }
  ],
  "legacy_flags": [
    {
      "conversion_takes_away": "Nothing.",
      "flag": "UPDATE_RUN",
      "root_equivalent": "no",
      "stands_for": "update-runner"
    },
    {
      "conversion_takes_away": "Listing any folder on the server.",
      "flag": "SHARE_EDIT",
      "root_equivalent": "no",
      "stands_for": "share-manager"
    },
    {
      "conversion_takes_away": "Stored secrets are masked.",
      "flag": "JOB_VIEW",
      "root_equivalent": "no",
      "stands_for": "job-viewer, jobs.log.view"
    }
  ],
  "permissions": [
    {
      "dimensions": "",
      "permission": "access.audit.read",
      "tier": "1"
    },
    {
      "dimensions": "",
      "permission": "access.convert",
      "tier": "0"
    },
    {
      "dimensions": "",
      "permission": "access.explain",
      "tier": "2"
    }
  ],
  "pref_sections": [
    {
      "section": "cluster",
      "tier": "0"
    },
    {
      "section": "as2",
      "tier": "1"
    },
    {
      "section": "custom-data",
      "tier": "1"
    }
  ],
  "roles": [
    {
      "builtin": "true",
      "can_assign": "",
      "description": "Everything, including every tier 0 permission. The only role that carries tier 0.",
      "grants": [],
      "id": "administrator",
      "name": "Administrator",
      "root": "true",
      "tier": "0"
    },
    {
      "builtin": "true",
      "can_assign": "",
      "description": "Read users, their settings and their VFS.",
      "grants": [
        {
          "permission": "users.user.list",
          "users": "managed"
        },
        {
          "permission": "users.user.view",
          "users": "managed"
        },
        {
          "permission": "users.vfs.browse",
          "users": "managed"
        }
      ],
      "id": "user-viewer",
      "name": "User Viewer",
      "tier": "2"
    },
    {
      "builtin": "true",
      "can_assign": "",
      "description": "Create and maintain accounts inside a users scope and a storage scope. No credentials, no roles.",
      "grants": [
        {
          "permission": "users.user.list",
          "users": "managed"
        },
        {
          "permission": "users.user.view",
          "users": "managed"
        },
        {
          "permission": "users.vfs.browse",
          "users": "managed"
        }
      ],
      "id": "user-manager",
      "name": "User Manager",
      "tier": "2"
    }
  ],
  "tasks": [
    {
      "permission": "jobs.task.branch",
      "tier": "2",
      "type": "Branch"
    },
    {
      "permission": "jobs.task.loop",
      "tier": "2",
      "type": "Loop"
    },
    {
      "permission": "jobs.task.wait",
      "tier": "2",
      "type": "Wait"
    }
  ]
}

GET /WebInterface/api/v1/roles #

All roles: built in and custom.

  • Operation: roles.list
  • Credentials: token or basic or session
  • Permission: access.roles.view
  • Tier: 1
  • Legacy: getRoles
  • Token: by its grants
  • Read only: yes

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
default Any other error. Problem application/problem+json

Fields of the 200 response

Field Type Required Description
items list of role
next_cursor null
Example 200 response
{
  "items": [
    {
      "builtin": true,
      "can_assign": [],
      "description": "Everything, including every tier 0 permission. The only role that carries tier 0.",
      "grants": [],
      "id": "administrator",
      "name": "Administrator",
      "extra": {
        "root": "true",
        "tier": "0"
      }
    },
    {
      "builtin": true,
      "can_assign": [],
      "description": "Read users, their settings and their VFS.",
      "grants": [
        {
          "permission": "users.user.list",
          "users": "managed"
        },
        {
          "permission": "users.user.view",
          "users": "managed"
        },
        {
          "permission": "users.vfs.browse",
          "users": "managed"
        }
      ],
      "id": "user-viewer",
      "name": "User Viewer",
      "extra": {
        "tier": "2"
      }
    },
    {
      "builtin": true,
      "can_assign": [],
      "description": "Create and maintain accounts inside a users scope and a storage scope. No credentials, no roles.",
      "grants": [
        {
          "permission": "users.user.list",
          "users": "managed"
        },
        {
          "permission": "users.user.view",
          "users": "managed"
        },
        {
          "permission": "users.vfs.browse",
          "users": "managed"
        }
      ],
      "id": "user-manager",
      "name": "User Manager",
      "extra": {
        "tier": "2"
      }
    }
  ],
  "next_cursor": null
}

PUT /WebInterface/api/v1/roles/{id} #

Make or replace a custom role. Built-in roles cannot be changed.

  • Operation: roles.save
  • Credentials: basic or session
  • Permission: access.roles.edit
  • Tier: 0
  • Legacy: saveRole
  • Token: never
  • Read only: no

Parameters

Name In Type Required Description
id path string yes The role's id: lower case letters, digits and hyphens.

Request body (required): application/json

Field Type Required Description
name string The role's name.
description string
can_assign array The ids of the roles its holders may give to others.
grants array Grants: permission, and where the permission takes them users, jobs, storage, fields, ip, protocols.
Example request body
{
  "name": "Gate Role",
  "description": "made by the gate tests",
  "grants": [
    {
      "permission": "users.user.view",
      "users": "conn:MainUsers"
    },
    {
      "permission": "users.user.list",
      "users": "conn:MainUsers"
    }
  ]
}

Responses

Status Description Body
200 The result. role 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
412 If-Match did not match: someone changed the object since it was read. 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
Example 200 response
{
  "builtin": false,
  "can_assign": [],
  "description": "made by the gate tests",
  "grants": [
    {
      "permission": "users.user.view",
      "users": "conn:MainUsers"
    },
    {
      "permission": "users.user.list",
      "users": "conn:MainUsers"
    }
  ],
  "id": "gate-role",
  "name": "Gate Role",
  "extra": {
    "modified_by": "MainUsers/apiadmin",
    "modified_time": "1795375784624",
    "tier": "2"
  }
}

DELETE /WebInterface/api/v1/roles/{id} #

Delete a custom role. When jobs run as it they stop running, and the server wants confirm=true.

  • Operation: roles.delete
  • Credentials: basic or session
  • Permission: access.roles.edit
  • Tier: 0
  • Legacy: deleteRole
  • Token: never
  • Read only: no

Parameters

Name In Type Required Description
id path string yes The role's id.
confirm query boolean Delete it although jobs run as it. Default false.

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
default Any other error. Problem application/problem+json

GET /WebInterface/api/v1/tokens #

The caller's own access tokens. all=true lists every token and needs access.tokens.view-all.

  • Operation: tokens.list
  • Credentials: token or basic or session
  • Permission: any login
  • Tier: -
  • Legacy: listTokens
  • Token: by its grants
  • Read only: yes

Parameters

Name In Type Required Description
all query boolean Every token on the server. Needs access.tokens.view-all. Default false.

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 token
next_cursor null
Example 200 response
{
  "items": [
    {
      "created": "2026-11-22T19:29:38.475Z",
      "expires": "2026-11-22T19:59:38.475Z",
      "grants": [
        {
          "permission": "users.user.view",
          "users": "user:MainUsers/bob"
        },
        {
          "permission": "users.user.list",
          "users": "user:MainUsers/bob"
        }
      ],
      "id": "RcC0nHWZihUm",
      "idle_timeout_secs": 0,
      "ips": "",
      "issuer_connection_group": "MainUsers",
      "issuer_id": "dbd4ad141707d9f14f633692aa66fa4e",
      "issuer_name": "apiadmin",
      "label": "gate: view bob",
      "last_used": "2026-11-22T19:29:39.942Z",
      "max_uses": 0,
      "not_before": "2026-11-22T19:29:38.475Z",
      "read_only": false,
      "revoked": true,
      "revoked_by": "MainUsers/apiadmin",
      "revoked_time": "2026-11-22T19:29:39.956Z",
      "uses": 9,
      "vfs_paths": [],
      "vfs_privs": [],
      "vfs_protocols": [],
      "extra": {
        "long_lived": "false",
        "never_expires": "false",
        "propose": "false",
        "state": "token revoked"
      }
    },
    {
      "created": "2026-11-22T19:29:38.503Z",
      "expires": "2026-11-22T19:59:38.503Z",
      "grants": [
        {
          "permission": "users.user.view",
          "users": "conn:MainUsers"
        },
        {
          "permission": "users.user.list",
          "users": "conn:MainUsers"
        },
        {
          "permission": "access.explain"
        }
      ],
      "id": "LW7chDnBWtik",
      "idle_timeout_secs": 0,
      "ips": "",
      "issuer_connection_group": "MainUsers",
      "issuer_id": "dbd4ad141707d9f14f633692aa66fa4e",
      "issuer_name": "apiadmin",
      "label": "gate: read only",
      "last_used": "2026-11-22T19:29:39.918Z",
      "max_uses": 0,
      "not_before": "2026-11-22T19:29:38.503Z",
      "read_only": true,
      "revoked": false,
      "uses": 1,
      "vfs_paths": [],
      "vfs_privs": [],
      "vfs_protocols": [],
      "extra": {
        "long_lived": "false",
        "never_expires": "false",
        "propose": "false",
        "state": "active"
      }
    },
    {
      "created": "2026-11-22T19:29:38.523Z",
      "expires": "2026-11-22T19:59:38.523Z",
      "grants": [
        {
          "permission": "users.user.view",
          "users": "conn:MainUsers"
        },
        {
          "permission": "users.user.list",
          "users": "conn:MainUsers"
        },
        {
          "permission": "prefs.banning.view"
        }
      ],
      "id": "WO8ZjXGbOLv3",
      "idle_timeout_secs": 0,
      "ips": "",
      "issuer_connection_group": "MainUsers",
      "issuer_id": "dbd4ad141707d9f14f633692aa66fa4e",
      "issuer_name": "apiadmin",
      "label": "gate: all users",
      "last_used": "2026-11-22T19:29:40.012Z",
      "max_uses": 0,
      "not_before": "2026-11-22T19:29:38.523Z",
      "read_only": false,
      "revoked": false,
      "uses": 7,
      "vfs_paths": [],
      "vfs_privs": [],
      "vfs_protocols": [],
      "extra": {
        "long_lived": "false",
        "never_expires": "false",
        "propose": "false",
        "state": "active"
      }
    }
  ],
  "next_cursor": null
}

POST /WebInterface/api/v1/tokens #

Issue an access token for the caller: a slice of the caller's own rights. The token is in this answer and nowhere else, ever.

  • Operation: tokens.issue
  • Credentials: basic or session
  • Permission: access.tokens.issue
  • Tier: 2
  • Legacy: issueToken
  • Token: never
  • Read only: no

Request body (required): application/json

Field Type Required Description
label string Which agent or script, for what. Shown in the audit log.
minutes integer How long it lives. 0: no end. Default: the server's (60).
ips string Addresses it may be used from, in the syntax of admin_ips.
read_only boolean It may read and never change.
vfs_paths array For file work: the folders of the caller's VFS it may touch.
vfs_privs array For file work: the privileges it may use, such as ["read","view"].
vfs_protocols array For file work: the protocols it may come over.
max_uses integer How many requests it is good for.
idle_timeout_secs integer It ends when unused this long.
grants array The slice of the caller's rights it carries: grants as in a role.
propose boolean Its writes are kept as proposals for the issuer to approve; it changes nothing itself.
Example request body
{
  "label": "gate: issued through the API",
  "minutes": 5,
  "read_only": true,
  "grants": [
    {
      "permission": "users.user.list",
      "users": "conn:MainUsers"
    }
  ]
}

Responses

Status Description Body
201 Created. 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 201 response

Field Type Required Description
id string
note string
token string
warning string
Example 201 response
{
  "id": "ZhipIPe2VIRu",
  "token": "cft_7f3a91c2.EXAMPLE-SECRET-SHOWN-ONCE",
  "warning": "",
  "note": "This is the only time the token is shown. Send it as: Authorization: Bearer \u003ctoken\u003e"
}

DELETE /WebInterface/api/v1/tokens/{id} #

Revoke a token: the caller's own, or with access.tokens.revoke-all anyone's. A token can revoke only itself.

  • Operation: tokens.revoke
  • Credentials: token or basic or session
  • Permission: any login
  • Tier: -
  • Legacy: revokeToken
  • Token: by its grants
  • Read only: no

Parameters

Name In Type Required Description
id path string yes The token's id (not the token).

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
default Any other error. Problem application/problem+json

GET /WebInterface/api/v1/audit #

The last entries of the access audit log.

  • Operation: audit.read
  • Credentials: basic or session
  • Permission: access.audit.read
  • Tier: 1
  • Legacy: getAccessAudit
  • Token: never
  • Read only: yes

Parameters

Name In Type Required Description
limit query integer At most this many entries, 1 to 1000, the newest last. Default 200.
filter query string Only entries that hold this text.

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 object
items[].actor string
items[].decision string
items[].event string
items[].ip string
items[].permission string
items[].reason string
items[].target string
items[].time string
next_cursor null
Example 200 response
{
  "items": [
    {
      "actor": "token AwSuF4hFJYCR for MainUsers/apiadmin",
      "decision": "refused",
      "event": "deny",
      "ip": "192.0.2.10",
      "permission": "",
      "reason": "forbidden: the token does not give it: no role grants server.diagnostics.threads",
      "target": "api server.threads.get",
      "time": "2026-11-22 21:29:59.146"
    },
    {
      "actor": "token mTyYVYfmM7Lt for MainUsers/apiadmin",
      "decision": "refused",
      "event": "deny",
      "ip": "192.0.2.10",
      "permission": "",
      "reason": "read_only_token: The token is read-only and this operation changes something.",
      "target": "api server.stats.reset",
      "time": "2026-11-22 21:29:59.171"
    },
    {
      "actor": "token j3ZuSadW0dSM for MainUsers/apiadmin",
      "decision": "refused",
      "event": "deny",
      "ip": "192.0.2.10",
      "permission": "",
      "reason": "modifyIpRestrictions is not open to role-based access yet",
      "target": "modifyIpRestrictions",
      "time": "2026-11-22 21:29:59.176"
    }
  ],
  "next_cursor": null
}

GET /WebInterface/api/v1/access/conversion #

What converting the accounts on legacy admin flags to roles would do, account by account, and what each would lose.

  • Operation: access.conversion.get
  • Credentials: basic or session
  • Permission: access.convert
  • Tier: 0
  • Legacy: getConversionReport
  • Token: never
  • Read only: yes

Parameters

Name In Type Required Description
connection_group query string Only this group. Default: all.
accounts query list of string Only these accounts.

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
accounts list of object
accounts[].legacy_flags string
accounts[].roles string
accounts[].root_equivalent_now string
accounts[].scope_jobs string
accounts[].scope_storage string
accounts[].scope_users string
accounts[].serverGroup string
accounts[].site string
accounts[].takes_away string
accounts[].username string
dependents object
dependents.jobs_with_tier0_tasks array
dependents.vfs_in_server_files list of string
Example 200 response
{
  "accounts": [
    {
      "legacy_flags": "CONNECT",
      "roles": "administrator",
      "root_equivalent_now": "true",
      "scope_jobs": "",
      "scope_storage": "",
      "scope_users": "",
      "serverGroup": "MainUsers",
      "site": "(CONNECT)(WEB_ADMIN)",
      "takes_away": "",
      "username": "apiadmin"
    },
    {
      "legacy_flags": "USER_VIEW",
      "roles": "user-viewer",
      "root_equivalent_now": "false",
      "scope_jobs": "all",
      "scope_storage": "all",
      "scope_users": "all",
      "serverGroup": "MainUsers",
      "site": "(USER_VIEW)",
      "takes_away": "",
      "username": "legacy"
    }
  ],
  "dependents": {
    "jobs_with_tier0_tasks": [],
    "vfs_in_server_files": [
      "MainUsers/alice: path is in the server's own files (/var/opt/CrushMFT27): /var/opt/CrushMFT27/files/alice",
      "MainUsers/apitest1: path is in the server's own files (/var/opt/CrushMFT27): /var/opt/CrushMFT27/files/bob",
      "MainUsers/bob: path is in the server's own files (/var/opt/CrushMFT27): /var/opt/CrushMFT27/files/bob"
    ]
  }
}

POST /WebInterface/api/v1/access/conversion/run #

Convert the accounts named from legacy admin flags to roles.

  • Operation: access.conversion.run
  • Credentials: basic or session
  • Permission: access.convert
  • Tier: 0
  • Legacy: convertAccounts
  • Token: never
  • Read only: no

Request body (required): application/json

Field Type Required Description
connection_group string Only this group.
accounts array The accounts to convert.
Example request body
{
  "connection_group": "MainUsers",
  "accounts": [
    "legacy"
  ]
}

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
accounts array
converted array
Example 200 response
{
  "accounts": [],
  "converted": []
}

Schemas used here#

whoami #

Field Type Required Description
connection_group string The user connection group of the account
exclude list of string Permissions and roles taken away from this account
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.
grants array The effective grants, each with its source and tier
kind string user or token
layers array The roles each inheritance layer adds
legacy_flags list of string Legacy admin flags of the account. The API does not act on them
roles list of string Role ids
root boolean Administrator role or legacy CONNECT, and not a token
root_equivalent boolean Root, or a legacy flag that can make itself root
scope_jobs list of string
scope_storage list of string
scope_users list of string
token object For a token: its limits
unknown_roles list of string Role ids the account names that the server does not have
user_id string The account's stable id; it survives a rename
username string

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

explanation #

Field Type Required Description
allowed 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.
permission string
principal string Who the question was asked for
reason string Why, in words
source string The role that granted it
target string
tier string 0 root-equivalent, 1 sensitive, 2 normal

role #

Field Type Required Description
builtin boolean
can_assign list of string The roles its holders may give to others
description 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.
grants array
id string
name string

token #

Field Type Required Description
created string (date-time) or null
expires string (date-time) or null null: never
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.
grants array
id string
idle_timeout_secs integer or null
ips string
issuer_connection_group string
issuer_id string
issuer_name string
label string
last_used string (date-time) or null
max_uses integer or null
not_before string (date-time) or null
read_only boolean
revoked boolean
revoked_by string
revoked_time string (date-time) or null
uses integer or null
vfs_paths list of string
vfs_privs list of string
vfs_protocols list of string