Fortinet black logo

POST

POST

URI:
  • /api/v1/user
Input fields:
/>
Field NameTypeRequired

Description

sn

string

No

The device's serial number.

vdom

string

No

The vdom of the auth client.

username

string

Yes

The user's username.

email

string

Yes

The user's email address.

mobile_number

string

No

The user's mobile phone number.

license

string

No

FTM token migration license number.

token_data

string

No

FTM token migration data.

token

string

No

The user token serial number.

activation_code

boolean

No

If skip token migration notification

user_data

integer

No

User type, which can be either of

  • 0 for local user
  • 1 for remote LDAP user

auth_method

string

No

The authentication method, which can be one of the following:

  • ‘FTM’
  • ‘Email’
  • ‘SMS’
  • ‘FTK’

notification_method

string

No

Supported notification method, which can either of the following:

  • ‘Email’
  • ‘SMS’

brief

boolean

No

The API response only includes the mobile_number, username, email, vdom, realm, id, user_data if brief=True.

case_accent_sensitive

boolean

No

Wheher the user name is case-sensitive.

Successful response fields:
Field name Type Description
customer_id string The customer ID.
client_id string The client ID.
user_id string The user ID.
notification_method string

Supported notification method, which can be either of the following:

  • ‘Email’

  • ‘SMS’

auth_method string

The authentication method, which can be one of the following:

  • ‘FTM’

  • ‘Email’

  • ‘SMS’

  • ‘FTK’

username string The user's username.
id string The userref ID.
realm_id string The realm ID.

mobile_number

string

The user's mobile phone number.

email

string

The user's email address.

active

boolean

If user is active.

created_at

string

The timestamp when user was created.

updated_at

string

The timestamp when user was last updated.

bypass_at

string

The timestamp when user was bypassed

lockout_at

string

The timestamp when user was locked out

fail_times

integer

The failed attempts of user login validation.

user_data

integer

User type, which can be either of the following:

  • 0 for local user

  • 1 for remote LDAP user

temp_token

boolean

If user enabled temporary token.

Response codes:
Code Response content Description
201 OK The user is successfully created.
400 Bad Request
  • Cannot identify related customer info.

  • No client_id, serial number or vdom was specified.

  • Auth Client was not found

  • Trial customer not allow to use SMS service

  • Mobile number is invalid

  • License is required for FTM token migration

402 Payment Required No valid FTC subscription was found. Please enable free trial or register licenses.
403 Forbidden
  • You are not authorized to create user .

  • License is not in migration.

409 Conflict Auth client has been locked from adding user due to a pending task.
424 Failed Dependency Auth client needs to be associated with a realm in FTC.
Example request body:

Input:

{

'username': 'abc',

'email': 'abc@fortinet.com',

'mobile_number': '+11234567890'

}

Example of successful response body:
{
   "auth_method":"FTM",
   "client_id":"12345678-abcd-efgh-1234-xxxxxxxxxxxx",
   "created_at":"2020-02-02T02:22:22",
   "customer_id":"123456",
   "email":"abc@fortinet.com",
   "user_data":0,
   "id":"12345678-abcd-efgh-1234-xxxxxxxxxxxx",
   "lockout_at": None,
   "mobile_number":"1123456789",
   "notification_method":"Email",
   "user_id":"12345678-abcd-efgh-1234-xxxxxxxxxxxx",
   "realm_id":"12345678-abcd-efgh-1234-xxxxxxxxxxxx",
   "username":"abc",
   "updated_at": None,
   "active":true,
   "temp_token":false,
   "bypass_at": None,
   "fail_times":0
}

POST

URI:
  • /api/v1/user
Input fields:
/>
Field NameTypeRequired

Description

sn

string

No

The device's serial number.

vdom

string

No

The vdom of the auth client.

username

string

Yes

The user's username.

email

string

Yes

The user's email address.

mobile_number

string

No

The user's mobile phone number.

license

string

No

FTM token migration license number.

token_data

string

No

FTM token migration data.

token

string

No

The user token serial number.

activation_code

boolean

No

If skip token migration notification

user_data

integer

No

User type, which can be either of

  • 0 for local user
  • 1 for remote LDAP user

auth_method

string

No

The authentication method, which can be one of the following:

  • ‘FTM’
  • ‘Email’
  • ‘SMS’
  • ‘FTK’

notification_method

string

No

Supported notification method, which can either of the following:

  • ‘Email’
  • ‘SMS’

brief

boolean

No

The API response only includes the mobile_number, username, email, vdom, realm, id, user_data if brief=True.

case_accent_sensitive

boolean

No

Wheher the user name is case-sensitive.

Successful response fields:
Field name Type Description
customer_id string The customer ID.
client_id string The client ID.
user_id string The user ID.
notification_method string

Supported notification method, which can be either of the following:

  • ‘Email’

  • ‘SMS’

auth_method string

The authentication method, which can be one of the following:

  • ‘FTM’

  • ‘Email’

  • ‘SMS’

  • ‘FTK’

username string The user's username.
id string The userref ID.
realm_id string The realm ID.

mobile_number

string

The user's mobile phone number.

email

string

The user's email address.

active

boolean

If user is active.

created_at

string

The timestamp when user was created.

updated_at

string

The timestamp when user was last updated.

bypass_at

string

The timestamp when user was bypassed

lockout_at

string

The timestamp when user was locked out

fail_times

integer

The failed attempts of user login validation.

user_data

integer

User type, which can be either of the following:

  • 0 for local user

  • 1 for remote LDAP user

temp_token

boolean

If user enabled temporary token.

Response codes:
Code Response content Description
201 OK The user is successfully created.
400 Bad Request
  • Cannot identify related customer info.

  • No client_id, serial number or vdom was specified.

  • Auth Client was not found

  • Trial customer not allow to use SMS service

  • Mobile number is invalid

  • License is required for FTM token migration

402 Payment Required No valid FTC subscription was found. Please enable free trial or register licenses.
403 Forbidden
  • You are not authorized to create user .

  • License is not in migration.

409 Conflict Auth client has been locked from adding user due to a pending task.
424 Failed Dependency Auth client needs to be associated with a realm in FTC.
Example request body:

Input:

{

'username': 'abc',

'email': 'abc@fortinet.com',

'mobile_number': '+11234567890'

}

Example of successful response body:
{
   "auth_method":"FTM",
   "client_id":"12345678-abcd-efgh-1234-xxxxxxxxxxxx",
   "created_at":"2020-02-02T02:22:22",
   "customer_id":"123456",
   "email":"abc@fortinet.com",
   "user_data":0,
   "id":"12345678-abcd-efgh-1234-xxxxxxxxxxxx",
   "lockout_at": None,
   "mobile_number":"1123456789",
   "notification_method":"Email",
   "user_id":"12345678-abcd-efgh-1234-xxxxxxxxxxxx",
   "realm_id":"12345678-abcd-efgh-1234-xxxxxxxxxxxx",
   "username":"abc",
   "updated_at": None,
   "active":true,
   "temp_token":false,
   "bypass_at": None,
   "fail_times":0
}