Maytech Public Documentation
Space shortcuts
Skip to end of metadata
Go to start of metadata

 Follow the steps below to create users via Quatrix API

  1. Log in to the account using GET /session/login.
  2. Get available user groups with GET /user/group and choose group_id for a new user.

     If you want enable SFTP access to a newly created user, use GET /service call and get the id of service where the key = SFTP.

  3. Execute the call POST /user/create with following parameters:

    Name

    Type

    Default Value

    Description

    name*


    string

    -

    user name

    Must be without '@'

    email*


    string

    -

    user email address

    groups*

    list of strings

    -

    the ID of the preferred group.

    group_id from GET /user/group

    Learn more about user groups (renamed classes).

    user_operations*
    number-

    user role - 3

    secondary admin role - 1535

    quota
    number-1

    quota is measured in bytes (B).

    "-1" means unlimited storage

    language

    string"en_GB"

    "en_GB" - English - default

    "zh_CN" - Chinese

    services


    list of strings-

    to enable SFTP you need to specify its ID.

    GET /service - retrieves all services.

    statusstringA

    A - active, D - disabled

    * required parameters


With response code 201 the user is created and a welcome email for setting a password will be sent to the user.


Example Request URL

Request Payload

{
  "name": "New User",
  "email": "john.smith+78@maytech.net",
  "quota": -1,
  "user_operations": 3,
  "groups": [
         "b317d53e-4f04-41c1-92ca-a0b3a32d31af"], 
"services": [
         "52ecc90b-9f18-44db-89de-5549359739bb"]
}


Response Body

{
  "status": "A",
  "user_operations": 3,
  "has_key": false,
  "effective_operations": 131,
  "home_operations": 191,
  "id": "525f81ca-f32b-4978-bfc5-abeb5f084584",
  "home_id": "d01a23da-2887-4f80-bc0e-5dc9c0ce9d18",
  "parent_id": "12a5810d-0b8e-4324-b1f7-140a1be595e2",
  "readonly": false,
  "last_login": null,
  "storage_id": "b5a0ee83-d8b7-4bdf-bd34-3139b58aab48",
  "email": "john.smith+78@maytech.net",
  "home_name": "/User Homes/john.smith+78@maytech.net",
  "quota": -1,
  "custom_sftp_home": false,
  "groups": [
    {
      "metadata": {
        "translation_id": "pro",
        "is_system": true,
        "visual_order": 10
      },
      "id": "b317d53e-4f04-41c1-92ca-a0b3a32d31af",
      "name": "Pro Users"
    }
  ],
  "services": [
    {
      "service_key": "SFTP",
      "id": "52ecc90b-9f18-44db-89de-5549359739bb"
    }
  ],
  "unique_login": "q4011239",
  "name": "New User",
  "language": "en_GB",
  "created": 1537541776,
  "modified": 1537541776,
  "super_admin": "N",
  "auth_methods": [],
  "sftp_home": "/"
}



  • No labels