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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

 

Resource Information

Response formatsjson
Response code 200
Requires authenticationAPI key header 'X-Auth-Token'
HTTP MethodPOST


Parameters

 

Name

Type

Default Value

Description

name

required

string

-

user name

email

required

string

-

user email address

groups

required

string

-

the ID of the preferred users class (Pro Users and Associate Users)

Get /user/group

[
  {
    "id": "a7c8001f-bf3e-4afb-b8b5-7fdbb966a32f",
    "name": "Associate Users"
  },
  {
    "id": "b317d53e-4f04-41c1-92ca-a0b3a32d31af",
    "name": "Pro Users"
  }
]
user_operations

required

number-

user role - 3

secondary admin role - 1535

quota

optional

number-1

quota is measured in bytes (B)

"-1" means unlimited storage

language

optional

stringEnglish

"en_GB"

"zh_CN"

services

optional

string-

to enable SFTP you need to specify its ID

Get /service - retrieves all services

"users": [

      {

        "email": "john.smith+78@maytech.net",

        "unique_login": "q4011239",

        "id": "525f81ca-f32b-4978-bfc5-abeb5f084584",

        "name": "New User"

      }

    ],

    "id": "52ecc90b-9f18-44db-89de-5549359739bb",

    "base": false,

    "key": "SFTP",

    "auth_methods": []

  }

]


custom_sftp_home

optional

booleanfalsetrue or false



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